mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Previously the handler ACKed with current position and ignored the velocity fields entirely (vcos/vsin/hspeed/vspeed were [[maybe_unused]]). The server expects the client to fly through the air on knockback — without simulation the player stays in place while the server models them as airborne, causing position desync and rubberbanding. Changes: - CameraController: add applyKnockBack(vcos, vsin, hspeed, vspeed) that sets knockbackHorizVel_ and launches verticalVelocity = -vspeed (server sends vspeed as negative for upward launches, matching TrinityCore) - Physics loop: each tick adds knockbackHorizVel_ to targetPos then applies exponential drag (KNOCKBACK_HORIZ_DRAG=4.5/s) until velocity < 0.05 u/s - GameHandler: parse all four fields, add KnockBackCallback, call it for the local player so the camera controller receives the impulse - Application: register the callback — routes server knockback to physics The existing ACK path is unchanged; the server gets position confirmation as before while the client now actually simulates the trajectory. |
||
|---|---|---|
| .. | ||
| character.hpp | ||
| entity.hpp | ||
| expansion_profile.hpp | ||
| game_handler.hpp | ||
| group_defines.hpp | ||
| inventory.hpp | ||
| opcode_aliases_generated.inc | ||
| opcode_enum_generated.inc | ||
| opcode_names_generated.inc | ||
| opcode_table.hpp | ||
| opcodes.hpp | ||
| packet_parsers.hpp | ||
| player.hpp | ||
| spell_defines.hpp | ||
| transport_manager.hpp | ||
| update_field_table.hpp | ||
| warden_crypto.hpp | ||
| warden_emulator.hpp | ||
| warden_memory.hpp | ||
| warden_module.hpp | ||
| world.hpp | ||
| world_packets.hpp | ||
| zone_manager.hpp | ||