Update zm_tomb_craftables.gsc

fix nested foreach infinite loop
This commit is contained in:
INSANEMODE 2020-10-30 08:50:44 -05:00 committed by GitHub
parent 59cb9288ba
commit 905ac1befe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -336,9 +336,11 @@ craftable_add_glow_fx() //checked partially changed to match cerberus output
*/ */
return; return;
} }
foreach ( s_piece in s_craftable.a_piecestubs ) //replaced with a foreach to get each s_piece, which is needed for craftable_model_attach_glow to work. piecestubs_array = s_craftable.a_piecestubs;
piecestubs_key = getFirstArrayKey( piecestubs_array );
while ( isDefined( piecestubs_key ) )
{ {
if ( s_piece.piecename == "gem" ) s_piece = piecestubs_array[ piecestubs_key ]; if ( s_piece.piecename == "gem" )
{ {
} }
else else
@ -354,6 +356,7 @@ craftable_add_glow_fx() //checked partially changed to match cerberus output
} }
s_piece.piecespawn.model thread craftable_model_attach_glow( n_elem, do_glow_now ); s_piece.piecespawn.model thread craftable_model_attach_glow( n_elem, do_glow_now );
} }
piecestubs_key = getNextArrayKey( piecestubs_array, piecestubs_key );
} }
} }
} }