Fix dogs on Nuketown.

This commit is contained in:
JezuzLizard
2024-02-26 14:43:10 -08:00
parent eeecbc5f53
commit 5827f5dc40
7 changed files with 495 additions and 8 deletions

View File

@ -11546,6 +11546,196 @@
"origin" "100 0 -500"
"script_noteworthy" "zombie_dog_spawner"
}
{
"targetname" "culdesac_green_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "-384.934 845.987 -63.875"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "culdesac_yellow_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "563.594 909.484 -103.973"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "culdesac_yellow_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "317.887 503.854 -60.875"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "culdesac_yellow_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "394.412 -39.0415 -47.396"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "culdesac_yellow_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "230.973 -469.761 -60.8377"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "culdesac_green_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "-494.014 83.4232 -46.875"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "culdesac_green_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "-254.848 336.21 -50.2869"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "culdesac_yellow_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "698.789 -164.511 -57.1405"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "openhouse2_f1_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "836.251 598.238 -56.875"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "openhouse2_f1_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "679.25 274.623 -56.5105"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "openhouse2_f1_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "993.575 334.033 -54.2811"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "openhouse2_f2_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "925.133 295.415 79.125"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "openhouse2_f2_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "660.95 221.104 79.125"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "openhouse2_backyard_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "1022.71 899.392 -126.239"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "openhouse2_backyard_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "1568.58 816.986 -60.6684"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "openhouse2_backyard_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "1675.88 249.702 -45.769"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "openhouse2_backyard_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "1304.43 164.747 -54.9502"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "openhouse2_backyard_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "1903.94 303.476 -52.6843"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "openhouse1_f1_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "-665.451 413.733 -55.875"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "openhouse1_f1_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "-916.521 537.634 -55.875"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "openhouse1_f2_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "-857.697 493.433 80.125"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "openhouse1_f2_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "-582.218 410.76 80.125"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "openhouse1_backyard_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "-1223.21 40.3534 -64.0952"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "openhouse1_backyard_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "-1699.86 346.968 -62.875"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "openhouse1_backyard_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "-1950.66 458.804 -53.4965"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "openhouse1_backyard_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "-1583.33 968.953 -63.875"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"targetname" "openhouse1_backyard_zone_spawners"
"script_noteworthy" "zombie_dog_location"
"origin" "-1131.15 812.042 -56.6833"
"classname" "script_struct"
"angles" "0 0 0"
}
{
"classname" "actor_zm_transit_avogadro"
"model" "c_zom_electrician_fb"

View File

@ -13,6 +13,14 @@
init()
{
if ( !isDefined( level._zm_ai_dogs_init_called ) )
{
level._zm_ai_dogs_init_called = true;
}
else
{
return;
}
level.dogs_enabled = 1;
level.dog_rounds_enabled = 0;
level.dog_round_count = 1;
@ -85,6 +93,7 @@ dog_spawner_init()
dog_round_spawning()
{
level endon( "end_of_round" );
level endon( "intermission" );
level.dog_targets = sys::getplayers();
@ -106,7 +115,7 @@ dog_round_spawning()
players = sys::getplayers();
array_thread( players, ::play_dog_round );
wait 1;
playsoundatposition( "vox_zmba_event_dogstart_0", ( 0, 0, 0 ) );
playsoundatposition( game["zmbdialog"]["prefix"] + "_event_dogstart_0", ( 0, 0, 0 ) );
wait 6;
if ( level.dog_round_count < 3 )
@ -121,9 +130,11 @@ dog_round_spawning()
level.zombie_total = max;
dog_health_increase();
count = 0;
while ( count < max )
while ( true )
{
while ( get_current_zombie_count() >= level.zombie_ai_limit || level.zombie_total <= 0 )
wait 0.1;
for ( num_player_valid = get_number_of_valid_players(); get_current_zombie_count() >= num_player_valid * 2; num_player_valid = get_number_of_valid_players() )
wait 2;
@ -248,7 +259,7 @@ dog_spawn_sumpf_logic( dog_array, favorite_enemy )
dog_spawn_factory_logic( dog_array, favorite_enemy )
{
dog_locs = array_randomize( level.enemy_dog_locations );
dog_locs = array_randomize( level.zombie_dog_locations );
for ( i = 0; i < dog_locs.size; i++ )
{
@ -483,11 +494,21 @@ dog_fx_trail()
self.fx_dog_trail sys::linkto( self, "tag_origin" );
}
get_zombie_dog_array()
{
return getaispeciesarray( level.zombie_team, "zombie_dog" );
}
get_zombie_dog_count()
{
return get_zombie_dog_array().size;
}
dog_death()
{
self waittill( "death" );
if ( get_current_zombie_count() == 0 && level.zombie_total == 0 )
if ( get_zombie_dog_count() <= 0 && level.zombie_total <= 0 )
{
level.last_dog_origin = self.origin;
level notify( "last_dog_down" );
@ -585,6 +606,11 @@ dog_clip_monitor()
clips_on = 0;
level.dog_clips = sys::getentarray( "dog_clips", "targetname" );
if ( !isDefined( level.dog_clips ) || level.dog_clips.size <= 0 )
{
return;
}
while ( true )
{
for ( i = 0; i < level.dog_clips.size; i++ )

View File

@ -197,6 +197,7 @@ zone_init( zone_name )
spots = getstructarray( zone.volumes[0].target, "targetname" );
zone.spawn_locations = [];
zone.dog_locations = [];
zone.zombie_dog_locations = [];
zone.screecher_locations = [];
zone.avogadro_locations = [];
zone.inert_locations = [];
@ -230,6 +231,12 @@ zone_init( zone_name )
continue;
}
if ( token == "zombie_dog_location" )
{
zone.zombie_dog_locations[zone.zombie_dog_locations.size] = spots[i];
continue;
}
if ( token == "screecher_location" )
{
zone.screecher_locations[zone.screecher_locations.size] = spots[i];
@ -341,6 +348,7 @@ reinit_zone_spawners()
spots = getstructarray( zone.volumes[0].target, "targetname" );
zone.spawn_locations = [];
zone.dog_locations = [];
zone.zombie_dog_locations = [];
zone.screecher_locations = [];
zone.avogadro_locations = [];
zone.quad_locations = [];
@ -369,6 +377,12 @@ reinit_zone_spawners()
continue;
}
if ( token == "zombie_dog_location" )
{
zone.zombie_dog_locations[zone.zombie_dog_locations.size] = spots[j];
continue;
}
if ( token == "screecher_location" )
{
zone.screecher_locations[zone.screecher_locations.size] = spots[j];
@ -943,6 +957,7 @@ create_spawner_list( zkeys )
level.zombie_spawn_locations = [];
level.inert_locations = [];
level.enemy_dog_locations = [];
level.zombie_dog_locations = [];
level.zombie_screecher_locations = [];
level.zombie_avogadro_locations = [];
level.quad_locations = [];
@ -976,6 +991,12 @@ create_spawner_list( zkeys )
level.enemy_dog_locations[level.enemy_dog_locations.size] = zone.dog_locations[x];
}
for ( x = 0; x < zone.zombie_dog_locations.size; x++ )
{
if ( zone.zombie_dog_locations[x].is_enabled )
level.zombie_dog_locations[level.zombie_dog_locations.size] = zone.zombie_dog_locations[x];
}
for ( x = 0; x < zone.screecher_locations.size; x++ )
{
if ( zone.screecher_locations[x].is_enabled )