Include movement/cell/worldspace in transforms

Extend transform packets to carry movement metadata and optional cell/worldspace IDs. Public API updated (SendTransformPacket signature) and implementation now formats movementType, cellId and worldspaceId when present (buffer size increased and formatting safety checks added). Player tracking in main.cpp now computes PlayerLocation, detects cell/worldspace changes and large teleports (threshold 5000), sends immediate updates with movementType="cell_change"/"worldspace_change"/"teleport", and preserves last-sent state. Server logging updated to print movementType and extra fields. Dev log updated with an entry describing these changes.
This commit is contained in:
2026-05-31 18:59:22 +12:00
parent b24ce17751
commit 4d43ecfc6c
5 changed files with 208 additions and 16 deletions
+12 -1
View File
@@ -1,9 +1,20 @@
#pragma once
#include <cstdint>
namespace F4T::Networking
{
bool ConnectToLocalServer();
void DisconnectFromLocalServer();
bool IsConnectedToServer();
bool SendTransformPacket(float a_x, float a_y, float a_z, float a_angleZ);
bool SendTransformPacket(
float a_x,
float a_y,
float a_z,
float a_angleZ,
const char* a_movementType,
bool a_hasCellId = false,
std::uint32_t a_cellId = 0,
bool a_hasWorldspaceId = false,
std::uint32_t a_worldspaceId = 0);
}