Fix paratroopers on heightmapped terrain
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user