moved helper functions out of Game, into WorldUtils

This commit is contained in:
Bob
2010-01-18 02:46:22 +13:00
parent 6f0c2c5a5d
commit ab1abee843
31 changed files with 176 additions and 163 deletions

View File

@@ -15,8 +15,8 @@ namespace OpenRa
{
var targetTile = ((1f / Game.CellSize) * loc.ToFloat2()).ToInt2();
var isWater = Game.IsWater(targetTile);
var hitWater = Game.IsCellBuildable(targetTile, UnitMovementType.Float);
var isWater = Game.world.IsWater(targetTile);
var hitWater = Game.world.IsCellBuildable(targetTile, UnitMovementType.Float);
if (warhead.Explosion != 0)
Game.world.AddFrameEndTask(
@@ -31,7 +31,7 @@ namespace OpenRa
if (warhead.Ore) Ore.Destroy(targetTile.X, targetTile.Y);
var maxSpread = GetMaximumSpread(weapon, warhead);
var hitActors = Game.FindUnitsInCircle(loc, maxSpread);
var hitActors = Game.world.FindUnitsInCircle(loc, maxSpread);
foreach (var victim in hitActors)
victim.InflictDamage(firedBy, (int)GetDamageToInflict(victim, loc, weapon, warhead), warhead);