Core/Vehicle: Improved the position fix when changing vehicle from 5eb22e5b64
Thanks Shauren
This commit is contained in:
1 parent
faf9f481ef
commit
d0f4526d71
3 files changed
+6
-2
No files matched your search
@@ -71,10 +71,11 @@ namespace Movement
|
||||
real_position.z = unit.GetTransOffsetZ();
|
||||
real_position.orientation = unit.GetTransOffsetO();
|
||||
}
|
||||
|
||||
// there is a big chance that current position is unknown if current state is not finalized, need compute it
|
||||
// this also allows calculate spline position and update map position in much greater intervals
|
||||
// Don't compute for transport movement. The unit could be in a motion between two transports, thus having transport moveflag but is resulting in regular positions
|
||||
else if (!move_spline.Finalized())
|
||||
// Don't compute for transport movement if the unit is in a motion between two transports
|
||||
if (!move_spline.Finalized() && move_spline.onTransport == transport)
|
||||
real_position = move_spline.ComputePosition();
|
||||
|
||||
// should i do the things that user should do? - no.
|
||||
@@ -84,6 +85,7 @@ namespace Movement
|
||||
// corrent first vertex
|
||||
args.path[0] = real_position;
|
||||
args.initialOrientation = real_position.orientation;
|
||||
move_spline.onTransport = transport;
|
||||
|
||||
uint32 moveFlags = unit.m_movementInfo.GetMovementFlags();
|
||||
if (args.flags.walkmode)
|
||||
|
||||
Reference in new issue
Block a user