mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
- fixed warnings in Duke.
This commit is contained in:
parent
8606b2ea5a
commit
948f194064
8 changed files with 12 additions and 11 deletions
|
@ -4737,7 +4737,7 @@ void handle_se128(DDukeActor *actor)
|
|||
|
||||
auto wal = &wall[t[2]];
|
||||
|
||||
if (wal->cstat | 32)
|
||||
// if (wal->cstat | 32) // this has always been bugged, the condition can never be false.
|
||||
{
|
||||
wal->cstat &= (255 - 32);
|
||||
wal->cstat |= 16;
|
||||
|
@ -4747,7 +4747,7 @@ void handle_se128(DDukeActor *actor)
|
|||
wall[wal->nextwall].cstat |= 16;
|
||||
}
|
||||
}
|
||||
else return;
|
||||
// else return;
|
||||
|
||||
wal->overpicnum++;
|
||||
if (wal->nextwall >= 0)
|
||||
|
|
|
@ -618,7 +618,7 @@ void movefta_r(void)
|
|||
s->shade = sector[s->sectnum].ceilingshade;
|
||||
else s->shade = sector[s->sectnum].floorshade;
|
||||
|
||||
if (s->picnum != HEN || s->picnum != COW || s->picnum != PIG || s->picnum != DOGRUN || ((isRRRA()) && s->picnum != RABBIT))
|
||||
if (s->picnum == HEN || s->picnum == COW || s->picnum == PIG || s->picnum == DOGRUN || ((isRRRA()) && s->picnum == RABBIT))
|
||||
{
|
||||
if (wakeup(act, p))
|
||||
{
|
||||
|
|
|
@ -990,7 +990,7 @@ int ConCompiler::parsecommand()
|
|||
Printf(TEXTCOLOR_RED " * WARNING.(%s, line %d) Duplicate move '%s' ignored.\n", fn, line_number, parselabel.GetChars());
|
||||
break;
|
||||
}
|
||||
if (i == labels.Size())
|
||||
if (i == (int)labels.Size())
|
||||
appendlabeladdress(LABEL_MOVE);
|
||||
for (j = 0; j < 2; j++)
|
||||
{
|
||||
|
|
|
@ -1142,6 +1142,7 @@ void DoActor(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
|
|||
{
|
||||
// if they've asked for 'this', then use 'this'...
|
||||
act = sActor;
|
||||
iActor = ActorToScriptIndex(sActor);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -737,7 +737,7 @@ void playerJump(int snum, int fz, int cz)
|
|||
|
||||
void player_struct::apply_seasick(double factor)
|
||||
{
|
||||
if (isRRRA() && SeaSick && (dead_flag == 0 || dead_flag && resurrected))
|
||||
if (isRRRA() && SeaSick && (dead_flag == 0 || (dead_flag && resurrected)))
|
||||
{
|
||||
if (SeaSick < 250)
|
||||
{
|
||||
|
|
|
@ -1236,7 +1236,7 @@ void selectweapon_d(int snum, int weap) // playernum, weaponnum
|
|||
}
|
||||
else if (k == GROW_WEAPON) // JBF: this is handling next/previous with the grower selected
|
||||
{
|
||||
if (j == (unsigned int)-1)
|
||||
if (j == -1)
|
||||
k = 5;
|
||||
else k = 7;
|
||||
|
||||
|
@ -1375,7 +1375,7 @@ void selectweapon_d(int snum, int weap) // playernum, weaponnum
|
|||
PlayerSetInput(snum, SB_HOLSTER);
|
||||
p->oweapon_pos = p->weapon_pos = -9;
|
||||
}
|
||||
else if (j >= MIN_WEAPON && p->gotweapon[j] && (unsigned int)p->curr_weapon != j) switch (j)
|
||||
else if (j >= MIN_WEAPON && p->gotweapon[j] && p->curr_weapon != j) switch (j)
|
||||
{
|
||||
case KNEE_WEAPON:
|
||||
fi.addweapon(p, KNEE_WEAPON);
|
||||
|
@ -2021,7 +2021,7 @@ int operateTripbomb(int snum)
|
|||
|
||||
DDukeActor* j;
|
||||
DukeSectIterator it(sect);
|
||||
while (j = it.Next())
|
||||
while ((j = it.Next()))
|
||||
{
|
||||
auto sj = j->s;
|
||||
if (sj->picnum == TRIPBOMB &&
|
||||
|
|
|
@ -306,7 +306,7 @@ void spawntransporter(DDukeActor *actj, DDukeActor* acti, bool beam)
|
|||
{
|
||||
sp->xrepeat = 31;
|
||||
sp->yrepeat = 1;
|
||||
sp->z = sector[spj->sectnum].floorz - isRR() ? PHEIGHT_RR : PHEIGHT_DUKE;
|
||||
sp->z = sector[spj->sectnum].floorz - (isRR() ? PHEIGHT_RR : PHEIGHT_DUKE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -208,7 +208,7 @@ static void WeaponCheat(int player)
|
|||
if (!SW_SHAREWARE) p->WpnFlags = 0xFFFFFFFF;
|
||||
else p->WpnFlags = 0x0000207F; // Disallows high weapon cheat in shareware
|
||||
|
||||
for (int i = 0; i < SIZ(p->WpnAmmo); i++)
|
||||
for (size_t i = 0; i < SIZ(p->WpnAmmo); i++)
|
||||
{
|
||||
p->WpnAmmo[i] = DamageData[i].max_ammo;
|
||||
}
|
||||
|
@ -286,7 +286,7 @@ static void cmd_Give(int player, uint8_t** stream, bool skip)
|
|||
p->WpnRocketHeat = 5;
|
||||
p->WpnRocketNuke = 1;
|
||||
|
||||
for (int i = 0; i < SIZ(p->WpnAmmo); i++)
|
||||
for (size_t i = 0; i < SIZ(p->WpnAmmo); i++)
|
||||
{
|
||||
p->WpnAmmo[i] = DamageData[i].max_ammo;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue