(bfd04acda) Fixed compiler error on Mac (I think)?

This commit is contained in:
Joonas Rikkonen
2019-05-16 06:47:58 +03:00
parent 53d78d2a2a
commit a4bb8efa79
12 changed files with 182 additions and 262 deletions
@@ -1158,6 +1158,19 @@ namespace Barotrauma
SmoothedCursorPosition = cursorPosition - smoothedCursorDiff;
}
if (!(this is AICharacter) || Controlled == this || IsRemotePlayer)
{
SmoothedCursorPosition = cursorPosition;
}
else
{
//apply some smoothing to the cursor positions of remote players when playing as a client
//to make aiming look a little less choppy
Vector2 smoothedCursorDiff = cursorPosition - SmoothedCursorPosition;
smoothedCursorDiff = NetConfig.InterpolateCursorPositionError(smoothedCursorDiff);
SmoothedCursorPosition = cursorPosition - smoothedCursorDiff;
}
if (!(this is AICharacter) || Controlled == this || IsRemotePlayer)
{
if (speedMultipliers.Count == 0) return 1f;