- handle_st29.

This commit is contained in:
Christoph Oelckers 2020-10-23 19:09:27 +02:00
parent 7c491742f9
commit 2afbbcb157

View file

@ -667,23 +667,23 @@ static void handle_st18(int sn, DDukeActor* actor)
static void handle_st29(int sn, DDukeActor* actor) static void handle_st29(int sn, DDukeActor* actor)
{ {
sectortype* sptr = &sector[sn]; sectortype* sptr = &sector[sn];
int i,j; int j;
if (sptr->lotag & 0x8000) if (sptr->lotag & 0x8000)
j = sector[nextsectorneighborz(sn, sptr->ceilingz, 1, 1)].floorz; j = sector[nextsectorneighborz(sn, sptr->ceilingz, 1, 1)].floorz;
else else
j = sector[nextsectorneighborz(sn, sptr->ceilingz, -1, -1)].ceilingz; j = sector[nextsectorneighborz(sn, sptr->ceilingz, -1, -1)].ceilingz;
StatIterator it(STAT_EFFECTOR); DukeStatIterator it(STAT_EFFECTOR);
while ((i = it.NextIndex()) >= 0) while (auto act2 = it.Next())
{ {
if ((sprite[i].lotag == 22) && if ((act2->s.lotag == 22) &&
(sprite[i].hitag == sptr->hitag)) (act2->s.hitag == sptr->hitag))
{ {
sector[sprite[i].sectnum].extra = -sector[sprite[i].sectnum].extra; sector[act2->s.sectnum].extra = -sector[act2->s.sectnum].extra;
hittype[i].temp_data[0] = sn; act2->temp_data[0] = sn;
hittype[i].temp_data[1] = 1; act2->temp_data[1] = 1;
} }
} }