From 2e4901e78d6c7ea2c67a6dcbf47b9a13a7b2dba4 Mon Sep 17 00:00:00 2001 From: NepDisk Date: Fri, 5 Sep 2025 00:47:46 -0400 Subject: [PATCH] Fix new waypoints for legacy Lua if it manually sets the lap count Fixes mods like wipezones --- src/lua_playerlib.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lua_playerlib.c b/src/lua_playerlib.c index ef628ee42..ee90e99b0 100644 --- a/src/lua_playerlib.c +++ b/src/lua_playerlib.c @@ -1730,7 +1730,14 @@ static int player_set(lua_State *L) { UINT8 laps = (UINT8)luaL_checkinteger(L, 3); if (lua_compatmode) + { + if (!K_UsingLegacyCheckpoints()) + { + plr->pflags |= PF_TRUSTWAYPOINTS; + } + plr->laps = max(laps +1, 0); + } else plr->laps = laps; break;