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_dlc3", "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_dlc3");
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_dlc3"][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_dlc3"][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,56 @@
// T6 GSC SOURCE
// Decompiled by https://github.com/xensik/gsc-tool
#include clientscripts\mp\_utility;
#include clientscripts\mp\_load;
#include clientscripts\mp\mp_paintball_fx;
#include clientscripts\mp\_audio;
#include clientscripts\mp\mp_paintball_amb;
main()
{
level.worldmapx = 0;
level.worldmapy = 0;
level.worldlat = 32.1143;
level.worldlong = -82.9414;
clientscripts\mp\_load::main();
clientscripts\mp\mp_paintball_fx::main();
thread clientscripts\mp\_audio::audio_init( 0 );
thread clientscripts\mp\mp_paintball_amb::main();
registerclientfield( "scriptmover", "police_car_lights", 1, 1, "int", ::destructible_car_lights, 0 );
setsaveddvar( "sm_sunshadowsmall", 1 );
setsaveddvar( "sm_sunsamplesizenear", 0.35 );
waitforclient( 0 );
/#
println( "*** Client : mp_paintball running..." );
#/
}
destructible_car_lights( localclientnum, oldval, newval, bnewent, binitialsnap, fieldname, bwasdemojump )
{
player = getlocalplayer( localclientnum );
if ( !isdefined( player ) )
return;
if ( player getinkillcam( localclientnum ) )
return;
if ( newval )
{
wait( randomfloatrange( 0.1, 0.5 ) );
if ( isdefined( self.fx ) )
{
stopfx( localclientnum, self.fx );
self.fx = undefined;
}
if ( fieldname == "police_car_lights" )
self.fx = playfxontag( localclientnum, level._effect["fx_mp_light_police_car"], self, "tag_origin" );
}
else if ( isdefined( self.fx ) )
{
stopfx( localclientnum, self.fx );
self.fx = undefined;
}
}

View File

@ -0,0 +1,61 @@
// 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( "paintball_outdoor", 1 );
setambientroomtone( "paintball_outdoor", "amb_wind_exterior_2d", 0.4, 1 );
setambientroomreverb( "paintball_outdoor", "paintball_outdoor", 1, 1 );
setambientroomcontext( "paintball_outdoor", "ringoff_plr", "outdoor" );
declareambientroom( "obstacle_area_room" );
setambientroomtone( "obstacle_area_room", "amb_wind_interior_2d", 0.4, 1 );
setambientroomreverb( "obstacle_area_room", "paintball_outdoor", 1, 1 );
setambientroomcontext( "obstacle_area_room", "ringoff_plr", "indoor" );
declareambientroom( "obstacle_area_small_room" );
setambientroomtone( "obstacle_area_small_room", "amb_wind_interior_2d", 0.4, 1 );
setambientroomreverb( "obstacle_area_small_room", "paintball_wood_small", 1, 1 );
setambientroomcontext( "obstacle_area_small_room", "ringoff_plr", "indoor" );
declareambientroom( "obstacle_area_corridor" );
setambientroomtone( "obstacle_area_corridor", "amb_wind_interior_2d", 0.4, 1 );
setambientroomreverb( "obstacle_area_corridor", "paintball_hallway", 1, 1 );
setambientroomcontext( "obstacle_area_corridor", "ringoff_plr", "indoor" );
declareambientroom( "warehouse_room" );
setambientroomtone( "warehouse_room", "amb_wind_interior_2d", 0.4, 1 );
setambientroomreverb( "warehouse_room", "paintball_wherehouse", 1, 1 );
setambientroomcontext( "warehouse_room", "ringoff_plr", "indoor" );
declareambientroom( "warehouse_entrance" );
setambientroomtone( "warehouse_entrance", "amb_wind_exterior_2d_qt", 0.4, 1 );
setambientroomreverb( "warehouse_entrance", "gen_mediumroom", 1, 1 );
setambientroomcontext( "warehouse_entrance", "ringoff_plr", "indoor" );
declareambientroom( "proshop_room" );
setambientroomtone( "proshop_room", "amb_wind_interior_2d", 0.4, 1 );
setambientroomreverb( "proshop_room", "paintball_room_medium", 1, 1 );
setambientroomcontext( "proshop_room", "ringoff_plr", "indoor" );
declareambientroom( "proshop_room_small" );
setambientroomtone( "proshop_room_small", "amb_wind_interior_2d", 0.4, 1 );
setambientroomreverb( "proshop_room_small", "paintball_proshop", 1, 1 );
setambientroomcontext( "proshop_room_small", "ringoff_plr", "indoor" );
declareambientroom( "bus_room" );
setambientroomtone( "bus_room", "amb_wind_exterior_2d_qt", 0.4, 1 );
setambientroomreverb( "bus_room", "paintball_bus", 1, 1 );
setambientroomcontext( "bus_room", "ringoff_plr", "indoor" );
declareambientroom( "obstacle_area_under_room" );
setambientroomtone( "obstacle_area_under_room", "amb_wind_interior_2d", 0.4, 1 );
setambientroomreverb( "obstacle_area_under_room", "paintball_wood_small", 1, 1 );
setambientroomcontext( "obstacle_area_under_room", "ringoff_plr", "indoor" );
thread snd_start_autofx_audio();
thread snd_play_loopers();
}
snd_play_loopers()
{
}
snd_start_autofx_audio()
{
}

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_dlc3;
#include clientscripts\mp\createfx\mp_paintball_fx;
#include clientscripts\mp\_fx;
precache_scripted_fx()
{
}
precache_createfx_fx()
{
level._effect["fx_pntbll_light_ray_sun_wide_wndw"] = loadfx( "light/fx_pntbll_light_ray_sun_wide_wndw" );
level._effect["fx_pntbll_light_ray_sun_md_lng"] = loadfx( "light/fx_pntbll_light_ray_sun_md_lng" );
level._effect["fx_pntbll_light_ray_sun_md_lng_1s"] = loadfx( "light/fx_pntbll_light_ray_sun_md_lng_1s" );
level._effect["fx_pntbll_light_ray_sun_md_xlng_1s"] = loadfx( "light/fx_pntbll_light_ray_sun_md_xlng_1s" );
level._effect["fx_pntbll_light_ray_sun_md_lng_wd_1s"] = loadfx( "light/fx_pntbll_light_ray_sun_md_lng_wd_1s" );
level._effect["fx_pntbll_light_ray_sun_md_lng_wd"] = loadfx( "light/fx_pntbll_light_ray_sun_md_lng_wd" );
level._effect["fx_pntbll_light_ray_sun_lg_lng_wide"] = loadfx( "light/fx_pntbll_light_ray_sun_lg_lng_wide" );
level._effect["fx_pntbll_light_ray_sun_lg_lng_wide_ln"] = loadfx( "light/fx_pntbll_light_ray_sun_lg_lng_wide_ln" );
level._effect["fx_pntbll_light_ray_sun_md_lng_bright"] = loadfx( "light/fx_pntbll_light_ray_sun_md_lng_bright" );
level._effect["fx_pntbll_light_ray_tree_md_lng"] = loadfx( "light/fx_pntbll_light_ray_tree_md_lng" );
level._effect["fx_pntbll_light_ray_tree_md_lng_thin"] = loadfx( "light/fx_pntbll_light_ray_tree_md_lng_thin" );
level._effect["fx_pntbll_light_ray_tree_md_xlng_thin"] = loadfx( "light/fx_pntbll_light_ray_tree_md_xlng_thin" );
level._effect["fx_pntbll_light_ray_camo_net_md"] = loadfx( "light/fx_pntbll_light_ray_camo_net_md" );
level._effect["fx_pntbll_light_ray_camo_net_lng_dim"] = loadfx( "light/fx_pntbll_light_ray_camo_net_lng_dim" );
level._effect["fx_pntbll_light_ray_shop_md_lng_thin"] = loadfx( "light/fx_pntbll_light_ray_shop_md_lng_thin" );
level._effect["fx_pntbll_light_ray_shop_md_lng_dim"] = loadfx( "light/fx_pntbll_light_ray_shop_md_lng_dim" );
level._effect["fx_pntbll_light_ray_shop_md_lng_wide"] = loadfx( "light/fx_pntbll_light_ray_shop_md_lng_wide" );
level._effect["fx_light_flour_glow_yellow"] = loadfx( "light/fx_light_flour_glow_yellow" );
level._effect["fx_mp_light_dust_motes_md"] = loadfx( "maps/mp_maps/fx_mp_light_dust_motes_md" );
level._effect["fx_light_dust_motes_xsm_short"] = loadfx( "light/fx_concert_dust_motes_xsm_short" );
level._effect["fx_light_dust_motes_sm"] = loadfx( "light/fx_light_dust_motes_sm" );
level._effect["fx_dust_motes_blowing_sm"] = loadfx( "debris/fx_dust_motes_blowing_sm" );
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_mp_pntbll_steam_thck_md"] = loadfx( "maps/mp_maps/fx_mp_pntbll_steam_thck_md" );
level._effect["fx_mp_pntbll_steam_thck_sm"] = loadfx( "maps/mp_maps/fx_mp_pntbll_steam_thck_sm" );
level._effect["fx_mp_pntbll_steam_thck_xsm"] = loadfx( "maps/mp_maps/fx_mp_pntbll_steam_thck_xsm" );
level._effect["fx_mp_pntbll_steam_thck_gray"] = loadfx( "maps/mp_maps/fx_mp_pntbll_steam_thck_gray" );
level._effect["fx_mp_steam_vent_ceiling"] = loadfx( "maps/mp_maps/fx_mp_steam_vent_ceiling" );
level._effect["fx_mp_steam_vent_ceiling_lg"] = loadfx( "maps/mp_maps/fx_mp_steam_vent_ceiling_lg" );
level._effect["fx_mp_vent_steam_lite_wind"] = loadfx( "maps/mp_maps/fx_mp_vent_steam_lite_wind" );
level._effect["fx_mp_pntbll_smk_truck_md"] = loadfx( "maps/mp_maps/fx_mp_pntbll_smk_truck_md" );
level._effect["fx_mp_pntbll_smk_truck_sm"] = loadfx( "maps/mp_maps/fx_mp_pntbll_smk_truck_sm" );
level._effect["fx_leaves_falling_pine_nowind"] = loadfx( "foliage/fx_leaves_falling_pine_nowind" );
level._effect["fx_mp_light_police_car"] = loadfx( "maps/mp_maps/fx_mp_light_police_car" );
level._effect["fx_light_stadium_flood"] = loadfx( "light/fx_light_stadium_flood" );
level._effect["fx_light_stadium_flood_flckr"] = loadfx( "light/fx_light_stadium_flood_flckr" );
level._effect["fx_light_recessed_cool_sm_soft"] = loadfx( "light/fx_light_recessed_cool_sm_soft" );
level._effect["fx_light_track_omni"] = loadfx( "light/fx_light_track_omni" );
level._effect["fx_mp_pntbll_paint_drips"] = loadfx( "maps/mp_maps/fx_mp_pntbll_paint_drips" );
level._effect["fx_lf_mp_paintball_sun1"] = loadfx( "lens_flares/fx_lf_mp_paintball_sun1" );
level._effect["fx_mp_light_police_car"] = loadfx( "maps/mp_maps/fx_mp_light_police_car" );
}
precache_fx_anims()
{
level.scr_anim = [];
level.scr_anim["fxanim_props"] = [];
level.fx_anim_level_init = ::fxanim_init;
}
#using_animtree("fxanim_props_dlc3");
precache_fxanim_props_dlc3()
{
level.scr_anim["fxanim_props_dlc3"]["wires_01"] = %fxanim_mp_paint_wires_01_anim;
level.scr_anim["fxanim_props_dlc3"]["wires_02"] = %fxanim_mp_paint_wires_02_anim;
level.scr_anim["fxanim_props_dlc3"]["shop_banners"] = %fxanim_paint_shop_banner_01_anim;
level.scr_anim["fxanim_props_dlc3"]["shop_banners_wall"] = %fxanim_paint_shop_banner_02_anim;
level.scr_anim["fxanim_props_dlc3"]["wires_03"] = %fxanim_mp_paint_wires_03_anim;
}
fxanim_init( localclientnum )
{
level thread clientscripts\mp\_fxanim_dlc3::fxanim_init_dlc( localclientnum );
}
main()
{
clientscripts\mp\createfx\mp_paintball_fx::main();
clientscripts\mp\_fx::reportnumeffects();
precache_createfx_fx();
precache_fx_anims();
precache_fxanim_props_dlc3();
disablefx = getdvarint( _hash_C9B177D6 );
if ( !isdefined( disablefx ) || disablefx <= 0 )
precache_scripted_fx();
}