From ef6c66105851fddbf7f9a686f64a14eb8b74d93c Mon Sep 17 00:00:00 2001 From: simoleo89 Date: Mon, 11 May 2026 21:46:36 +0200 Subject: [PATCH] Renderer: surface allowUnderpass on RoomSettingsData + composer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Arcturus' RoomSettingsComposer appends an extra int at the end of the payload — room.isAllowUnderpass() ? 1 : 0 — and RoomSettingsSaveEvent optionally reads back a boolean at the end (if bytesAvailable > 0). The renderer side never modeled this trailing field, so the client couldn't surface or persist it. - RoomSettingsData: add _allowUnderpass field + getter/setter + propagation through the .from() copy. - RoomSettingsDataParser: read one trailing int after the moderation settings, guarded by 'if(wrapper.bytesAvailable)' so older servers that don't emit it keep parsing cleanly. - SaveRoomSettingsComposer: optional trailing allowUnderpass arg. The server's optional-read guard tolerates 24-arg or 25-arg payloads, so callers that don't care about the field still send the legacy shape. Cross-repo reference points: - Arcturus emit side: Emulator/src/main/java/com/eu/habbo/messages/ outgoing/rooms/RoomSettingsComposer.java line 55. - Arcturus read side: Emulator/src/main/java/com/eu/habbo/messages/ incoming/rooms/RoomSettingsSaveEvent.java lines 133-135. Net client tsgo error count: 3 -> 0 on the NavigatorRoomSettings cluster. --- .../outgoing/room/data/SaveRoomSettingsComposer.ts | 5 ++++- .../messages/parser/roomsettings/RoomSettingsData.ts | 12 ++++++++++++ .../parser/roomsettings/RoomSettingsDataParser.ts | 4 ++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/packages/communication/src/messages/outgoing/room/data/SaveRoomSettingsComposer.ts b/packages/communication/src/messages/outgoing/room/data/SaveRoomSettingsComposer.ts index 8b69492..a941b60 100644 --- a/packages/communication/src/messages/outgoing/room/data/SaveRoomSettingsComposer.ts +++ b/packages/communication/src/messages/outgoing/room/data/SaveRoomSettingsComposer.ts @@ -32,7 +32,8 @@ implements chatBubbleWeight: number, chatBubbleSpeed: number, chatDistance: number, - chatFloodProtection: number + chatFloodProtection: number, + allowUnderpass?: boolean ) { //@ts-ignore @@ -67,6 +68,8 @@ implements chatDistance, chatFloodProtection ); + + if(allowUnderpass !== undefined) this._data.push(allowUnderpass); } public getMessageArray() diff --git a/packages/communication/src/messages/parser/roomsettings/RoomSettingsData.ts b/packages/communication/src/messages/parser/roomsettings/RoomSettingsData.ts index 4384e5e..c558d17 100644 --- a/packages/communication/src/messages/parser/roomsettings/RoomSettingsData.ts +++ b/packages/communication/src/messages/parser/roomsettings/RoomSettingsData.ts @@ -37,6 +37,7 @@ export class RoomSettingsData private _roomModerationSettings: RoomModerationSettings = null; private _chatSettings: RoomChatSettings = null; private _allowNavigatorDynamicCats: boolean = false; + private _allowUnderpass: boolean = false; public static from(settings: RoomSettingsData) { @@ -65,6 +66,7 @@ export class RoomSettingsData instance._roomModerationSettings = settings._roomModerationSettings; instance._chatSettings = settings._chatSettings; instance._allowNavigatorDynamicCats = settings._allowNavigatorDynamicCats; + instance._allowUnderpass = settings._allowUnderpass; return instance; } @@ -329,4 +331,14 @@ export class RoomSettingsData { this._allowNavigatorDynamicCats = flag; } + + public get allowUnderpass(): boolean + { + return this._allowUnderpass; + } + + public set allowUnderpass(flag: boolean) + { + this._allowUnderpass = flag; + } } diff --git a/packages/communication/src/messages/parser/roomsettings/RoomSettingsDataParser.ts b/packages/communication/src/messages/parser/roomsettings/RoomSettingsDataParser.ts index ed02587..45a9650 100644 --- a/packages/communication/src/messages/parser/roomsettings/RoomSettingsDataParser.ts +++ b/packages/communication/src/messages/parser/roomsettings/RoomSettingsDataParser.ts @@ -49,6 +49,10 @@ export class RoomSettingsDataParser implements IMessageParser this._roomSettingsData.allowNavigatorDynamicCats = wrapper.readBoolean(); this._roomSettingsData.roomModerationSettings = new RoomModerationSettings(wrapper); + // Custom Arcturus extension: trailing int (0/1) for the underpass toggle. + // Older servers may not emit it; default stays false when absent. + if(wrapper.bytesAvailable) this._roomSettingsData.allowUnderpass = (wrapper.readInt() === 1); + return true; }