From 06695073d0c925a862a632893c45e2044698fcc6 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 23 Oct 2020 19:17:30 +0200 Subject: [PATCH] - handle_st27. --- source/games/duke/src/sectors.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/source/games/duke/src/sectors.cpp b/source/games/duke/src/sectors.cpp index 811935095..b337cf41c 100644 --- a/source/games/duke/src/sectors.cpp +++ b/source/games/duke/src/sectors.cpp @@ -891,17 +891,16 @@ static void handle_st25(int sn, DDukeActor* actor) static void handle_st27(int sn, DDukeActor* actor) { - int j; - StatIterator it(STAT_EFFECTOR); - while ((j = it.NextIndex()) >= 0) + DukeStatIterator it(STAT_EFFECTOR); + while (auto act2 = it.Next()) { - if ((sprite[j].lotag & 0xff) == 20 && sprite[j].sectnum == sn) //Bridge + if ((act2->s.lotag & 0xff) == 20 && act2->s.sectnum == sn) //Bridge { sector[sn].lotag ^= 0x8000; if (sector[sn].lotag & 0x8000) //OPENING - hittype[j].temp_data[0] = 1; - else hittype[j].temp_data[0] = 2; + act2->temp_data[0] = 1; + else act2->temp_data[0] = 2; callsound(sn, actor); break; }