Correct aircraft repulsion direction when outside of the map.

This commit is contained in:
tovl
2020-05-15 13:34:55 +02:00
committed by reaperrr
parent 1ef27d18c1
commit e0357596f5

View File

@@ -427,7 +427,7 @@ namespace OpenRA.Mods.Common.Traits
// The map bounds are in projected coordinates, which is technically wrong for this,
// but we avoid the issues in practice by guessing the middle of the map instead of the edge
var center = WPos.Lerp(self.World.Map.ProjectedTopLeft, self.World.Map.ProjectedBottomRight, 1, 2);
repulsionForce += new WVec(1024, 0, 0).Rotate(WRot.FromYaw((self.CenterPosition - center).Yaw));
repulsionForce += new WVec(0, 1024, 0).Rotate(WRot.FromYaw((self.CenterPosition - center).Yaw));
}
if (Info.CanSlide)