Archived repository for WoW 4.3.4.15595. The project will be reworked for Cataclysm Classic as an official new branch of TrinityCore at https://github.com/TrinityCore/TrinityCore
GNU General Public License v2.0
239
stars
97
forks
source link
Possible problem with MapTransport::BuildUpdate #363
Server modifies update fields (SetXXXValue for example)
If object is in world and not updated (m_objectUpdated = false) AddToObjectUpdate will be called. This will add object in _updateObjects container in Map class
m_objectUpdated is set to true
SendObjectUpdates is called
For every object in list BuildUpdate is executed
ClearUpdateMask is called from BuildUpdate and m_objectUpdated is set to false, meaning that this update cycle is finished
_updateObjects now empty
basically m_objectUpdated is used to protect object from being added to update queue more than once during one update cycle
What happening with transport
Step 1-5 is the same, but 6.
If there is no player on the map "return" statement will prevent ClearUpdateMask from being executed leaving this object with m_objectUpdated = true.
So next time you will try to modify fields (toggling move state for example) updates will not seeded to client, because server thinks that object is still in update queue (see step 1)
Description:
There is possible issue with this return https://github.com/The-Cataclysm-Preservation-Project/TrinityCore/blob/master/src/server/game/Entities/Transport/Transport.cpp#L1145
What the problem?
basically m_objectUpdated is used to protect object from being added to update queue more than once during one update cycle
What happening with transport Step 1-5 is the same, but 6. If there is no player on the map "return" statement will prevent ClearUpdateMask from being executed leaving this object with m_objectUpdated = true.
So next time you will try to modify fields (toggling move state for example) updates will not seeded to client, because server thinks that object is still in update queue (see step 1)