feat(messages): read ModifyGhostingDistance

LWOCharacterComponent sends ModifyGhostingDistance (1485: an optional
fDistanceScalar, default 1) on load. All 239 live packets were
the single byte 00 (default scale), so there is nothing for the server to
change; it was logged as an unknown game message. It is now read and
ignored.

Check in game: nothing changes; the world server log no longer has
"Received Unknown GM ... 1485" on each load.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-29 03:25:15 -05:00
parent 3672b64dec
commit 3c7f93dac4
4 changed files with 32 additions and 0 deletions

View File

@@ -12,6 +12,7 @@
#include "Entity.h"
#include "InventoryComponent.h"
#include "InventoryMessages.h"
#include "MovementMessages.h"
#include "PlayerMessages.h"
#include <memory>
@@ -144,3 +145,13 @@ TEST_F(ClientMessagesTests, ResyncEquipmentResendsTheEquipment) {
ASSERT_TRUE(resent.Read(equipmentSent));
EXPECT_TRUE(equipmentSent);
}
// ModifyGhostingDistance (1485): an optional scale, default 1. Every one of the 239 live packets was the default.
TEST_F(ClientMessagesTests, ModifyGhostingDistanceMatchesLiveCapture) {
auto msg = FromLiveClientCapture<GameMessages::ModifyGhostingDistance>(std::string(PLAYER_HEADER) + "cd05" + "00");
EXPECT_EQ(msg.fDistanceScalar, 1.0f);
msg.fDistanceScalar = 0.5f;
EXPECT_EQ(RoundTrip(msg).fDistanceScalar, 0.5f);
ExpectTruncatedFails(msg);
msg.Handle(*player, UNASSIGNED_SYSTEM_ADDRESS); // nothing to do
}