mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 22:51:50 +00:00
- minor cleanup.
This commit is contained in:
parent
76fabcd1c7
commit
7188956702
4 changed files with 28 additions and 14 deletions
|
@ -526,11 +526,19 @@ void moveplayers(void)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void movefx(void)
|
||||
void tickstat(int stat)
|
||||
{
|
||||
DukeStatIterator iti(STAT_FX);
|
||||
DukeStatIterator iti(stat);
|
||||
while (auto act = iti.Next())
|
||||
CallTick(act);
|
||||
{
|
||||
if (actorflag(act, SFLAG2_DIENOW))
|
||||
{
|
||||
act->Destroy();
|
||||
continue;
|
||||
}
|
||||
if (act->GetClass() != RUNTIME_CLASS(DDukeActor))
|
||||
CallTick(act);
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
|
@ -3283,7 +3283,7 @@ void think_d(void)
|
|||
moveeffectors_d(); //ST 3
|
||||
movestandables_d(); //ST 6
|
||||
doanimations();
|
||||
movefx(); //ST 11
|
||||
tickstat(STAT_FX); //ST 11
|
||||
|
||||
thinktime.Unclock();
|
||||
}
|
||||
|
|
|
@ -1881,10 +1881,22 @@ static void rrra_specialstats()
|
|||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
// this one's a hack. Can only be replaced with something better when
|
||||
// the switch code has been redone.
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void resetswitch(int tag)
|
||||
{
|
||||
DukeStatIterator it2(STAT_DEFAULT);
|
||||
while (auto act2 = it2.Next())
|
||||
{
|
||||
if (act2->spr.picnum == DIPSWITCH3 + 1)
|
||||
if (act2->spr.hitag == tag)
|
||||
act2->spr.picnum = DIPSWITCH3;
|
||||
}
|
||||
}
|
||||
|
||||
void rr_specialstats()
|
||||
{
|
||||
DukeStatIterator it(STAT_LUMBERMILL);
|
||||
|
@ -1906,13 +1918,7 @@ void rr_specialstats()
|
|||
act->spr.pos.Z = act->sector()->floorz - 59.25;
|
||||
act->spr.extra = 0;
|
||||
act->spr.picnum = LUMBERBLADE1;
|
||||
DukeStatIterator it2(STAT_DEFAULT);
|
||||
while (auto act2 = it2.Next())
|
||||
{
|
||||
if (act2->spr.picnum == DIPSWITCH3 + 1)
|
||||
if (act2->spr.hitag == 999)
|
||||
act2->spr.picnum = DIPSWITCH3;
|
||||
}
|
||||
resetswitch(999);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3581,7 +3587,7 @@ void think_r(void)
|
|||
moveeffectors_r(); //ST 3
|
||||
movestandables_r(); //ST 6
|
||||
doanimations();
|
||||
movefx(); //ST 11
|
||||
tickstat(STAT_FX); //ST 11
|
||||
|
||||
if (numplayers < 2 && thunderon)
|
||||
thunder();
|
||||
|
|
|
@ -26,7 +26,7 @@ void movedummyplayers(void);
|
|||
void resetlanepics(void);
|
||||
void moveplayers();
|
||||
void doanimations();
|
||||
void movefx();
|
||||
void tickstat(int stat);
|
||||
void operaterespawns(int low);
|
||||
void moveclouds(double interpfrac);
|
||||
void movefta();
|
||||
|
|
Loading…
Reference in a new issue