Fix paratroopers on heightmapped terrain

This commit is contained in:
abcdefg30
2016-04-02 11:36:31 +02:00
parent f38d30a1ff
commit d9d78715cd
2 changed files with 3 additions and 3 deletions

View File

@@ -54,7 +54,7 @@ namespace OpenRA.Mods.Common.Activities
Activity LastTick(Actor self)
{
pos.SetPosition(self, currentPosition - new WVec(0, 0, currentPosition.Z));
pos.SetPosition(self, currentPosition);
if (um != null)
foreach (var u in para.ParachuteUpgrade)
@@ -75,7 +75,7 @@ namespace OpenRA.Mods.Common.Activities
currentPosition -= fallVector;
// If the unit has landed, this will be the last tick
if (currentPosition.Z <= 0)
if (self.World.Map.DistanceAboveTerrain(currentPosition).Length <= 0)
return LastTick(self);
pos.SetVisualPosition(self, currentPosition);

View File

@@ -422,7 +422,7 @@ namespace OpenRA.Mods.Common.Traits
{
var cell = self.World.Map.CellContaining(pos);
SetLocation(cell, FromSubCell, cell, FromSubCell);
SetVisualPosition(self, self.World.Map.CenterOfSubCell(cell, FromSubCell) + new WVec(0, 0, pos.Z));
SetVisualPosition(self, self.World.Map.CenterOfSubCell(cell, FromSubCell) + new WVec(0, 0, self.World.Map.DistanceAboveTerrain(pos).Length));
FinishedMoving(self);
}