From 52da5916220d82092d1bc93d3879d6a66b8d6494 Mon Sep 17 00:00:00 2001 From: Lactozilla Date: Sat, 5 Aug 2023 02:50:54 -0300 Subject: [PATCH] Update gametype_cons_t on gametype name changes --- src/g_game.c | 5 ----- src/lua_infolib.c | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index 713aca263..5cda49758 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -3569,11 +3569,6 @@ void G_AddGametypeConstant(INT16 gtype, const char *newgtconst) gametypes[gtype].constant_name = gtconst; } -// -// G_UpdateGametypeSelections -// -// Updates gametype_cons_t. -// void G_UpdateGametypeSelections(void) { INT32 i; diff --git a/src/lua_infolib.c b/src/lua_infolib.c index c475aefae..b070ef85d 100644 --- a/src/lua_infolib.c +++ b/src/lua_infolib.c @@ -1999,6 +1999,7 @@ static int gametype_set(lua_State *L) case gametype_name: Z_Free(gt->name); gt->name = Z_StrDup(luaL_checkstring(L, 3)); + G_UpdateGametypeSelections(); break; case gametype_rules: gt->rules = luaL_checkinteger(L, 3);