Make handheld explosives affect tiles (#2806)
If you are holding the explosive in your hard or inventory, this should make affect the tiles around you. At the moment it only affects entities. I will refactor this class a little more.
This commit is contained in:
@@ -77,7 +77,7 @@ namespace Content.Server.Explosions
|
|||||||
//TODO: make it into some sort of actual damage component or whatever the boys think is appropriate
|
//TODO: make it into some sort of actual damage component or whatever the boys think is appropriate
|
||||||
if (mapManager.TryGetGrid(coords.GetGridId(entityManager), out var mapGrid))
|
if (mapManager.TryGetGrid(coords.GetGridId(entityManager), out var mapGrid))
|
||||||
{
|
{
|
||||||
var circle = new Circle(coords.Position, maxRange);
|
var circle = new Circle(coords.ToMapPos(entityManager), maxRange);
|
||||||
var tiles = mapGrid?.GetTilesIntersecting(circle);
|
var tiles = mapGrid?.GetTilesIntersecting(circle);
|
||||||
foreach (var tile in tiles)
|
foreach (var tile in tiles)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user