undo ProjectileArgs stuff
This commit is contained in:
@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Aftermath
|
|||||||
|
|
||||||
self.World.AddFrameEndTask( w =>
|
self.World.AddFrameEndTask( w =>
|
||||||
{
|
{
|
||||||
Combat.DoExplosion(self, info.PrimaryWeapon, Target.FromActor(self), altitude);
|
Combat.DoExplosion(self, info.PrimaryWeapon, self.CenterLocation, altitude);
|
||||||
var report = self.GetPrimaryWeapon().Report;
|
var report = self.GetPrimaryWeapon().Report;
|
||||||
if (report != null)
|
if (report != null)
|
||||||
Sound.Play(report + ".aud", self.CenterLocation);
|
Sound.Play(report + ".aud", self.CenterLocation);
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ namespace OpenRA.Mods.Cnc.Effects
|
|||||||
void Finish( World world )
|
void Finish( World world )
|
||||||
{
|
{
|
||||||
world.AddFrameEndTask(w => w.Remove(this));
|
world.AddFrameEndTask(w => w.Remove(this));
|
||||||
Combat.DoExplosion(firedBy, "IonCannon", target, 0);
|
Combat.DoExplosion(firedBy, "IonCannon", target.CenterLocation, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,16 +113,16 @@ namespace OpenRA.Mods.RA
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void DoExplosion(Actor attacker, string weapontype, Target _target, int altitude)
|
public static void DoExplosion(Actor attacker, string weapontype, float2 pos, int altitude)
|
||||||
{
|
{
|
||||||
var args = new ProjectileArgs
|
var args = new ProjectileArgs
|
||||||
{
|
{
|
||||||
src = Util.CellContaining(_target.CenterLocation),
|
src = pos.ToInt2(),
|
||||||
dest = Util.CellContaining(_target.CenterLocation),
|
dest = pos.ToInt2(),
|
||||||
srcAltitude = altitude,
|
srcAltitude = altitude,
|
||||||
destAltitude = altitude,
|
destAltitude = altitude,
|
||||||
firedBy = attacker,
|
firedBy = attacker,
|
||||||
target = _target,
|
target = Target.FromPos(pos),
|
||||||
weapon = Rules.Weapons[ weapontype.ToLowerInvariant() ],
|
weapon = Rules.Weapons[ weapontype.ToLowerInvariant() ],
|
||||||
facing = 0
|
facing = 0
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace OpenRA.Mods.RA
|
|||||||
|
|
||||||
public override void Activate(Actor collector)
|
public override void Activate(Actor collector)
|
||||||
{
|
{
|
||||||
Combat.DoExplosion(self, (info as ExplodeCrateActionInfo).Weapon, Target.FromActor(collector), 0);
|
Combat.DoExplosion(self, (info as ExplodeCrateActionInfo).Weapon, collector.CenterLocation, 0);
|
||||||
base.Activate(collector);
|
base.Activate(collector);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ namespace OpenRA.Mods.RA.Effects
|
|||||||
void Explode(World world)
|
void Explode(World world)
|
||||||
{
|
{
|
||||||
world.AddFrameEndTask(w => w.Remove(this));
|
world.AddFrameEndTask(w => w.Remove(this));
|
||||||
Combat.DoExplosion(silo.Owner.PlayerActor, weapon, Target.FromPos(pos), 0);
|
Combat.DoExplosion(silo.Owner.PlayerActor, weapon, pos, 0);
|
||||||
world.WorldActor.traits.Get<ScreenShaker>().AddEffect(20, pos, 5);
|
world.WorldActor.traits.Get<ScreenShaker>().AddEffect(20, pos, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
var unit = self.traits.GetOrDefault<Unit>();
|
var unit = self.traits.GetOrDefault<Unit>();
|
||||||
var altitude = unit != null ? unit.Altitude : 0;
|
var altitude = unit != null ? unit.Altitude : 0;
|
||||||
Combat.DoExplosion(e.Attacker, weapon, Target.FromActor(self), altitude);
|
Combat.DoExplosion(e.Attacker, weapon, self.CenterLocation, altitude);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ namespace OpenRA.Mods.RA
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
var info = self.Info.Traits.Get<MineInfo>();
|
var info = self.Info.Traits.Get<MineInfo>();
|
||||||
Combat.DoExplosion(self, info.Weapon, Target.FromActor(crusher), 0);
|
Combat.DoExplosion(self, info.Weapon, crusher.CenterLocation, 0);
|
||||||
self.QueueActivity(new RemoveSelf());
|
self.QueueActivity(new RemoveSelf());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user