Fix decal placer crashing when placing/removing in space

This commit is contained in:
Kara D
2022-02-08 15:29:23 -07:00
parent a3061fd855
commit 49007d68e7

View File

@@ -109,6 +109,9 @@ namespace Content.Server.Decals
var gridId = ev.Coordinates.GetGridId(EntityManager);
if (!gridId.IsValid())
return;
// remove all decals on the same tile
foreach (var decal in GetDecalsInRange(gridId, ev.Coordinates.Position))
{
@@ -141,6 +144,9 @@ namespace Content.Server.Decals
return false;
var gridId = coordinates.GetGridId(EntityManager);
if (!gridId.IsValid())
return false;
if (MapManager.GetGrid(gridId).GetTileRef(coordinates).IsSpace())
return false;