Update scripts to better decompiled scripts.

This commit is contained in:
JezuzLizard
2023-10-26 13:13:39 -07:00
parent 26ba037e40
commit d02a9efd43
2879 changed files with 493771 additions and 466190 deletions

View File

@ -0,0 +1,239 @@
// T6 GSC SOURCE
// Decompiled by https://github.com/xensik/gsc-tool
#include clientscripts\mp\_utility;
fxanim_init_dlc( localclientnum )
{
a_fxanims = getentarray( localclientnum, "fxanim_dlc4", "targetname" );
assert( a_fxanims.size <= level.fxanim_max_anims );
for ( i = 0; i < a_fxanims.size; i++ )
{
if ( isdefined( a_fxanims[i].fxanim_parent ) )
{
parent = getent( localclientnum, a_fxanims[i].fxanim_parent, "targetname" );
a_fxanims[a_fxanims.size] = parent;
a_fxanims[i] thread _fxanim_model_link( localclientnum );
continue;
}
a_fxanims[i] thread fxanim_think( localclientnum );
}
if ( isdefined( level.fx_anim_level_dlc_init ) )
level thread [[ level.fx_anim_level_dlc_init ]]( localclientnum );
}
#using_animtree("fxanim_props_dlc4");
fxanim_think( localclientnum, random_wait, random_speed )
{
self waittill_dobj( localclientnum );
self thread _fxanim_hide();
self _fxanim_wait();
self useanimtree( #animtree );
n_anim_count = self _fxanim_get_anim_count();
self notify( "fxanim_start" );
for ( n_current_anim = 0; n_current_anim < n_anim_count; n_current_anim++ )
{
str_scene = self _fxanim_get_scene_name( n_current_anim );
if ( !self _fxanim_modifier( str_scene ) )
{
self _fxanim_animate( str_scene );
self _fxanim_play_fx( localclientnum );
}
self _fxanim_change_anim( n_current_anim );
}
}
_fxanim_hide()
{
if ( isdefined( self.fxanim_hide ) && self.fxanim_hide )
{
self hide();
self waittill( "fxanim_start" );
self show();
}
}
_fxanim_modifier( str_scene )
{
switch ( str_scene )
{
case "delete":
self delete();
break;
case "hide":
self hide();
break;
default:
return false;
break;
}
return true;
}
_fxanim_wait()
{
if ( isdefined( self.fxanim_waittill_1 ) )
{
if ( isdefined( self.fxanim_waittill_1 ) )
_fxanim_change_anim( -1 );
}
if ( isdefined( self.fxanim_wait ) )
wait( self.fxanim_wait );
else if ( isdefined( self.fxanim_wait_min ) && isdefined( self.fxanim_wait_max ) )
{
n_wait_time = randomfloatrange( self.fxanim_wait_min, self.fxanim_wait_max );
wait( n_wait_time );
}
}
_fxanim_change_anim( n_fxanim_id )
{
str_waittill = undefined;
if ( n_fxanim_id == -1 && isdefined( self.fxanim_waittill_1 ) )
str_waittill = self.fxanim_waittill_1;
else if ( n_fxanim_id == 0 && isdefined( self.fxanim_waittill_2 ) )
str_waittill = self.fxanim_waittill_2;
else if ( n_fxanim_id == 1 && isdefined( self.fxanim_waittill_3 ) )
str_waittill = self.fxanim_waittill_3;
if ( !isdefined( str_waittill ) && n_fxanim_id != -1 )
self _fxanim_wait_for_anim_to_end( n_fxanim_id );
else
{
a_changer = strtok( str_waittill, "_" );
level waittill( str_waittill );
}
}
_fxanim_wait_for_anim_to_end( n_fxanim_id )
{
str_scene = _fxanim_get_scene_name( n_fxanim_id );
if ( issubstr( str_scene, "_loop" ) )
self waittillmatch( "looping anim", "end" );
else
self waittillmatch( "single anim", "end" );
}
_fxanim_animate( str_scene )
{
if ( !isdefined( level.scr_anim["fxanim_props_dlc4"][str_scene] ) )
{
/#
if ( isdefined( str_scene ) )
println( "Error: fxanim entity at " + self.origin + " is missing animation: " + str_scene );
else
println( "Error: fxanim entity at " + self.origin + " is missing animation" );
#/
return;
}
self animscripted( level.scr_anim["fxanim_props_dlc4"][str_scene], 1.0, 0.0, 1.0 );
}
_fxanim_play_fx( localclientnum )
{
if ( isdefined( self.fxanim_fx_1 ) )
{
assert( isdefined( self.fxanim_fx_1_tag ), "KVP fxanim_fx_1_tag must be set on fxanim at " + self.origin );
playfxontag( localclientnum, getfx( self.fxanim_fx_1 ), self, self.fxanim_fx_1_tag );
}
if ( isdefined( self.fxanim_fx_2 ) )
{
assert( isdefined( self.fxanim_fx_2_tag ), "KVP fxanim_fx_2_tag must be set on fxanim at " + self.origin );
playfxontag( localclientnum, getfx( self.fxanim_fx_2 ), self, self.fxanim_fx_2_tag );
}
if ( isdefined( self.fxanim_fx_3 ) )
{
assert( isdefined( self.fxanim_fx_3_tag ), "KVP fxanim_fx_3_tag must be set on fxanim at " + self.origin );
playfxontag( localclientnum, getfx( self.fxanim_fx_3 ), self, self.fxanim_fx_3_tag );
}
if ( isdefined( self.fxanim_fx_4 ) )
{
assert( isdefined( self.fxanim_fx_4_tag ), "KVP fxanim_fx_4_tag must be set on fxanim at " + self.origin );
playfxontag( localclientnum, getfx( self.fxanim_fx_4 ), self, self.fxanim_fx_4_tag );
}
if ( isdefined( self.fxanim_fx_5 ) )
{
assert( isdefined( self.fxanim_fx_5_tag ), "KVP fxanim_fx_5_tag must be set on fxanim at " + self.origin );
playfxontag( localclientnum, getfx( self.fxanim_fx_5 ), self, self.fxanim_fx_5_tag );
}
}
_fxanim_get_anim_count()
{
assert( isdefined( self.fxanim_scene_1 ), "fxanim at position " + self.origin + " needs at least one scene defined. Use the KVP fxanim_scene_1" );
n_fx_count = 0;
if ( !isdefined( self.fxanim_scene_2 ) )
n_fx_count = 1;
else if ( !isdefined( self.fxanim_scene_3 ) )
n_fx_count = 2;
else
n_fx_count = 3;
return n_fx_count;
}
_fxanim_get_scene_name( n_anim_id )
{
str_scene_name = undefined;
switch ( n_anim_id )
{
case 0:
str_scene_name = self.fxanim_scene_1;
break;
case 1:
str_scene_name = self.fxanim_scene_2;
break;
case 2:
str_scene_name = self.fxanim_scene_3;
break;
}
return str_scene_name;
}
_fxanim_model_link( localclientnum )
{
self waittill_dobj( localclientnum );
assert( isdefined( self.fxanim_tag ), "Model at origin " + self.origin + " needs an fxanim_tag defined, to show which tag the model will link to" );
m_parent = getent( localclientnum, self.fxanim_parent, "targetname" );
assert( isdefined( m_parent ), "Model at origin " + self.origin + " does not have a proper parent. Make sure the fxanim_parent matches the targetname of the fxanim" );
m_parent waittill_dobj( localclientnum );
self.origin = m_parent gettagorigin( self.fxanim_tag );
self.angles = m_parent gettagangles( self.fxanim_tag );
self linkto( m_parent, self.fxanim_tag );
if ( isdefined( self.fxanim_hide ) )
{
self hide();
m_parent waittill( "fxanim_start" );
self show();
}
}
getfx( fx )
{
assert( isdefined( level._effect[fx] ), "Fx " + fx + " is not defined in level._effect." );
return level._effect[fx];
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,21 @@
// T6 GSC SOURCE
// Decompiled by https://github.com/xensik/gsc-tool
#include clientscripts\mp\_utility;
#include clientscripts\mp\_load;
#include clientscripts\mp\mp_pod_fx;
#include clientscripts\mp\_audio;
#include clientscripts\mp\mp_pod_amb;
main()
{
clientscripts\mp\_load::main();
clientscripts\mp\mp_pod_fx::main();
thread clientscripts\mp\_audio::audio_init( 0 );
thread clientscripts\mp\mp_pod_amb::main();
setsaveddvar( "sm_sunsamplesizenear", 0.25 );
setsaveddvar( "sm_sunshadowsmall", 1 );
waitforclient( 0 );
/#
println( "*** Client : mp_pod running..." );
#/
}

View File

@ -0,0 +1,46 @@
// T6 GSC SOURCE
// Decompiled by https://github.com/xensik/gsc-tool
#include clientscripts\mp\_utility;
#include clientscripts\mp\_ambientpackage;
#include clientscripts\mp\_audio;
main()
{
declareambientroom( "pod_outdoor", 1 );
setambientroomtone( "pod_outdoor", "amb_wind_exterior_2d", 0.55, 1 );
setambientroomreverb( "pod_outdoor", "pod_outdoor", 1, 1 );
setambientroomcontext( "pod_outdoor", "ringoff_plr", "outdoor" );
declareambientroom( "pod_small_int" );
setambientroomtone( "pod_small_int", "amb_wind_interior_2d", 0.55, 1 );
setambientroomreverb( "pod_small_int", "pod_mediumroom", 1, 1 );
setambientroomcontext( "pod_small_int", "ringoff_plr", "indoor" );
declareambientroom( "pod_stone_int" );
setambientroomtone( "pod_stone_int", "amb_wind_interior_2d", 0.55, 1 );
setambientroomreverb( "pod_stone_int", "pod_stoneroom", 1, 1 );
setambientroomcontext( "pod_stone_int", "ringoff_plr", "indoor" );
declareambientroom( "room_small" );
setambientroomtone( "room_small", "amb_wind_interior_2d", 0.55, 1 );
setambientroomreverb( "room_small", "pod_smallroom", 1, 1 );
setambientroomcontext( "room_small", "ringoff_plr", "indoor" );
declareambientroom( "open_room" );
setambientroomtone( "open_room", "amb_wind_interior_2d", 0.55, 1 );
setambientroomreverb( "open_room", "pod_partialroom", 1, 1 );
setambientroomcontext( "open_room", "ringoff_plr", "indoor" );
declareambientroom( "corridor_room" );
setambientroomtone( "corridor_room", "amb_wind_interior_2d", 0.55, 1 );
setambientroomreverb( "corridor_room", "pod_hallroom", 1, 1 );
setambientroomcontext( "corridor_room", "ringoff_plr", "indoor" );
thread snd_start_autofx_audio();
thread snd_play_loopers();
}
snd_start_autofx_audio()
{
snd_play_auto_fx( "fx_mp_pod_water_drips", "amb_water_drip_loop", 0, 0, 0, 1 );
snd_play_auto_fx( "fx_mp_water_drip_light_shrt", "amb_water_drip_loop_small", 0, 0, 0, 1 );
}
snd_play_loopers()
{
}

View File

@ -0,0 +1,93 @@
// T6 GSC SOURCE
// Decompiled by https://github.com/xensik/gsc-tool
#include clientscripts\mp\_utility;
#include clientscripts\mp\_fxanim_dlc4;
#include clientscripts\mp\createfx\mp_pod_fx;
#include clientscripts\mp\_fx;
precache_scripted_fx()
{
}
precache_createfx_fx()
{
level._effect["fx_mp_pod_glass_drop_trail"] = loadfx( "maps/mp_maps/fx_mp_pod_glass_drop_trail" );
level._effect["fx_mp_pod_glass_drop_runner"] = loadfx( "maps/mp_maps/fx_mp_pod_glass_drop_runner" );
level._effect["fx_mp_pod_water_spill"] = loadfx( "maps/mp_maps/fx_mp_pod_water_spill" );
level._effect["fx_mp_pod_water_spill_02"] = loadfx( "maps/mp_maps/fx_mp_pod_water_spill_02" );
level._effect["fx_mp_pod_water_spill_splash"] = loadfx( "maps/mp_maps/fx_mp_pod_water_spill_splash" );
level._effect["fx_mp_water_drip_light_shrt"] = loadfx( "maps/mp_maps/fx_mp_water_drip_light_shrt" );
level._effect["fx_mp_water_drip_light_long"] = loadfx( "maps/mp_maps/fx_mp_water_drip_light_long" );
level._effect["fx_mp_pod_water_drips"] = loadfx( "maps/mp_maps/fx_mp_pod_water_drips" );
level._effect["fx_fog_drift_slow"] = loadfx( "fog/fx_fog_drift_slow" );
level._effect["fx_fog_drift_slow_md"] = loadfx( "fog/fx_fog_drift_slow_md" );
level._effect["fx_fog_drift_slow_sm"] = loadfx( "fog/fx_fog_drift_slow_sm" );
level._effect["fx_fog_drift_slow_vista"] = loadfx( "fog/fx_fog_drift_slow_vista" );
level._effect["fx_mp_light_dust_motes_md"] = loadfx( "maps/mp_maps/fx_mp_light_dust_motes_md" );
level._effect["fx_lf_mp_pod_sun"] = loadfx( "lens_flares/fx_lf_mp_pod_sun" );
level._effect["fx_insects_swarm_md_light"] = loadfx( "bio/insects/fx_insects_swarm_md_light" );
level._effect["fx_insects_swarm_lg_light"] = loadfx( "bio/insects/fx_insects_swarm_lg_light" );
level._effect["fx_insects_fireflies_mp"] = loadfx( "bio/insects/fx_insects_fireflies_mp" );
level._effect["fx_insects_flies_dragonflies"] = loadfx( "bio/insects/fx_insects_flies_dragonflies" );
level._effect["fx_insects_roaches"] = loadfx( "bio/insects/fx_insects_roaches" );
level._effect["fx_insects_roaches_fast"] = loadfx( "bio/insects/fx_insects_roaches_fast" );
level._effect["fx_insects_roaches_short"] = loadfx( "bio/insects/fx_insects_roaches_short" );
}
#using_animtree("fxanim_props_dlc4");
precache_fxanim_props_dlc4()
{
level.scr_anim["fxanim_props_dlc4"]["wire_01"] = %fxanim_mp_pod_wire_01_anim;
level.scr_anim["fxanim_props_dlc4"]["wire_02"] = %fxanim_mp_pod_wire_02_anim;
level.scr_anim["fxanim_props_dlc4"]["wire_03"] = %fxanim_mp_pod_wire_03_anim;
level.scr_anim["fxanim_props_dlc4"]["wire_04"] = %fxanim_mp_pod_wire_04_anim;
level.scr_anim["fxanim_props_dlc4"]["wire_05"] = %fxanim_mp_pod_wire_05_anim;
level.scr_anim["fxanim_props_dlc4"]["wire_06"] = %fxanim_mp_pod_wire_06_anim;
level.scr_anim["fxanim_props_dlc4"]["wire_07"] = %fxanim_mp_pod_wire_07_anim;
level.scr_anim["fxanim_props_dlc4"]["wire_08"] = %fxanim_mp_pod_wire_08_anim;
level.scr_anim["fxanim_props_dlc4"]["wire_09"] = %fxanim_mp_pod_wire_09_anim;
level.scr_anim["fxanim_props_dlc4"]["shirt03"] = %fxanim_gp_shirts03_anim;
level.scr_anim["fxanim_props_dlc4"]["vine_clump_01"] = %fxanim_mp_pod_vine_clump_01_anim;
level.scr_anim["fxanim_props_dlc4"]["vine_clump_02"] = %fxanim_mp_pod_vine_clump_02_anim;
level.scr_anim["fxanim_props_dlc4"]["vine_clump_long"] = %fxanim_mp_pod_vine_clump_long_anim;
level.scr_anim["fxanim_props_dlc4"]["vine_med_leafy"] = %fxanim_mp_pod_vine_med_leafy_anim;
level.scr_anim["fxanim_props_dlc4"]["vine_med_bare"] = %fxanim_mp_pod_vine_med_bare_anim;
level.scr_anim["fxanim_props_dlc4"]["vine_long_leafy"] = %fxanim_mp_pod_vine_long_leafy_anim;
level.scr_anim["fxanim_props_dlc4"]["vine_long_bare"] = %fxanim_mp_pod_vine_long_bare_anim;
level.scr_anim["fxanim_props_dlc4"]["bushy_clump_01"] = %fxanim_mp_pod_bushy_clump_01_anim;
level.scr_anim["fxanim_props_dlc4"]["bushy_clump_02"] = %fxanim_mp_pod_bushy_clump_02_anim;
level.scr_anim["fxanim_props_dlc4"]["vine_loops_pod"] = %fxanim_mp_pod_vine_loops_pod_anim;
level.scr_anim["fxanim_props_dlc4"]["pool_wires"] = %fxanim_mp_pod_pool_wires_anim;
}
fxanim_init( localclientnum )
{
level thread clientscripts\mp\_fxanim_dlc4::fxanim_init_dlc( localclientnum );
}
#using_animtree("fxanim_props");
precache_fx_anims()
{
level.scr_anim = [];
level.scr_anim["fxanim_props"]["seagull_circle_01"] = %fxanim_gp_seagull_circle_01_anim;
level.scr_anim["fxanim_props"]["seagull_circle_02"] = %fxanim_gp_seagull_circle_02_anim;
level.scr_anim["fxanim_props"]["seagull_circle_03"] = %fxanim_gp_seagull_circle_03_anim;
level.scr_anim["fxanim_props"]["sheet_med"] = %fxanim_gp_cloth_sheet_med_anim;
level.fx_anim_level_init = ::fxanim_init;
}
main()
{
clientscripts\mp\createfx\mp_pod_fx::main();
clientscripts\mp\_fx::reportnumeffects();
precache_createfx_fx();
precache_fx_anims();
precache_fxanim_props_dlc4();
disablefx = getdvarint( _hash_C9B177D6 );
if ( !isdefined( disablefx ) || disablefx <= 0 )
precache_scripted_fx();
}