Add an is in world check to fix a crash.
This commit is contained in:
committed by
atlimit8
parent
e361f7b246
commit
fc84cd9204
@@ -111,6 +111,9 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
if (++ticks >= cachedInterval)
|
||||
{
|
||||
var spawnCell = Info.SpawnAtLastPosition ? self.World.Map.CellContaining(cachedPosition) : self.World.Map.CellContaining(self.CenterPosition);
|
||||
if (!self.World.Map.Contains(spawnCell))
|
||||
return;
|
||||
|
||||
var type = self.World.Map.GetTerrainInfo(spawnCell).Type;
|
||||
|
||||
if (++offset >= Info.Offsets.Length)
|
||||
|
||||
Reference in New Issue
Block a user