Push stashed changes.

This commit is contained in:
JezuzLizard 2025-05-25 18:43:20 -07:00
parent f7f3ed71b7
commit e9c05e5cd5
2 changed files with 30 additions and 9 deletions

View File

@ -391,7 +391,8 @@ determine_current_round_type()
normal_present = true; normal_present = true;
break; break;
} }
}
for (;;) for (;;)
{ {
possible_round_types = array_randomize( possible_round_types_keys ); possible_round_types = array_randomize( possible_round_types_keys );

View File

@ -38,23 +38,43 @@ spawning_random()
aitypes = array_randomize( aitypes ); aitypes = array_randomize( aitypes );
ai = undefined; ai = undefined;
has_normal = false; has_normal = false;
for ( i = 0; i < aitypes.size; i++ ) max_iterations = 10;
iteration_count = 0;
for (;;)
{ {
if ( aitypes[ i ] == "normal" ) for ( i = 0; i < aitypes.size; i++ )
{ {
has_normal = true; if ( aitypes[ i ] == "normal" )
continue; {
has_normal = true;
continue;
}
ai = attempt_random_spawn( aitypes[ i ] );
if ( isdefined( ai ) )
{
break;
}
} }
ai = attempt_random_spawn( aitypes[ i ] ); if ( !isdefined( ai ) && has_normal )
if ( isdefined( ai ) )
{ {
break; break;
} }
iteration_count++;
if ( iteration_count >= max_iterations )
{
break;
}
} }
if ( !isdefined( ai ) )
if ( !isdefined( ai ) && has_normal )
{ {
ai = [[ level.round_manager_aitype_spawning_funcs[ "normal" ] ]](); ai = [[ level.round_manager_aitype_spawning_funcs[ "normal" ] ]]();
} }
else
{
}
if ( isdefined( ai ) ) if ( isdefined( ai ) )
{ {