Rename Actor.Destroy/Destroyed to Dispose/Disposed.
This commit is contained in:
@@ -104,7 +104,7 @@ namespace OpenRA.Traits
|
||||
|
||||
self.World.AddFrameEndTask(w =>
|
||||
{
|
||||
if (self.Destroyed)
|
||||
if (self.Disposed)
|
||||
return;
|
||||
|
||||
var line = self.TraitOrDefault<DrawLineToTarget>();
|
||||
@@ -120,7 +120,7 @@ namespace OpenRA.Traits
|
||||
|
||||
self.World.AddFrameEndTask(w =>
|
||||
{
|
||||
if (self.Destroyed)
|
||||
if (self.Disposed)
|
||||
return;
|
||||
|
||||
target.Flash();
|
||||
|
||||
@@ -155,7 +155,7 @@ namespace OpenRA.Traits
|
||||
nd.Killed(self, ai);
|
||||
|
||||
if (RemoveOnDeath)
|
||||
self.Destroy();
|
||||
self.Dispose();
|
||||
|
||||
Log.Write("debug", "{0} #{1} killed by {2} #{3}", self.Info.Name, self.ActorID, attacker.Info.Name, attacker.ActorID);
|
||||
}
|
||||
@@ -195,7 +195,7 @@ namespace OpenRA.Traits
|
||||
{
|
||||
public static DamageState GetDamageState(this Actor self)
|
||||
{
|
||||
if (self.Destroyed)
|
||||
if (self.Disposed)
|
||||
return DamageState.Dead;
|
||||
|
||||
var health = self.TraitOrDefault<Health>();
|
||||
@@ -204,7 +204,7 @@ namespace OpenRA.Traits
|
||||
|
||||
public static void InflictDamage(this Actor self, Actor attacker, int damage, DamageWarhead warhead)
|
||||
{
|
||||
if (self.Destroyed) return;
|
||||
if (self.Disposed) return;
|
||||
var health = self.TraitOrDefault<Health>();
|
||||
if (health == null) return;
|
||||
health.InflictDamage(self, attacker, damage, warhead, false);
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace OpenRA.Traits
|
||||
if (NeedRenderables)
|
||||
{
|
||||
NeedRenderables = false;
|
||||
if (!actor.Destroyed)
|
||||
if (!actor.Disposed)
|
||||
{
|
||||
IsRendering = true;
|
||||
renderables = actor.Render(wr).ToArray();
|
||||
|
||||
@@ -198,7 +198,7 @@ namespace OpenRA.Traits
|
||||
yield break;
|
||||
|
||||
for (var i = influence[a]; i != null; i = i.Next)
|
||||
if (!i.Actor.Destroyed)
|
||||
if (!i.Actor.Disposed)
|
||||
yield return i.Actor;
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ namespace OpenRA.Traits
|
||||
yield break;
|
||||
|
||||
for (var i = influence[a]; i != null; i = i.Next)
|
||||
if (!i.Actor.Destroyed && (i.SubCell == sub || i.SubCell == SubCell.FullCell))
|
||||
if (!i.Actor.Disposed && (i.SubCell == sub || i.SubCell == SubCell.FullCell))
|
||||
yield return i.Actor;
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ namespace OpenRA.Traits
|
||||
|
||||
var always = sub == SubCell.FullCell || sub == SubCell.Any;
|
||||
for (var i = influence[a]; i != null; i = i.Next)
|
||||
if ((always || i.SubCell == sub || i.SubCell == SubCell.FullCell) && !i.Actor.Destroyed && withCondition(i.Actor))
|
||||
if ((always || i.SubCell == sub || i.SubCell == SubCell.FullCell) && !i.Actor.Disposed && withCondition(i.Actor))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user