Fix compile warnings

This commit is contained in:
NepDisk 2025-09-29 22:45:21 -04:00
parent 42173120f4
commit 837b28e358
5 changed files with 16 additions and 14 deletions

View file

@ -3847,7 +3847,7 @@ void G_AddGhost(char *defdemoname)
CLEANUP(Z_Pfree) char *pdemoname = NULL;
const char *n;
UINT64 demohash;
UINT32 raflags;
UINT32 ghostraflags;
demoghost *gh;
UINT8 flags;
CLEANUP(Z_Pfree) UINT8 *buffer = NULL;
@ -3911,7 +3911,7 @@ void G_AddGhost(char *defdemoname)
flags = header.demoflags;
raflags = header.raflags;
ghostraflags = header.raflags;
if (!(flags & DF_GHOST))
{
CONS_Alert(CONS_NOTICE, M_GetText("Ghost %s: No ghost data in this demo.\n"), pdemoname);
@ -3969,7 +3969,7 @@ void G_AddGhost(char *defdemoname)
ourraflags &= ~RAF_BUMPSPARKMASK;
}
if (ourraflags != raflags)
if (ourraflags != ghostraflags)
{
CONS_Alert(CONS_NOTICE, M_GetText("Failed to add ghost %s: Replay doesn't match current RA mode.\n"), pdemoname);
return;

View file

@ -5465,7 +5465,7 @@ static void K_drawDistributionDebugger(void)
INT32 i;
INT32 item;
INT32 x = -9, y = -9;
boolean dontforcespb = false;
//boolean dontforcespb = false;
boolean spbrush = false;
//if (stplyrnum != 0) // only for p1
@ -5477,8 +5477,8 @@ static void K_drawDistributionDebugger(void)
if (!playeringame[i] || players[i].spectator)
continue;
pingame++;
if (players[i].exiting)
dontforcespb = true;
//if (players[i].exiting)
//dontforcespb = true;
if (players[i].bumper > bestbumper)
bestbumper = players[i].bumper;
}
@ -5644,7 +5644,7 @@ static void K_SlipstreamIndicator(boolean tiny)
if (!cv_draftindicator.value)
return;
char *fullstr = "DRAFTING";
const char *fullstr = "DRAFTING";
char str[256] = {0};
SINT8 stringlen = strlen(fullstr);
SINT8 len = min(stplyr->draftpower / (FRACUNIT / stringlen), stringlen);

View file

@ -248,7 +248,7 @@ static void K_KartGetItemResult(player_t *player, SINT8 getitem)
player->itemamount = itemamount;
}
fixed_t K_ItemOddsScale(UINT8 numPlayers, boolean spbrush)
static fixed_t K_ItemOddsScale(UINT8 numPlayers, boolean spbrush)
{
// CEP: due to how baseplayer works, 17P+ lobbies will STILL have the disastrous odds of 0.22 prior, if not WORSE
// let's try adding another condition
@ -554,7 +554,7 @@ INT32 K_KartGetItemOdds(
indirectItem = true;
notNearEnd = true;
if (!K_UsingLegacyCheckpoints() && firstDist < ENDDIST) // No SPB near the end of the race
if (!K_UsingLegacyCheckpoints() && firstDist < (UINT32)ENDDIST) // No SPB near the end of the race
{
newodds = 0;
}
@ -620,7 +620,7 @@ INT32 K_KartGetItemOdds(
// This item should not appear at the beginning of a race. (Usually really powerful crowd-breaking items)
newodds = 0;
}
else if (!K_UsingLegacyCheckpoints() && (notNearEnd == true) && (ourDist < ENDDIST))
else if (!K_UsingLegacyCheckpoints() && (notNearEnd == true) && (ourDist < (UINT32)ENDDIST))
{
// This item should not appear at the end of a race. (Usually trap items that lose their effectiveness)
newodds = 0;
@ -1034,7 +1034,7 @@ static boolean K_CanForceSPB(player_t *player, UINT32 pdis)
boolean battlecond, racecond;
battlecond = ((gametyperules & GTR_WANTED) && (gametyperules & GTR_WANTEDSPB) && (mostwanted != -1) && (!K_IsPlayerMostWanted(player)));
racecond = ((gametyperules & GTR_CIRCUIT) && player->position == 2 && pdis > SPBFORCEDIST);
racecond = ((gametyperules & GTR_CIRCUIT) && player->position == 2 && pdis > (UINT32)SPBFORCEDIST);
return ((battlecond) || (racecond));
}

View file

@ -1890,8 +1890,10 @@ static int player_set(lua_State *L)
return NOSET;
case player_walltransfered:
plr->walltransfered = lua_toboolean(L, 3);
break;
case player_walltransferboost:
plr->walltransferboost= lua_tointeger(L, 3);
break;
#ifdef HWRENDER
case player_fovadd:
plr->fovadd = luaL_checkfixed(L, 3);

View file

@ -6282,7 +6282,7 @@ static void MD_DrawServerCountAndHorizontalBar(void)
static void M_DrawServerLines(INT32 x, INT32 page)
{
UINT16 i;
char gametype[30];
char servergametype[30];
char pwr[13];
INT16 firstserverline = M_GetMenuIndex(MN_MP_CONNECT, "LINE1");
UINT32 serversperpage = M_ServersPerPage(); // server sperpage?
@ -6309,8 +6309,8 @@ static void M_DrawServerLines(INT32 x, INT32 page)
V_DrawSmallString(x+44,S_LINEY(i)+8, globalflags,
va("Players: %02d/%02d", serverlist[slindex].info.numberofplayer, serverlist[slindex].info.maxplayer));
sprintf(gametype, "%s (%s)", serverlist[slindex].info.gametypename, kartspeed_cons_t[(serverlist[slindex].info.kartvars & SV_SPEEDMASK)+1].strvalue);
V_DrawSmallString(x+108, S_LINEY(i)+8, globalflags, gametype);
sprintf(servergametype, "%s (%s)", serverlist[slindex].info.gametypename, kartspeed_cons_t[(serverlist[slindex].info.kartvars & SV_SPEEDMASK)+1].strvalue);
V_DrawSmallString(x+108, S_LINEY(i)+8, globalflags, servergametype);
if (serverlist[slindex].info.avgpwrlv == -1)
sprintf(pwr, "PWR.LV: Off");