Minor TeslaZap cleanup

Renaming timeUntilRemove to ticksUntilRemove makes it more clear and allows to drop the comment.
This commit is contained in:
reaperrr
2017-06-07 17:39:08 +02:00
parent 16e260e69f
commit 2704f3bcd5

View File

@@ -40,7 +40,7 @@ namespace OpenRA.Mods.Cnc.Projectiles
readonly ProjectileArgs args; readonly ProjectileArgs args;
readonly TeslaZapInfo info; readonly TeslaZapInfo info;
TeslaZapRenderable zap; TeslaZapRenderable zap;
int timeUntilRemove; // # of frames int ticksUntilRemove;
bool doneDamage = false; bool doneDamage = false;
bool initialized = false; bool initialized = false;
@@ -48,12 +48,12 @@ namespace OpenRA.Mods.Cnc.Projectiles
{ {
this.args = args; this.args = args;
this.info = info; this.info = info;
this.timeUntilRemove = info.Duration; ticksUntilRemove = info.Duration;
} }
public void Tick(World world) public void Tick(World world)
{ {
if (timeUntilRemove-- <= 0) if (ticksUntilRemove-- <= 0)
world.AddFrameEndTask(w => w.Remove(this)); world.AddFrameEndTask(w => w.Remove(this));
if (!doneDamage) if (!doneDamage)