debug: log outgoing heartbeat coords and chat, fix BG filter for SAY type

Heartbeat: log canonical + wire coords every 30th heartbeat to detect
if we're sending wrong position (causing server to teleport us).

Chat: log outgoing messages at WARNING level to confirm packets are sent.

BG filter: announcer uses SAY (type=0) with color codes, not SYSTEM.
Match "BG Queue Announcer" in message body regardless of chat type.
This commit is contained in:
Kelsi 2026-03-28 16:02:36 -07:00
parent 91c6eef967
commit f74b79f1f8
2 changed files with 12 additions and 6 deletions

View file

@ -654,6 +654,13 @@ void MovementHandler::sendMovement(Opcode opcode) {
wireInfo.y = serverPos.y;
wireInfo.z = serverPos.z;
// Log outgoing position periodically to detect coordinate bugs
static int heartbeatLogCounter = 0;
if (opcode == Opcode::MSG_MOVE_HEARTBEAT && ++heartbeatLogCounter % 30 == 0) {
LOG_WARNING("HEARTBEAT pos canonical=(", movementInfo.x, ",", movementInfo.y, ",", movementInfo.z,
") wire=(", wireInfo.x, ",", wireInfo.y, ",", wireInfo.z, ")");
}
wireInfo.orientation = core::coords::canonicalToServerYaw(wireInfo.orientation);
if (includeTransportInWire) {