Core/Transports: Fixed stoppable elevator position calculation when going from first floor to third or higher
# Conflicts: # src/server/game/Entities/GameObject/GameObject.cpp
This commit is contained in:
1 parent
aa0b4ab7f5
commit
acb599823e
1 file changed
+6
-1
@@ -286,7 +286,12 @@ public:
|
||||
if (oldToNewStateDelta < 0)
|
||||
oldToNewStateDelta += pauseTimesCount + 1;
|
||||
|
||||
if (oldToNewStateDelta < newToOldStateDelta)
|
||||
// this additional check is neccessary because client doesn't check dynamic flags on progress update
|
||||
// instead it multiplies progress from dynamicflags field by -1 and then compares that against 0
|
||||
// when calculating path progress while we simply check the flag if (!_owner.HasDynamicFlag(GO_DYNFLAG_LO_INVERTED_MOVEMENT))
|
||||
bool isAtStartOfPath = _stateChangeProgress == 0;
|
||||
|
||||
if (oldToNewStateDelta < newToOldStateDelta && !isAtStartOfPath)
|
||||
_owner.SetFlag(GAMEOBJECT_DYNAMIC, GO_DYNFLAG_LO_INVERTED_MOVEMENT);
|
||||
else
|
||||
_owner.RemoveFlag(GAMEOBJECT_DYNAMIC, GO_DYNFLAG_LO_INVERTED_MOVEMENT);
|
||||
|
||||
Reference in new issue
Block a user