- 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)
{
int i;
StatIterator it(STAT_FX);
while ((i = it.NextIndex()) >= 0)
DukeStatIterator it(STAT_FX);
while (auto act = it.Next())
{
if (sprite[i].lotag == low) switch (sprite[i].picnum)
if (act->s.lotag == low) switch (act->s.picnum)
{
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);
j->s.z -= (32 << 8);
auto star = spawn(act, TRANSPORTERSTAR);
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;
}
}

View file

@ -302,26 +302,24 @@ void animatewalls_r(void)
void operaterespawns_r(int low)
{
int i;
StatIterator it(STAT_FX);
while ((i = it.NextIndex()) >= 0)
DukeStatIterator it(STAT_FX);
while (auto act = it.Next())
{
if (sprite[i].lotag == low) switch (sprite[i].picnum)
if (act->s.lotag == low) switch (act->s.picnum)
{
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);
j->s.z -= (32 << 8);
auto star = spawn(act, TRANSPORTERSTAR);
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;
}
case RRTILE7424:
if (isRRRA() && !ud.monsters_off)
changespritestat(i, 119);
changespritestat(act, 119);
break;
}