removing a bunch of excessively low-level pixel -> cell conversions

This commit is contained in:
Chris Forbes
2010-06-23 17:53:46 +12:00
committed by Paul Chote
parent 2dcc85f608
commit b8093b7f6c
15 changed files with 26 additions and 26 deletions

View File

@@ -98,7 +98,7 @@ namespace OpenRA.Effects
{
var at = (float)t / TotalTime();
var pos = float2.Lerp(Args.src, Args.dest, at);
var cell = ((1f/Game.CellSize) * pos).ToInt2();
var cell = Traits.Util.CellContaining(pos);
if (world.WorldActor.traits.Get<UnitInfluence>().GetUnitsAt(cell).Any(
a => a.traits.Contains<IBlocksBullets>()))

View File

@@ -113,7 +113,7 @@ namespace OpenRA.Effects
if (!Info.High) // check for hitting a wall
{
var cell = ((1f / Game.CellSize) * Pos).ToInt2();
var cell = Traits.Util.CellContaining(Pos);
if (world.WorldActor.traits.Get<UnitInfluence>().GetUnitsAt(cell).Any(
a => a.traits.Contains<IBlocksBullets>()))