net: send CMSG_MOVE_FLIGHT_ACK in response to SMSG_MOVE_SET/UNSET_FLIGHT

SMSG_MOVE_SET_FLIGHT and SMSG_MOVE_UNSET_FLIGHT were previously consumed
silently without sending the required ack. Most server implementations
expect CMSG_MOVE_FLIGHT_ACK before toggling the FLYING movement flag on
the player; without it the server may not grant or revoke flight state.
Also updates movementInfo.flags so subsequent movement packets reflect
the FLYING flag correctly.
This commit is contained in:
Kelsi 2026-03-10 11:33:47 -07:00
parent 71cabddbd6
commit ca141bb131

View file

@ -5540,10 +5540,16 @@ void GameHandler::handlePacket(network::Packet& packet) {
case Opcode::SMSG_MOVE_SET_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY:
case Opcode::SMSG_MOVE_UNSET_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY:
case Opcode::SMSG_MOVE_SET_COLLISION_HGT:
case Opcode::SMSG_MOVE_SET_FLIGHT:
case Opcode::SMSG_MOVE_UNSET_FLIGHT:
packet.setReadPos(packet.getSize());
break;
case Opcode::SMSG_MOVE_SET_FLIGHT:
handleForceMoveFlagChange(packet, "SET_FLIGHT", Opcode::CMSG_MOVE_FLIGHT_ACK,
static_cast<uint32_t>(MovementFlags::FLYING), true);
break;
case Opcode::SMSG_MOVE_UNSET_FLIGHT:
handleForceMoveFlagChange(packet, "UNSET_FLIGHT", Opcode::CMSG_MOVE_FLIGHT_ACK,
static_cast<uint32_t>(MovementFlags::FLYING), false);
break;
default:
// In pre-world states we need full visibility (char create/login handshakes).