Skip to content

Commit

Permalink
make updateRoomParams use long string
Browse files Browse the repository at this point in the history
  • Loading branch information
onlypuppy7 committed Nov 19, 2024
1 parent c5af09f commit 818a5fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server-client/src/client-static/src/shellshock.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ const LegacyShellOnMessage = async function (msg) {
if (cmd !== Comm.Code.sync && cmd !== Comm.Code.syncData && cmd !== Comm.Code.ping) devlog("received cmd: ", Comm.Convert(cmd), msg);
switch (cmd) {
case Comm.Code.updateRoomParams:
var roomParams = input.unPackString();
var roomParams = input.unPackLongString();
var roomParamsObj = JSON.parse(roomParams);
devlog("updateRoomParams", roomParamsObj);

Expand Down
2 changes: 1 addition & 1 deletion server-game/src/rooms.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export class newRoom {
time: this.gameOptions.time,
plugins: this.gameOptions.plugins,
};
output.packString(JSON.stringify(gameOptions)); //is this technically bloated? yes, but its the only way i can do this such that adding new options is easy
output.packLongString(JSON.stringify(gameOptions)); //is this technically bloated? yes, but its the only way i can do this such that adding new options is easy
plugins.emit('packUpdateRoomParamsEnd', {this: this, output});
};

Expand Down

0 comments on commit 818a5fe

Please sign in to comment.