Revert "Fix crushables and crates causing HPF to crash."
This reverts commit 5765e51c56.
This commit is contained in:
@@ -183,22 +183,16 @@ namespace OpenRA.Mods.Common.Traits
|
||||
// Sets the location (Location) and position (CenterPosition)
|
||||
public void SetPosition(Actor self, WPos pos)
|
||||
{
|
||||
// HACK: Call SetCenterPosition before SetLocation
|
||||
// So when SetLocation calls ActorMap.CellUpdated
|
||||
// the listeners see the new CenterPosition.
|
||||
var cell = self.World.Map.CellContaining(pos);
|
||||
SetCenterPosition(self, self.World.Map.CenterOfCell(cell) + new WVec(WDist.Zero, WDist.Zero, self.World.Map.DistanceAboveTerrain(pos)));
|
||||
SetLocation(self, cell);
|
||||
SetCenterPosition(self, self.World.Map.CenterOfCell(cell) + new WVec(WDist.Zero, WDist.Zero, self.World.Map.DistanceAboveTerrain(pos)));
|
||||
}
|
||||
|
||||
// Sets the location (Location) and position (CenterPosition)
|
||||
public void SetPosition(Actor self, CPos cell, SubCell subCell = SubCell.Any)
|
||||
{
|
||||
// HACK: Call SetCenterPosition before SetLocation
|
||||
// So when SetLocation calls ActorMap.CellUpdated
|
||||
// the listeners see the new CenterPosition.
|
||||
SetCenterPosition(self, self.World.Map.CenterOfCell(cell));
|
||||
SetLocation(self, cell);
|
||||
SetCenterPosition(self, self.World.Map.CenterOfCell(cell));
|
||||
}
|
||||
|
||||
// Sets only the CenterPosition
|
||||
|
||||
Reference in New Issue
Block a user