Merge pull request #8833 from obrakmann/fix8826_trait-from-dead-crate-crash
Fix crates dying while not in the world
This commit is contained in:
@@ -117,7 +117,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
public void Tick(Actor self)
|
public void Tick(Actor self)
|
||||||
{
|
{
|
||||||
if (info.Lifetime != 0 && ++ticks >= info.Lifetime * 25)
|
if (info.Lifetime != 0 && self.IsInWorld && ++ticks >= info.Lifetime * 25)
|
||||||
self.Dispose();
|
self.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user