Merge pull request #6030 from UberWaffe/CustomWarheads
Custom Warheads refactor
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using OpenRA.Effects;
|
||||
using OpenRA.GameRules;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Mods.RA;
|
||||
using OpenRA.Traits;
|
||||
@@ -44,7 +45,8 @@ namespace OpenRA.Mods.Cnc.Effects
|
||||
void Finish(World world)
|
||||
{
|
||||
world.AddFrameEndTask(w => w.Remove(this));
|
||||
Combat.DoExplosion(firedBy.PlayerActor, weapon, target.CenterPosition);
|
||||
var weapon = world.Map.Rules.Weapons[this.weapon.ToLowerInvariant()];
|
||||
weapon.Impact(target.CenterPosition, firedBy.PlayerActor, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
using System.Linq;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.Mods.RA;
|
||||
using OpenRA.GameRules;
|
||||
|
||||
namespace OpenRA.Mods.Cnc
|
||||
{
|
||||
@@ -42,8 +43,7 @@ namespace OpenRA.Mods.Cnc
|
||||
if (!info.Resources.Contains(r.Info.Name)) return;
|
||||
|
||||
var weapon = self.World.Map.Rules.Weapons[info.Weapon.ToLowerInvariant()];
|
||||
|
||||
self.InflictDamage(self.World.WorldActor, weapon.Warheads[0].Damage, weapon.Warheads[0]);
|
||||
weapon.Impact(self.CenterPosition, self.World.WorldActor, 1f);
|
||||
poisonTicks = weapon.ROF;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user