mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-14 16:33:52 +00:00
debug: log pre-cast facing orientation details
This commit is contained in:
parent
4ff59c6f76
commit
7f3c7379b5
1 changed files with 7 additions and 1 deletions
|
|
@ -311,7 +311,13 @@ void SpellHandler::castSpell(uint32_t spellId, uint64_t targetGuid) {
|
|||
float dy = entity->getY() - owner_.movementInfo.y;
|
||||
float lenSq = dx * dx + dy * dy;
|
||||
if (lenSq > 0.01f) {
|
||||
owner_.movementInfo.orientation = std::atan2(dy, dx);
|
||||
float canonYaw = std::atan2(dy, dx);
|
||||
float serverYaw = core::coords::canonicalToServerYaw(canonYaw);
|
||||
owner_.movementInfo.orientation = canonYaw;
|
||||
LOG_WARNING("Pre-cast facing: target=(", entity->getX(), ",", entity->getY(),
|
||||
") me=(", owner_.movementInfo.x, ",", owner_.movementInfo.y,
|
||||
") canonYaw=", canonYaw, " serverYaw=", serverYaw,
|
||||
" dx=", dx, " dy=", dy);
|
||||
owner_.sendMovement(Opcode::MSG_MOVE_SET_FACING);
|
||||
owner_.sendMovement(Opcode::MSG_MOVE_HEARTBEAT);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue