fix peep loop bug

This commit is contained in:
IntelOrca committed 2014-05-27 18:28:24 +01:00
1 parent 72b2272b1f
commit fcb9a407f5
1 file changed
+5 -1
+5 -1
View File
@@ -53,8 +53,12 @@ void peep_update_all()
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & 0x0E)
return;
spriteIndex = RCT2_GLOBAL(RCT2_ADDRESS_SPRITES_START_PEEP, uint16);
i = 0;
FOR_ALL_PEEPS(spriteIndex, peep) {
while (spriteIndex != SPRITE_INDEX_NULL) {
peep = &(RCT2_ADDRESS(RCT2_ADDRESS_SPRITE_LIST, rct_sprite)[spriteIndex].peep);
spriteIndex = peep->next;
if ((i & 0x7F) != (RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_TICKS, uint32) & 0x7F)) {
RCT2_CALLPROC_X(0x0068FC1E, 0, 0, 0, 0, (int)peep, 0, 0);
} else {