diff --git a/Plutonium specific gsc-related fixes/8 Player Origins Fix/zm_tomb_craftables.gsc b/Plutonium specific gsc-related fixes/8 Player Origins Fix/zm_tomb_craftables.gsc index e8a6de8..c32d316 100644 --- a/Plutonium specific gsc-related fixes/8 Player Origins Fix/zm_tomb_craftables.gsc +++ b/Plutonium specific gsc-related fixes/8 Player Origins Fix/zm_tomb_craftables.gsc @@ -336,9 +336,11 @@ craftable_add_glow_fx() //checked partially changed to match cerberus output */ return; } - for ( i = 0; i < s_craftable.a_piecestubs.size; i++ ) + 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 @@ -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 ); } + piecestubs_key = getNextArrayKey( piecestubs_array, piecestubs_key ); } } } diff --git a/zm_tomb_patch/maps/mp/zm_tomb_craftables.gsc b/zm_tomb_patch/maps/mp/zm_tomb_craftables.gsc index 01e4dfb..0bf9438 100644 --- a/zm_tomb_patch/maps/mp/zm_tomb_craftables.gsc +++ b/zm_tomb_patch/maps/mp/zm_tomb_craftables.gsc @@ -418,9 +418,11 @@ craftable_add_glow_fx() //checked partially changed to match cerberus output */ return; } - for ( i = 0; i < s_craftable.a_piecestubs.size; i++ ) + 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 @@ -432,10 +434,11 @@ craftable_add_glow_fx() //checked partially changed to match cerberus output } else { - do_glow_now = 0; + do_glow_now = 1; } s_piece.piecespawn.model thread craftable_model_attach_glow( n_elem, do_glow_now ); } + piecestubs_key = getNextArrayKey( piecestubs_array, piecestubs_key ); } } }