mirror of
https://github.com/JezuzLizard/t6-fastfile-mods.git
synced 2025-06-07 18:07:52 -05:00
Add support for Bus Depot to spawn mechz.
Add forever solo game for all maps. Fix emps affecting bosses. Fix electric trap and lava affecting bosses.
This commit is contained in:
parent
cc5da3d56e
commit
97c880e8b7
@ -15,7 +15,11 @@ precache()
|
|||||||
|
|
||||||
init_animtree()
|
init_animtree()
|
||||||
{
|
{
|
||||||
wait 0.05;
|
if ( getDvar( "mapname" ) != "zm_tomb" )
|
||||||
|
{
|
||||||
|
wait 0.05;
|
||||||
|
}
|
||||||
|
|
||||||
scriptmodelsuseanimtree( #animtree );
|
scriptmodelsuseanimtree( #animtree );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,7 +52,7 @@ main()
|
|||||||
register_clientfield_alt( "actor", "mechz_fx", "int", ::mechz_handle_fx_alt );
|
register_clientfield_alt( "actor", "mechz_fx", "int", ::mechz_handle_fx_alt );
|
||||||
//registerclientfield( "actor", "mechz_fx", 14000, 12, "int", ::mechz_handle_fx );
|
//registerclientfield( "actor", "mechz_fx", 14000, 12, "int", ::mechz_handle_fx );
|
||||||
//registerclientfield( "toplayer", "mechz_grab", 14000, 1, "int", ::mechz_claw_callback );
|
//registerclientfield( "toplayer", "mechz_grab", 14000, 1, "int", ::mechz_claw_callback );
|
||||||
if ( getDvar( "mapname" ) != "zm_buried" && getDvar( "g_gametype" != "zclassic" ) )
|
if ( getDvar( "mapname" ) != "zm_buried" && getDvar( "g_gametype" ) != "zclassic" )
|
||||||
{
|
{
|
||||||
registerclientfield( "actor", "anim_rate", 14000, 2, "float", undefined, 0 );
|
registerclientfield( "actor", "anim_rate", 14000, 2, "float", undefined, 0 );
|
||||||
setupclientfieldanimspeedcallbacks( "actor", 1, "anim_rate" );
|
setupclientfieldanimspeedcallbacks( "actor", 1, "anim_rate" );
|
||||||
@ -222,7 +226,7 @@ cleanup_fx( localclientnum, index, bnewent, binitialsnap, fieldname, bwasdemojum
|
|||||||
mechz_handle_fx_alt( new_val, old_val )
|
mechz_handle_fx_alt( new_val, old_val )
|
||||||
{
|
{
|
||||||
newval = int( new_val );
|
newval = int( new_val );
|
||||||
oldval = int( old_val );
|
oldval = old_val != "" ? int( old_val ) : 0;
|
||||||
for ( i = 0; i < level.mechz_clientside_fx.size; i++ )
|
for ( i = 0; i < level.mechz_clientside_fx.size; i++ )
|
||||||
{
|
{
|
||||||
set_in_new = ( newval & 1 << i ) != 0;
|
set_in_new = ( newval & 1 << i ) != 0;
|
||||||
@ -320,7 +324,7 @@ mechz_screen_shake_loop( localclientnum )
|
|||||||
|
|
||||||
mechz_claw_callback_alt( new_val, old_val )
|
mechz_claw_callback_alt( new_val, old_val )
|
||||||
{
|
{
|
||||||
oldval = int( old_val );
|
oldval = old_val != "" ? int( old_val ) : 0;
|
||||||
newval = int( new_val );
|
newval = int( new_val );
|
||||||
if ( oldval == 1 && newval == 0 )
|
if ( oldval == 1 && newval == 0 )
|
||||||
{
|
{
|
||||||
|
@ -54682,4 +54682,68 @@
|
|||||||
"classname" "script_struct"
|
"classname" "script_struct"
|
||||||
"angles" "0 0 0"
|
"angles" "0 0 0"
|
||||||
"script_string" "zclassic_transit zstandard_town zgrief_town"
|
"script_string" "zclassic_transit zstandard_town zgrief_town"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"targetname" "zone_pri_spawners"
|
||||||
|
"script_noteworthy" "mechz_location"
|
||||||
|
"origin" "-6587 5366 -55"
|
||||||
|
"classname" "script_struct"
|
||||||
|
"angles" "0 0 0"
|
||||||
|
"script_string" "zclassic_transit zstandard_transit zgrief_transit"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"targetname" "zone_station_ext_spawners"
|
||||||
|
"script_noteworthy" "mechz_location"
|
||||||
|
"origin" "-5935 5280 -52"
|
||||||
|
"classname" "script_struct"
|
||||||
|
"angles" "0 0 0"
|
||||||
|
"script_string" "zclassic_transit zstandard_transit zgrief_transit"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"targetname" "zone_station_ext_spawners"
|
||||||
|
"script_noteworthy" "mechz_location"
|
||||||
|
"origin" "-6222 4594 -63"
|
||||||
|
"classname" "script_struct"
|
||||||
|
"angles" "0 0 0"
|
||||||
|
"script_string" "zclassic_transit zstandard_transit zgrief_transit"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"targetname" "zone_station_ext_spawners"
|
||||||
|
"script_noteworthy" "mechz_location"
|
||||||
|
"origin" "-7141 4763 -63"
|
||||||
|
"classname" "script_struct"
|
||||||
|
"angles" "0 0 0"
|
||||||
|
"script_string" "zclassic_transit zstandard_transit zgrief_transit"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"targetname" "zone_trans_2b_spawners"
|
||||||
|
"script_noteworthy" "mechz_location"
|
||||||
|
"origin" "-7868 4832 -57"
|
||||||
|
"classname" "script_struct"
|
||||||
|
"angles" "0 0 0"
|
||||||
|
"script_string" "zclassic_transit zstandard_transit zgrief_transit"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"targetname" "zone_far_ext_spawners"
|
||||||
|
"script_noteworthy" "mechz_location"
|
||||||
|
"origin" "7906 -5698 10"
|
||||||
|
"classname" "script_struct"
|
||||||
|
"angles" "0 0 0"
|
||||||
|
"script_string" "zclassic_transit zstandard_farm zgrief_farm"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"targetname" "zone_brn_spawners"
|
||||||
|
"script_noteworthy" "mechz_location"
|
||||||
|
"origin" "8177 -4678 264"
|
||||||
|
"classname" "script_struct"
|
||||||
|
"angles" "0 0 0"
|
||||||
|
"script_string" "zclassic_transit zstandard_farm zgrief_farm"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"targetname" "zone_brn_spawners"
|
||||||
|
"script_noteworthy" "mechz_location"
|
||||||
|
"origin" "8214 -5498 40"
|
||||||
|
"classname" "script_struct"
|
||||||
|
"angles" "0 0 0"
|
||||||
|
"script_string" "zclassic_transit zstandard_farm zgrief_farm"
|
||||||
}
|
}
|
@ -394,6 +394,9 @@ brutus_spawn( starting_health, has_helmet, helmet_hits, explosive_dmg_taken, zon
|
|||||||
}
|
}
|
||||||
self setphysparams( width, 0, 60 );
|
self setphysparams( width, 0, 60 );
|
||||||
self.immune_to_slowgun = true;
|
self.immune_to_slowgun = true;
|
||||||
|
self.ignore_inert = true;
|
||||||
|
self.ignore_lava_damage = true;
|
||||||
|
self.ignore_electric_trap = true;
|
||||||
self.zombie_init_done = 1;
|
self.zombie_init_done = 1;
|
||||||
self notify( "zombie_init_done" );
|
self notify( "zombie_init_done" );
|
||||||
self.allowpain = 0;
|
self.allowpain = 0;
|
||||||
|
@ -407,7 +407,7 @@ dog_init()
|
|||||||
self.gibbed = 0;
|
self.gibbed = 0;
|
||||||
self.head_gibbed = 0;
|
self.head_gibbed = 0;
|
||||||
self.default_goalheight = 40;
|
self.default_goalheight = 40;
|
||||||
self.ignore_inert = 1;
|
self.ignore_inert = true;
|
||||||
self.grenadeawareness = 0;
|
self.grenadeawareness = 0;
|
||||||
self.badplaceawareness = 0;
|
self.badplaceawareness = 0;
|
||||||
self.ignoresuppression = 1;
|
self.ignoresuppression = 1;
|
||||||
|
@ -622,6 +622,9 @@ prespawn()
|
|||||||
self endon( "death" );
|
self endon( "death" );
|
||||||
level endon( "intermission" );
|
level endon( "intermission" );
|
||||||
self.immune_to_slowgun = true;
|
self.immune_to_slowgun = true;
|
||||||
|
self.ignore_inert = true;
|
||||||
|
self.ignore_lava_damage = true;
|
||||||
|
self.ignore_electric_trap = true;
|
||||||
self maps\mp\zombies\_zm_ai_ghost_ffotd::prespawn_start();
|
self maps\mp\zombies\_zm_ai_ghost_ffotd::prespawn_start();
|
||||||
self.startinglocation = self.origin;
|
self.startinglocation = self.origin;
|
||||||
self.animname = "ghost_zombie";
|
self.animname = "ghost_zombie";
|
||||||
|
@ -615,6 +615,9 @@ mechz_spawn()
|
|||||||
level notify( "sam_clue_mechz", self );
|
level notify( "sam_clue_mechz", self );
|
||||||
self.closest_player_override = maps\mp\zombies\_zm_ai_mechz::get_favorite_enemy;
|
self.closest_player_override = maps\mp\zombies\_zm_ai_mechz::get_favorite_enemy;
|
||||||
self.immune_to_slowgun = true;
|
self.immune_to_slowgun = true;
|
||||||
|
self.ignore_inert = true;
|
||||||
|
self.ignore_lava_damage = true;
|
||||||
|
self.ignore_electric_trap = true;
|
||||||
self.animname = "mechz_zombie";
|
self.animname = "mechz_zombie";
|
||||||
self.has_legs = 1;
|
self.has_legs = 1;
|
||||||
self.no_gib = 1;
|
self.no_gib = 1;
|
||||||
|
@ -13,10 +13,18 @@ execute_clientfield_alt_callback_internal( data, last_data, field_type, field_na
|
|||||||
get_data_from_payload( payload )
|
get_data_from_payload( payload )
|
||||||
{
|
{
|
||||||
struct = spawnStruct();
|
struct = spawnStruct();
|
||||||
tokens = strTok( payload, " " );
|
if ( payload != "" )
|
||||||
|
{
|
||||||
|
tokens = strTok( payload, " " );
|
||||||
|
|
||||||
struct.entnum = int( tokens[ 0 ] );
|
struct.entnum = int( tokens[ 0 ] );
|
||||||
struct.value = tokens[ 1 ];
|
struct.value = tokens[ 1 ];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
struct.entnum = -1;
|
||||||
|
struct.value = "";
|
||||||
|
}
|
||||||
|
|
||||||
return struct;
|
return struct;
|
||||||
}
|
}
|
||||||
@ -39,6 +47,12 @@ handle_clientfield_alt_callbacks( dvar_name, field_type, field_name )
|
|||||||
dvar_value = getDvar( dvar_name );
|
dvar_value = getDvar( dvar_name );
|
||||||
if ( dvar_value != old_dvar_value )
|
if ( dvar_value != old_dvar_value )
|
||||||
{
|
{
|
||||||
|
if ( getDvarInt( "clientfield_alt_debug" ) )
|
||||||
|
{
|
||||||
|
print( "handle_clientfield_alt_callbacks( " + dvar_name + ", " + field_type + ", " + field_name + " )" );
|
||||||
|
print( "handle_clientfield_alt_callbacks() dvar_value: \"" + dvar_value + "\" old_dvar_value: \"" + old_dvar_value + "\"" );
|
||||||
|
}
|
||||||
|
|
||||||
level execute_clientfield_alt_callback( dvar_value, old_dvar_value, field_type, field_name );
|
level execute_clientfield_alt_callback( dvar_value, old_dvar_value, field_type, field_name );
|
||||||
old_dvar_value = dvar_value;
|
old_dvar_value = dvar_value;
|
||||||
}
|
}
|
||||||
|
75
zm_ai_pack/scripts/zm/zm_ai_pack_mod_debug_main.csc
Normal file
75
zm_ai_pack/scripts/zm/zm_ai_pack_mod_debug_main.csc
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
main()
|
||||||
|
{
|
||||||
|
level thread watch_say_notify_dvar();
|
||||||
|
level thread command_thread();
|
||||||
|
}
|
||||||
|
|
||||||
|
watch_say_notify_dvar()
|
||||||
|
{
|
||||||
|
setDvar( "say_notify", "" );
|
||||||
|
old_dvar_value = getdvar( "say_notify" );
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
dvar_value = getdvar( "say_notify" );
|
||||||
|
if ( dvar_value != old_dvar_value )
|
||||||
|
{
|
||||||
|
level notify( "say", dvar_value );
|
||||||
|
setDvar( "say_notify", "" );
|
||||||
|
}
|
||||||
|
|
||||||
|
wait 0.01;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
command_thread()
|
||||||
|
{
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
level waittill( "say", message );
|
||||||
|
|
||||||
|
args = strTok( message, " " );
|
||||||
|
|
||||||
|
switch ( args[ 0 ] )
|
||||||
|
{
|
||||||
|
case "printentities":
|
||||||
|
level thread print_entities();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
print_ent_field( message, field )
|
||||||
|
{
|
||||||
|
if ( isDefined( field ) )
|
||||||
|
{
|
||||||
|
print( message + field );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print( message + "none" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
print_entities()
|
||||||
|
{
|
||||||
|
ents = getEntArray( 0 );
|
||||||
|
|
||||||
|
print( "******CLIENT ENTITIES******" );
|
||||||
|
print( "Listing " + ents.size + " entities" );
|
||||||
|
foreach ( ent in ents )
|
||||||
|
{
|
||||||
|
entnum = ent getEntityNumber();
|
||||||
|
print( "***ENT " + entnum + "***" );
|
||||||
|
print_ent_field( "Classname: ", ent.classname );
|
||||||
|
print_ent_field( "Origin: ", ent.origin );
|
||||||
|
print_ent_field( "Angles: ", ent.angles );
|
||||||
|
|
||||||
|
print_ent_field( "Target: ", ent.target );
|
||||||
|
print_ent_field( "Targetname: ", ent.targetname );
|
||||||
|
print_ent_field( "Script_noteworthy: ", ent.script_noteworthy );
|
||||||
|
print_ent_field( "Model: ", ent.model );
|
||||||
|
print_ent_field( "Team: ", ent.team );
|
||||||
|
print( "**************" );
|
||||||
|
}
|
||||||
|
print( "Listed " + ents.size + " entities" );
|
||||||
|
}
|
@ -32,26 +32,58 @@ command_thread()
|
|||||||
{
|
{
|
||||||
level waittill( "say", message, player, is_hidden );
|
level waittill( "say", message, player, is_hidden );
|
||||||
|
|
||||||
if ( message == "print" )
|
args = strTok( message, " " );
|
||||||
|
|
||||||
|
is_server = args[ 0 ] == "s";
|
||||||
|
is_client = args[ 0 ] == "c";
|
||||||
|
|
||||||
|
if ( is_server )
|
||||||
{
|
{
|
||||||
player iPrintLn( player.origin );
|
if ( !isDefined( args[ 1 ] ) )
|
||||||
|
{
|
||||||
|
player iPrintLn( "Missing second argument" );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
switch ( args[ 1 ] )
|
||||||
|
{
|
||||||
|
case "print":
|
||||||
|
player iPrintLn( player.origin );
|
||||||
|
break;
|
||||||
|
case "points":
|
||||||
|
player.score = 1000000;
|
||||||
|
break;
|
||||||
|
case "setdoground":
|
||||||
|
level.next_dog_round = level.round_number + 1;
|
||||||
|
break;
|
||||||
|
case "spawnmechz":
|
||||||
|
level.mechz_left_to_spawn = 1;
|
||||||
|
level notify( "spawn_mechz" );
|
||||||
|
break;
|
||||||
|
case "spawnbrutus":
|
||||||
|
level notify( "spawn_brutus", 1 );
|
||||||
|
break;
|
||||||
|
case "printentities":
|
||||||
|
level thread print_entities();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if ( message == "points" )
|
else if ( is_client )
|
||||||
{
|
{
|
||||||
player.score = 1000000;
|
if ( !isDefined( args[ 1 ] ) )
|
||||||
|
{
|
||||||
|
player iPrintLn( "Missing second argument" );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
switch ( args[ 1 ] )
|
||||||
|
{
|
||||||
|
case "printentities":
|
||||||
|
player setClientDvar( "say_notify", "printentities" );
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if ( message == "setdoground" )
|
else
|
||||||
{
|
{
|
||||||
level.next_dog_round = level.round_number + 1;
|
player iPrintLn( "First argument must be s or c" );
|
||||||
}
|
|
||||||
else if ( message == "spawnmechz" )
|
|
||||||
{
|
|
||||||
level.mechz_left_to_spawn = 1;
|
|
||||||
level notify( "spawn_mechz" );
|
|
||||||
}
|
|
||||||
else if ( message == "spawnbrutus" )
|
|
||||||
{
|
|
||||||
level notify( "spawn_brutus", 1 );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -412,4 +444,40 @@ draw_nodes()
|
|||||||
}
|
}
|
||||||
wait 0.05;
|
wait 0.05;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
print_ent_field( message, field )
|
||||||
|
{
|
||||||
|
if ( isDefined( field ) )
|
||||||
|
{
|
||||||
|
print( message + field );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print( message + "none" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
print_entities()
|
||||||
|
{
|
||||||
|
ents = getEntArray();
|
||||||
|
|
||||||
|
print( "******SERVER ENTITIES******" );
|
||||||
|
print( "Listing " + ents.size + " entities" );
|
||||||
|
foreach ( ent in ents )
|
||||||
|
{
|
||||||
|
entnum = ent getEntityNumber();
|
||||||
|
print( "***ENT " + entnum + "***" );
|
||||||
|
print_ent_field( "Classname: ", ent.classname );
|
||||||
|
print_ent_field( "Origin: ", ent.origin );
|
||||||
|
print_ent_field( "Angles: ", ent.angles );
|
||||||
|
|
||||||
|
print_ent_field( "Target: ", ent.target );
|
||||||
|
print_ent_field( "Targetname: ", ent.targetname );
|
||||||
|
print_ent_field( "Script_noteworthy: ", ent.script_noteworthy );
|
||||||
|
print_ent_field( "Model: ", ent.model );
|
||||||
|
print_ent_field( "Team: ", ent.team );
|
||||||
|
print( "**************" );
|
||||||
|
}
|
||||||
|
print( "Listed " + ents.size + " entities" );
|
||||||
}
|
}
|
@ -54,6 +54,10 @@ main()
|
|||||||
level [[ level.ai_data[ keys[ i ] ].main ]]();
|
level [[ level.ai_data[ keys[ i ] ].main ]]();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ( level.script != "zm_tomb" && level.script != "zm_prison" )
|
||||||
|
{
|
||||||
|
level thread check_solo_status();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
init()
|
init()
|
||||||
@ -311,4 +315,16 @@ watch_crash_trigger_override()
|
|||||||
who [[ sloth_set_state_func ]]( "crash", 0 );
|
who [[ sloth_set_state_func ]]( "crash", 0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
check_solo_status()
|
||||||
|
{
|
||||||
|
if ( getnumexpectedplayers() == 1 && ( !sessionmodeisonlinegame() || !sessionmodeisprivate() ) )
|
||||||
|
{
|
||||||
|
level.is_forever_solo_game = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
level.is_forever_solo_game = 0;
|
||||||
|
}
|
||||||
}
|
}
|
@ -56,6 +56,7 @@ script,clientscripts/mp/zombies/_zm_ai_avogadro.csc
|
|||||||
script,maps/mp/zombies/_zm_ai_screecher.gsc
|
script,maps/mp/zombies/_zm_ai_screecher.gsc
|
||||||
script,clientscripts/mp/zombies/_zm_ai_screecher.csc
|
script,clientscripts/mp/zombies/_zm_ai_screecher.csc
|
||||||
|
|
||||||
|
script,scripts/zm/zm_ai_pack_mod_debug_main.csc
|
||||||
script,scripts/zm/zm_ai_pack_mod_debug_main.gsc
|
script,scripts/zm/zm_ai_pack_mod_debug_main.gsc
|
||||||
script,scripts/zm/zm_ai_pack_mod_main.csc
|
script,scripts/zm/zm_ai_pack_mod_main.csc
|
||||||
script,scripts/zm/zm_ai_pack_mod_main.gsc
|
script,scripts/zm/zm_ai_pack_mod_main.gsc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user