guts of Combat is on the new model

This commit is contained in:
Chris Forbes
2010-04-01 18:24:42 +13:00
parent 11121baf23
commit cefee4b1d2
4 changed files with 27 additions and 43 deletions

View File

@@ -81,8 +81,7 @@ namespace OpenRA.Effects
if (t > TotalTime()) /* remove finished bullets */
{
world.AddFrameEndTask(w => w.Remove(this));
//Combat.DoImpact(Args.dest, VisualDest - new int2( 0, Args.destAltitude ),
// Weapon, Projectile, Warhead, FiredBy);
Combat.DoImpact(Args.weapon.Warheads[0], Args, VisualDest - new int2(0, Args.destAltitude));
}
if (Info.Trail != null)

View File

@@ -117,8 +117,8 @@ namespace OpenRA.Effects
{
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);
// if (t > Projectile.Arm * 40) /* don't blow up in our launcher's face! */
// Combat.DoImpact(Pos.ToInt2(), Pos.ToInt2(), Weapon, Projectile, Warhead, FiredBy);
return;
}

View File

@@ -83,7 +83,7 @@ namespace OpenRA.Effects
{
world.AddFrameEndTask(w => w.Remove(this));
var warhead = Rules.WarheadInfo[weapon.Warhead];
Combat.DoImpact(pos.ToInt2(), pos.ToInt2(), weapon, Rules.ProjectileInfo[weapon.Projectile], warhead, silo, true);
//Combat.DoImpact(pos.ToInt2(), pos.ToInt2(), weapon, Rules.ProjectileInfo[weapon.Projectile], warhead, silo, true);
world.WorldActor.traits.Get<ScreenShaker>().AddEffect(20, pos, 5);
}