mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Fix movement packet format: write fallTime unconditionally
AzerothCore's ReadMovementInfo always reads fallTime regardless of flags. Also write all four jump fields together when FALLING (remove nested FALLINGFAR check), and use real millisecond timestamps via steady_clock.
This commit is contained in:
parent
3043cc5203
commit
b5336d784a
2 changed files with 19 additions and 16 deletions
|
|
@ -2251,8 +2251,11 @@ void GameHandler::sendMovement(Opcode opcode) {
|
|||
return;
|
||||
}
|
||||
|
||||
// Update movement time
|
||||
movementInfo.time = ++movementTime;
|
||||
// Use real millisecond timestamp (server validates for anti-cheat)
|
||||
static auto startTime = std::chrono::steady_clock::now();
|
||||
auto now = std::chrono::steady_clock::now();
|
||||
movementInfo.time = static_cast<uint32_t>(
|
||||
std::chrono::duration_cast<std::chrono::milliseconds>(now - startTime).count());
|
||||
|
||||
// Update movement flags based on opcode
|
||||
switch (opcode) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue