Forgot to change variable name.

This commit is contained in:
Harrison Deng 2020-07-12 13:27:17 -05:00
parent dd0daa091d
commit b704797d47

View File

@ -234,14 +234,14 @@ namespace WebsiteSim.States
serverTargetPos = cursorWidthScale * Mouse.X;
}
if (serverTargetPos < server.CenterX - 0.02f)
if (serverTargetPos < serverEntity.CenterX - 0.02f)
{
server.CenterX -= ((float)timeStep * server.Speed);
if (server.CenterX < serverTargetPos - 0.02f) server.CenterX = serverTargetPos - 0.02f;
} else if (serverTargetPos > server.CenterX + 0.02f)
serverEntity.CenterX -= ((float)timeStep * serverEntity.Speed);
if (serverEntity.CenterX < serverTargetPos - 0.02f) serverEntity.CenterX = serverTargetPos - 0.02f;
} else if (serverTargetPos > serverEntity.CenterX + 0.02f)
{
server.CenterX += ((float)timeStep * server.Speed);
if (server.CenterX > serverTargetPos + 0.02f) server.CenterX = serverTargetPos + 0.02f;
serverEntity.CenterX += ((float)timeStep * serverEntity.Speed);
if (serverEntity.CenterX > serverTargetPos + 0.02f) serverEntity.CenterX = serverTargetPos + 0.02f;
}
#endregion
#region WarningCleanup