- operaterespawns.

# Conflicts:
#	source/games/duke/src/sectors_d.cpp
#	source/games/duke/src/sectors_r.cpp
This commit is contained in:
Christoph Oelckers 2020-10-23 20:49:52 +02:00
parent 5cf288a05c
commit 471a25f819
2 changed files with 15 additions and 19 deletions

View file

@ -187,20 +187,18 @@ void animatewalls_d(void)
void operaterespawns_d(int low) void operaterespawns_d(int low)
{ {
int i; DukeStatIterator it(STAT_FX);
while (auto act = it.Next())
StatIterator it(STAT_FX);
while ((i = it.NextIndex()) >= 0)
{ {
if (sprite[i].lotag == low) switch (sprite[i].picnum) if (act->s.lotag == low) switch (act->s.picnum)
{ {
case RESPAWN: case RESPAWN:
if (badguypic(sprite[i].hitag) && ud.monsters_off) break; if (badguypic(act->s.hitag) && ud.monsters_off) break;
auto j = spawn(&hittype[i], TRANSPORTERSTAR); auto star = spawn(act, TRANSPORTERSTAR);
j->s.z -= (32 << 8); star->s.z -= (32 << 8);
sprite[i].extra = 66 - 12; // Just a way to killit act->s.extra = 66 - 12; // Just a way to killit
break; break;
} }
} }

View file

@ -302,26 +302,24 @@ void animatewalls_r(void)
void operaterespawns_r(int low) void operaterespawns_r(int low)
{ {
int i; DukeStatIterator it(STAT_FX);
while (auto act = it.Next())
StatIterator it(STAT_FX);
while ((i = it.NextIndex()) >= 0)
{ {
if (sprite[i].lotag == low) switch (sprite[i].picnum) if (act->s.lotag == low) switch (act->s.picnum)
{ {
case RESPAWN: case RESPAWN:
{ {
if (badguypic(sprite[i].hitag) && ud.monsters_off) break; if (badguypic(act->s.hitag) && ud.monsters_off) break;
auto j = spawn(&hittype[i], TRANSPORTERSTAR); auto star = spawn(act, TRANSPORTERSTAR);
j->s.z -= (32 << 8); star->s.z -= (32 << 8);
sprite[i].extra = 66 - 12; // Just a way to killit act->s.extra = 66 - 12; // Just a way to killit
break; break;
} }
case RRTILE7424: case RRTILE7424:
if (isRRRA() && !ud.monsters_off) if (isRRRA() && !ud.monsters_off)
changespritestat(i, 119); changespritestat(act, 119);
break; break;
} }