More simplified code

Also delay is in tics, per MS' request.
This commit is contained in:
Steel Titanium 2019-07-24 21:18:07 -04:00
parent 6c2ef839c1
commit 60ffef9830
1 changed files with 4 additions and 9 deletions

View File

@ -3917,20 +3917,15 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
}
}
case 460: // Award rings
{
INT16 rings = (sides[line->sidenum[0]].textureoffset>>FRACBITS);
INT16 delay = (sides[line->sidenum[0]].rowoffset>>FRACBITS);
if (mo && mo->player)
{
if (delay > 0)
INT16 rings = (sides[line->sidenum[0]].textureoffset>>FRACBITS);
tic_t delay = (sides[line->sidenum[0]].rowoffset>>FRACBITS);
if (mo && mo->player)
{
if (!(leveltime % (delay*TICRATE)))
if (delay <= 0 || !(leveltime % (delay)))
P_GivePlayerRings(mo->player, rings);
}
else
P_GivePlayerRings(mo->player, rings);
}
}
break;
#ifdef POLYOBJECTS