Cam twitching fix? (untested)
This commit is contained in:
Binary file not shown.
@@ -148,8 +148,11 @@ namespace Barotrauma
|
|||||||
|
|
||||||
rotation = message.ReadFloat();
|
rotation = message.ReadFloat();
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
#if DEBUG
|
||||||
|
DebugConsole.ThrowError("Failed to read AICharacter update message", e);
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -186,15 +189,11 @@ namespace Barotrauma
|
|||||||
aiController.ReadNetworkData(message);
|
aiController.ReadNetworkData(message);
|
||||||
return;
|
return;
|
||||||
case NetworkEventType.EntityUpdate:
|
case NetworkEventType.EntityUpdate:
|
||||||
Vector2 targetMovement = Vector2.Zero;
|
|
||||||
bool targetDir = false;
|
|
||||||
|
|
||||||
if (sendingTime <= LastNetworkUpdate) return;
|
if (sendingTime <= LastNetworkUpdate) return;
|
||||||
|
|
||||||
bool inSub = false;
|
Vector2 targetMovement = Vector2.Zero, pos = Vector2.Zero;
|
||||||
|
bool targetDir = false,inSub = false;
|
||||||
Vector2 pos = Vector2.Zero, vel = Vector2.Zero;
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
targetDir = message.ReadBoolean();
|
targetDir = message.ReadBoolean();
|
||||||
@@ -204,14 +203,13 @@ namespace Barotrauma
|
|||||||
inSub = message.ReadBoolean();
|
inSub = message.ReadBoolean();
|
||||||
|
|
||||||
pos.X = message.ReadFloat();
|
pos.X = message.ReadFloat();
|
||||||
pos.Y = message.ReadFloat();
|
pos.Y = message.ReadFloat();
|
||||||
|
|
||||||
//vel.X = message.ReadFloat();
|
|
||||||
//vel.Y = message.ReadFloat();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
#if DEBUG
|
||||||
|
DebugConsole.ThrowError("Failed to read AICharacter update message", e);
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -232,6 +232,7 @@ namespace Barotrauma
|
|||||||
if (Character.Controlled != null) Character.Controlled.CursorPosition += displayerMoveAmount;
|
if (Character.Controlled != null) Character.Controlled.CursorPosition += displayerMoveAmount;
|
||||||
|
|
||||||
GameMain.GameScreen.Cam.Position += displayerMoveAmount;
|
GameMain.GameScreen.Cam.Position += displayerMoveAmount;
|
||||||
|
GameMain.GameScreen.Cam.UpdateTransform();
|
||||||
targetPosition = null;
|
targetPosition = null;
|
||||||
}
|
}
|
||||||
else if (dist > 50.0f)
|
else if (dist > 50.0f)
|
||||||
@@ -494,7 +495,6 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
|
|
||||||
Explosion.RangedStructureDamage(ConvertUnits.ToDisplayUnits(lastContactPoint), impact * 50.0f, impact * DamageMultiplier);
|
Explosion.RangedStructureDamage(ConvertUnits.ToDisplayUnits(lastContactPoint), impact * 50.0f, impact * DamageMultiplier);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user