Merge pull request #8691 from Mailaender/wrange-renamings

Renamed WRange to WDist in the Lua API and documentation
This commit is contained in:
Oliver Brakmann
2015-07-09 23:03:45 +02:00
24 changed files with 51 additions and 38 deletions

View File

@@ -56,7 +56,7 @@ namespace OpenRA.Mods.D2k.Traits
public void RequestTransport(CPos destination, Activity afterLandActivity)
{
var destPos = self.World.Map.CenterOfCell(destination);
if (destination == CPos.Zero || (self.CenterPosition - destPos).LengthSquared < info.MinDistance.RangeSquared)
if (destination == CPos.Zero || (self.CenterPosition - destPos).LengthSquared < info.MinDistance.LengthSquared)
{
WantsTransport = false; // Be sure to cancel any pending transports
return;
@@ -122,7 +122,7 @@ namespace OpenRA.Mods.D2k.Traits
return false;
var destPos = self.World.Map.CenterOfCell(Destination);
if ((self.CenterPosition - destPos).LengthSquared < info.MinDistance.RangeSquared)
if ((self.CenterPosition - destPos).LengthSquared < info.MinDistance.LengthSquared)
{
MovementCancelled(self);
return false;
@@ -150,7 +150,7 @@ namespace OpenRA.Mods.D2k.Traits
// Last change to change our mind...
var destPos = self.World.Map.CenterOfCell(Destination);
if ((self.CenterPosition - destPos).LengthSquared < info.MinDistance.RangeSquared)
if ((self.CenterPosition - destPos).LengthSquared < info.MinDistance.LengthSquared)
{
MovementCancelled(self);
return false;