Minor TeslaZap cleanup
Renaming timeUntilRemove to ticksUntilRemove makes it more clear and allows to drop the comment.
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user