mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-11 23:33:50 +00:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user