much simpler rules loader
This commit is contained in:
@@ -27,7 +27,7 @@ using OpenRA.FileFormats;
|
||||
|
||||
namespace OpenRA
|
||||
{
|
||||
static class Combat /* some utility bits that are shared between various things */
|
||||
public static class Combat /* some utility bits that are shared between various things */
|
||||
{
|
||||
static string GetImpactSound(WarheadInfo warhead, bool isWater)
|
||||
{
|
||||
@@ -82,6 +82,23 @@ namespace OpenRA
|
||||
}
|
||||
}
|
||||
|
||||
public static void DoExplosion(Actor attacker, string weapontype, int2 location, int altitude)
|
||||
{
|
||||
var args = new ProjectileArgs
|
||||
{
|
||||
src = location,
|
||||
dest = location,
|
||||
srcAltitude = altitude,
|
||||
destAltitude = altitude,
|
||||
firedBy = attacker,
|
||||
target = null,
|
||||
weapon = Rules.Weapons[ weapontype.ToLowerInvariant() ],
|
||||
facing = 0
|
||||
};
|
||||
|
||||
DoImpacts(args, location);
|
||||
}
|
||||
|
||||
static float GetDamageToInflict(Actor target, ProjectileArgs args, WarheadInfo warhead, float modifier)
|
||||
{
|
||||
var distance = (target.CenterLocation - args.dest).Length;
|
||||
|
||||
Reference in New Issue
Block a user