smooth unit-movement. Doesn't look right yet, but it's getting there.
This commit is contained in:
@@ -43,5 +43,15 @@ namespace OpenRa.Game.Traits
|
||||
return highest * 8;
|
||||
}
|
||||
|
||||
public static int GetNearestFacing( int facing, int desiredFacing )
|
||||
{
|
||||
var turn = desiredFacing - facing;
|
||||
if( turn > 128 )
|
||||
turn -= 256;
|
||||
if( turn < -128 )
|
||||
turn += 256;
|
||||
|
||||
return facing + turn;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user