From 2fd435c121d77a7e4192b606f2b0906b0d8e36a8 Mon Sep 17 00:00:00 2001 From: Alug Date: Sat, 21 Jun 2025 22:37:36 +0200 Subject: [PATCH] this makes no sense lol --- src/lua_hudlib.c | 6 ++---- src/r_draw.h | 11 +++++------ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/lua_hudlib.c b/src/lua_hudlib.c index 189e19129..b0e68a76e 100644 --- a/src/lua_hudlib.c +++ b/src/lua_hudlib.c @@ -1013,10 +1013,8 @@ static int libd_getColormap(lua_State *L) else if (lua_type(L, 1) == LUA_TNUMBER) // skin number { skinnum = (INT32)luaL_checkinteger(L, 1); - if (skinnum >= MAXSKINS) - return luaL_error(L, "skin number %d is out of range (>%d)", skinnum, MAXSKINS-1); - else if (skinnum < 0 && skinnum > TC_DEFAULT) - return luaL_error(L, "translation colormap index is out of range"); + if (skinnum < TC_BLINK || skinnum >= MAXSKINS) + return luaL_error(L, "skin number %d is out of range (%d - %d)", skinnum, TC_BLINK, MAXSKINS-1); } else // skin name { diff --git a/src/r_draw.h b/src/r_draw.h index 32e8a0b09..08342853b 100644 --- a/src/r_draw.h +++ b/src/r_draw.h @@ -182,12 +182,11 @@ extern lumpnum_t viewborderlump[8]; enum { - TC_BOSS = INT8_MIN, - TC_METALSONIC, // For Metal Sonic battle - TC_ALLWHITE, // For Cy-Brak-demon - TC_RAINBOW, // For single colour - TC_BLINK, // For item blinking, according to kart - + TC_BLINK = -6, // For item blinking, according to kart + TC_RAINBOW, // For single colour + TC_ALLWHITE, // For Cy-Brak-demon + TC_METALSONIC, // For Metal Sonic battle + TC_BOSS, TC_DEFAULT };