Merge pull request #11889 from pchote/fix-turn-crash

Disable smooth turning for 180 degree turns.
This commit is contained in:
reaperrr
2016-08-27 16:40:08 +02:00
committed by GitHub

View File

@@ -312,7 +312,8 @@ namespace OpenRA.Mods.Common.Activities
MoveFractionTotal = (to - from).Length;
// Calculate an elliptical arc that joins from and to
if (fromFacing != toFacing)
var delta = Util.NormalizeFacing(fromFacing - toFacing);
if (delta != 0 && delta != 128)
{
// The center of rotation is where the normal vectors cross
var u = new WVec(1024, 0, 0).Rotate(WRot.FromFacing(fromFacing));