From c5fcdc76dd41f2597874c0fdeed035437f7bbd47 Mon Sep 17 00:00:00 2001 From: JezuzLizard Date: Sat, 19 Dec 2020 13:09:11 -0800 Subject: [PATCH] Properly commented out a dev block... Changed while loop to foreach. --- patch_zm/maps/mp/zombies/_zm_game_module.gsc | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/patch_zm/maps/mp/zombies/_zm_game_module.gsc b/patch_zm/maps/mp/zombies/_zm_game_module.gsc index 02d2dac..069cf97 100644 --- a/patch_zm/maps/mp/zombies/_zm_game_module.gsc +++ b/patch_zm/maps/mp/zombies/_zm_game_module.gsc @@ -20,14 +20,14 @@ register_game_module( index, module_name, pre_init_func, post_init_func, pre_ini i++; continue; } - if ( isDefined( level._game_modules[ i ].index ) && level._game_modules[ i ].index == index ) - { - /* + if ( isDefined( level._game_modules[ i ].index ) && level._game_modules[ i ].index == index ) + { + /* /# - assert( level._game_modules[ i ].index != index, "A Game module is already registered for index (" + index + ")" ); + assert( level._game_modules[ i ].index != index, "A Game module is already registered for index (" + index + ")" ); #/ - */ - } + */ + } i++; } level._game_modules[ level._num_registered_game_modules ] = spawnstruct(); @@ -132,20 +132,16 @@ turn_power_on_and_open_doors() //checked changed at own discretion flag_set( "power_on" ); level setclientfield( "zombie_power_on", 1 ); zombie_doors = getentarray( "zombie_door", "targetname" ); - i = 0; - while ( i < zombie_doors.size ) + foreach ( door in zombie_doors ) { if ( isDefined( door.script_noteworthy ) && door.script_noteworthy == "electric_door" ) { door notify( "power_on" ); - i++; - continue; } - if ( isDefined( door.script_noteworthy ) && door.script_noteworthy == "local_electric_door" ) + else if ( isDefined( door.script_noteworthy ) && door.script_noteworthy == "local_electric_door" ) { door notify( "local_power_on" ); } - i++; } }