(935f68e00) Fix characters waiting when they shouldn't after being left uncontrolled by the player.

This commit is contained in:
Joonas Rikkonen
2019-05-16 06:57:50 +03:00
parent b97ecddf03
commit 3fc539d373
11 changed files with 137 additions and 695 deletions
@@ -1145,6 +1145,15 @@ namespace Barotrauma
SmoothedCursorPosition = cursorPosition - smoothedCursorDiff;
}
if (!(this is AICharacter) || Controlled == this || IsRemotePlayer)
{
//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;