From 81d5b23d801298e2083ec0bec33d3f7e31893ae7 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Thu, 6 Feb 2025 22:59:52 -0800 Subject: [PATCH] fix $next on proxy server --- src/ChatCommands.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChatCommands.cc b/src/ChatCommands.cc index b50ede13..e1a2f55a 100644 --- a/src/ChatCommands.cc +++ b/src/ChatCommands.cc @@ -1527,7 +1527,12 @@ ChatCommandDefinition cc_next( if (!a.ses->is_in_game) { throw precondition_failed("$C6You must be in a\ngame to use this\ncommand"); } - send_warp(a.ses->client_channel, a.ses->lobby_client_id, a.ses->floor, true); + + size_t limit = floor_limit_for_episode(a.ses->lobby_episode); + if (limit == 0) { + return; + } + send_warp(a.ses->client_channel, a.ses->lobby_client_id, (a.ses->floor + 1) % limit, true); }); ChatCommandDefinition cc_password(