mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
ACS_SectorThingCounter: fix infinite loop in touching iterator
This commit is contained in:
parent
ae7325cbc3
commit
eff895178b
1 changed files with 1 additions and 4 deletions
|
|
@ -381,10 +381,9 @@ static bool ACS_ActivatorIsLocal(ACSVM::Thread *thread)
|
||||||
--------------------------------------------------*/
|
--------------------------------------------------*/
|
||||||
static UINT32 ACS_SectorThingCounter(sector_t *sec, mtag_t thingTag, bool (*filter)(mobj_t *))
|
static UINT32 ACS_SectorThingCounter(sector_t *sec, mtag_t thingTag, bool (*filter)(mobj_t *))
|
||||||
{
|
{
|
||||||
msecnode_t *node = sec->touching_thinglist; // things touching this sector
|
|
||||||
UINT32 count = 0;
|
UINT32 count = 0;
|
||||||
|
|
||||||
while (node)
|
for (msecnode_t *node = sec->touching_thinglist; node; node = node->m_thinglist_next) // things touching this sector
|
||||||
{
|
{
|
||||||
mobj_t *mo = node->m_thing;
|
mobj_t *mo = node->m_thing;
|
||||||
|
|
||||||
|
|
@ -403,8 +402,6 @@ static UINT32 ACS_SectorThingCounter(sector_t *sec, mtag_t thingTag, bool (*filt
|
||||||
{
|
{
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
node = node->m_thinglist_next;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue