mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-23 03:12:38 +00:00
More simplified code
Also delay is in tics, per MS' request.
This commit is contained in:
parent
6c2ef839c1
commit
60ffef9830
1 changed files with 4 additions and 9 deletions
13
src/p_spec.c
13
src/p_spec.c
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue