fix(wire): PlaceModelResponse writes the model's rotation

The client's PlaceModelResponse::Deserialize (0x00dc0170) reads the rotation
as an optional w, x, y, z quaternion, but DLU wrote the 4-byte response
after the rotation flag. With any rotation other than identity the client
ran out of data. A live capture of a model turned 90 degrees shows the
server echoing the rotation the client placed it with. Bytes only change
when the rotation is not identity; a golden test pins the new layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-27 04:03:43 -05:00
parent 6d430881b9
commit dd16c67177
4 changed files with 24 additions and 15 deletions

View File

@@ -298,9 +298,7 @@ namespace GameMessages {
BitStreamUtils::WriteOptional(bitStream, position, NiPoint3Constant::ZERO);
BitStreamUtils::WriteOptional(bitStream, propertyPlaqueID, LWOOBJID_EMPTY);
BitStreamUtils::WriteOptional(bitStream, response, 0);
// WIRE BUG (kept, see the struct): the value written after rotation's flag is response, not rotation.
bitStream.Write(rotation != QuatUtils::IDENTITY);
if (rotation != QuatUtils::IDENTITY) bitStream.Write(response);
BitStreamUtils::WriteOptional(bitStream, rotation, QuatUtils::IDENTITY);
}
bool PlaceModelResponse::Deserialize(RakNet::BitStream& bitStream) {