mirror of
https://github.com/JezuzLizard/t6-fastfile-mods.git
synced 2025-06-10 11:17:59 -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:
@ -13,10 +13,18 @@ execute_clientfield_alt_callback_internal( data, last_data, field_type, field_na
|
||||
get_data_from_payload( payload )
|
||||
{
|
||||
struct = spawnStruct();
|
||||
tokens = strTok( payload, " " );
|
||||
if ( payload != "" )
|
||||
{
|
||||
tokens = strTok( payload, " " );
|
||||
|
||||
struct.entnum = int( tokens[ 0 ] );
|
||||
struct.value = tokens[ 1 ];
|
||||
struct.entnum = int( tokens[ 0 ] );
|
||||
struct.value = tokens[ 1 ];
|
||||
}
|
||||
else
|
||||
{
|
||||
struct.entnum = -1;
|
||||
struct.value = "";
|
||||
}
|
||||
|
||||
return struct;
|
||||
}
|
||||
@ -39,6 +47,12 @@ handle_clientfield_alt_callbacks( dvar_name, field_type, field_name )
|
||||
dvar_value = getDvar( dvar_name );
|
||||
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 );
|
||||
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 );
|
||||
|
||||
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" )
|
||||
{
|
||||
player.score = 1000000;
|
||||
else if ( is_client )
|
||||
{
|
||||
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;
|
||||
}
|
||||
else if ( message == "spawnmechz" )
|
||||
{
|
||||
level.mechz_left_to_spawn = 1;
|
||||
level notify( "spawn_mechz" );
|
||||
}
|
||||
else if ( message == "spawnbrutus" )
|
||||
{
|
||||
level notify( "spawn_brutus", 1 );
|
||||
player iPrintLn( "First argument must be s or c" );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -412,4 +444,40 @@ draw_nodes()
|
||||
}
|
||||
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 ]]();
|
||||
}
|
||||
}
|
||||
if ( level.script != "zm_tomb" && level.script != "zm_prison" )
|
||||
{
|
||||
level thread check_solo_status();
|
||||
}
|
||||
}
|
||||
|
||||
init()
|
||||
@ -311,4 +315,16 @@ watch_crash_trigger_override()
|
||||
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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user