mirror of
https://github.com/ZDoom/Raze.git
synced 2025-04-03 14:30:45 +00:00
- Tidy up some GCC warnings about ininitialised variables, memsetting non-trivial types and some others.
This commit is contained in:
parent
38842994e0
commit
2dda3ee505
4 changed files with 13 additions and 12 deletions
|
@ -890,7 +890,7 @@ void parseMultiPsky(FScanner& sc, FScriptPosition& pos)
|
|||
else if (sc.Compare("yscale")) sc.GetNumber(sky.yscale, true);
|
||||
else if (sc.Compare({ "tile", "panel" }))
|
||||
{
|
||||
int panel, offset;
|
||||
int panel = 0, offset = 0;
|
||||
sc.GetNumber(panel, true);
|
||||
sc.GetNumber(offset, true);
|
||||
if ((unsigned)panel < MAXPSKYTILES && (unsigned)offset <= PSKYOFF_MAX) sky.tileofs[panel] = offset;
|
||||
|
@ -1441,7 +1441,7 @@ void parsePalookup(FScanner& sc, FScriptPosition& pos)
|
|||
else if (sc.Compare("nofloorpal")) lookups.tables[id].noFloorPal = 1;
|
||||
else if (sc.Compare("copy"))
|
||||
{
|
||||
int source;
|
||||
int source = 0;
|
||||
sc.GetNumber(source, true);
|
||||
|
||||
if ((unsigned)source >= MAXPALOOKUPS || source == id)
|
||||
|
|
|
@ -835,9 +835,10 @@ int team_ticker[8];
|
|||
|
||||
void playerInit(int nPlayer, unsigned int a2)
|
||||
{
|
||||
PLAYER *pPlayer = &gPlayer[nPlayer];
|
||||
if (!(a2&1))
|
||||
memset(pPlayer, 0, sizeof(PLAYER));
|
||||
gPlayer[nPlayer] = {};
|
||||
|
||||
PLAYER *pPlayer = &gPlayer[nPlayer];
|
||||
pPlayer->nPlayer = nPlayer;
|
||||
pPlayer->teamId = nPlayer;
|
||||
if (gGameOptions.nGameType == 3)
|
||||
|
|
|
@ -99,13 +99,13 @@ static int ccmd_spawn(CCmdFuncPtr parm)
|
|||
if (set & 1) spawned->s->pal = (uint8_t)pal;
|
||||
if (set & 2) spawned->s->cstat = (uint16_t)cstat;
|
||||
if (set & 4) spawned->s->ang = ang;
|
||||
if (set & 8)
|
||||
SetActor(spawned, { x, y, z });
|
||||
if (spawned->sector() == nullptr)
|
||||
{
|
||||
Printf("spawn: Sprite can't be spawned into null space\n");
|
||||
deletesprite(spawned);
|
||||
}
|
||||
if (set & 8) SetActor(spawned, { x, y, z });
|
||||
|
||||
if (spawned->sector() == nullptr)
|
||||
{
|
||||
Printf("spawn: Sprite can't be spawned into null space\n");
|
||||
deletesprite(spawned);
|
||||
}
|
||||
}
|
||||
|
||||
return CCMD_OK;
|
||||
|
|
|
@ -2622,7 +2622,7 @@ int ParseState::parse(void)
|
|||
{
|
||||
DPrintf(DMSG_NOTIFY, " (Global)");
|
||||
}
|
||||
DPrintf(DMSG_NOTIFY, " =%d", GetGameVarID(*insptr, g_ac, g_p));
|
||||
DPrintf(DMSG_NOTIFY, " =%d", GetGameVarID(*insptr, g_ac, g_p).safeValue());
|
||||
insptr++;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue