You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-19 15:06:20 +00:00
Renderer: surface allowUnderpass on RoomSettingsData + composer
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.
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user