Fixes getting random disconnect.
This commit is contained in:
@@ -35,7 +35,7 @@ namespace Game.Entities
|
|||||||
posX = x;
|
posX = x;
|
||||||
posY = y;
|
posY = y;
|
||||||
posZ = z;
|
posZ = z;
|
||||||
Orientation = o;
|
Orientation = NormalizeOrientation(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Position(Vector3 vector)
|
public Position(Vector3 vector)
|
||||||
|
|||||||
@@ -659,7 +659,7 @@ namespace Game.Entities
|
|||||||
|
|
||||||
void UpdateOrientation(float orientation)
|
void UpdateOrientation(float orientation)
|
||||||
{
|
{
|
||||||
Orientation = orientation;
|
SetOrientation(orientation);
|
||||||
if (IsVehicle())
|
if (IsVehicle())
|
||||||
GetVehicleKit().RelocatePassengers();
|
GetVehicleKit().RelocatePassengers();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ namespace Game.Movement
|
|||||||
{
|
{
|
||||||
Vector3 hermite;
|
Vector3 hermite;
|
||||||
spline.Evaluate_Derivative(point_Idx, u, out hermite);
|
spline.Evaluate_Derivative(point_Idx, u, out hermite);
|
||||||
orientation = (float)Math.Atan2(hermite.Y, hermite.X);
|
orientation = (float)MathF.Atan2(hermite.Y, hermite.X);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (splineflags.HasFlag(SplineFlag.Backward))
|
if (splineflags.HasFlag(SplineFlag.Backward))
|
||||||
|
|||||||
Reference in New Issue
Block a user