pass World to Effects/*

This commit is contained in:
Bob
2010-01-21 13:27:44 +13:00
parent 90b5df73b5
commit 4fa56f16c0
20 changed files with 43 additions and 43 deletions

View File

@@ -47,7 +47,7 @@ namespace OpenRa.Effects
const int MissileCloseEnough = 7;
const float Scale = .2f;
public void Tick()
public void Tick( World world )
{
t += 40;
@@ -64,7 +64,7 @@ namespace OpenRa.Effects
var dist = Target.CenterLocation - Pos;
if (dist.LengthSquared < MissileCloseEnough * MissileCloseEnough || Target.IsDead)
{
Game.world.AddFrameEndTask(w => w.Remove(this));
world.AddFrameEndTask(w => w.Remove(this));
if (t > Projectile.Arm * 40) /* don't blow up in our launcher's face! */
Combat.DoImpact(Pos.ToInt2(), Pos.ToInt2(), Weapon, Projectile, Warhead, FiredBy);
@@ -78,7 +78,7 @@ namespace OpenRa.Effects
Pos += move;
if (Projectile.Animates)
Game.world.AddFrameEndTask(w => w.Add(new Smoke((Pos - 1.5f * move - new int2( 0, Altitude )).ToInt2())));
world.AddFrameEndTask(w => w.Add(new Smoke(w, (Pos - 1.5f * move - new int2( 0, Altitude )).ToInt2())));
// todo: running out of fuel
}