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:
+37
-1
@@ -241,4 +241,40 @@ Player position: X=2048.00, Y=2048.00, Z=0.00, AngleZ=0.00
|
||||
- Add a player ID or client ID to transform packets.
|
||||
- Add timestamps to transform packets.
|
||||
- Have the server echo/broadcast transform packets to connected clients.
|
||||
- Add a fake test client before attempting a second Fallout 4 client.
|
||||
- Add a fake test client before attempting a second Fallout 4 client.
|
||||
|
||||
## 2026-05-31
|
||||
|
||||
### What Changed
|
||||
|
||||
- Added transform metadata for movement type, cell ID, and worldspace ID.
|
||||
- Updated transform packets to include `movementType`.
|
||||
- Added detection for cell changes and worldspace changes.
|
||||
- Updated the server to print the additional transform fields.
|
||||
|
||||
### What Worked
|
||||
|
||||
- Normal movement packets still send correctly.
|
||||
- Cell changes are detected and sent as `movementType=cell_change`.
|
||||
- Worldspace changes are detected and sent as `movementType=worldspace_change`.
|
||||
- Transform packets now include `cellId` and `worldspaceId`.
|
||||
- The server remains compatible with the expanded packet format.
|
||||
- The server handled client disconnects safely.
|
||||
|
||||
### What Broke
|
||||
|
||||
- Nothing recorded.
|
||||
|
||||
### Notes
|
||||
|
||||
- Example normal movement packet included `cellId=0000DD5F` and `worldspaceId=0000003C`.
|
||||
- Example cell change packet included `movementType=cell_change`.
|
||||
- Interior cell behavior should be verified later, especially whether `worldspaceId` should be null or inherited.
|
||||
|
||||
### Next Steps
|
||||
|
||||
- Add `playerId` to transform packets.
|
||||
- Add packet timestamps.
|
||||
- Add server-side client IDs.
|
||||
- Make the server broadcast transform packets to other connected clients.
|
||||
- Create a fake client to receive broadcast packets.
|
||||
Reference in New Issue
Block a user