mirror of
https://github.com/JezuzLizard/Recompilable-gscs-for-BO2-zombies-and-multiplayer.git
synced 2025-06-25 10:07:52 -05:00
Update scripts to better decompiled scripts.
This commit is contained in:
239
MP/Maps/Dig/clientscripts/mp/_fxanim_dlc4.csc
Normal file
239
MP/Maps/Dig/clientscripts/mp/_fxanim_dlc4.csc
Normal 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];
|
||||
}
|
1732
MP/Maps/Dig/clientscripts/mp/createfx/mp_dig_fx.csc
Normal file
1732
MP/Maps/Dig/clientscripts/mp/createfx/mp_dig_fx.csc
Normal file
File diff suppressed because it is too large
Load Diff
21
MP/Maps/Dig/clientscripts/mp/mp_dig.csc
Normal file
21
MP/Maps/Dig/clientscripts/mp/mp_dig.csc
Normal 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_dig_fx;
|
||||
#include clientscripts\mp\_audio;
|
||||
#include clientscripts\mp\mp_dig_amb;
|
||||
|
||||
main()
|
||||
{
|
||||
setsaveddvar( "sm_sunsamplesizenear", 0.25 );
|
||||
setsaveddvar( "sm_sunshadowsmall", 1 );
|
||||
clientscripts\mp\_load::main();
|
||||
clientscripts\mp\mp_dig_fx::main();
|
||||
thread clientscripts\mp\_audio::audio_init( 0 );
|
||||
thread clientscripts\mp\mp_dig_amb::main();
|
||||
waitforclient( 0 );
|
||||
/#
|
||||
println( "*** Client : mp_dig running..." );
|
||||
#/
|
||||
}
|
63
MP/Maps/Dig/clientscripts/mp/mp_dig_amb.csc
Normal file
63
MP/Maps/Dig/clientscripts/mp/mp_dig_amb.csc
Normal file
@ -0,0 +1,63 @@
|
||||
// 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( "dig_outdoor", 1 );
|
||||
setambientroomreverb( "dig_outdoor", "gen_outdoor", 1, 1 );
|
||||
setambientroomcontext( "dig_outdoor", "ringoff_plr", "outdoor" );
|
||||
declareambientroom( "enclosed_room" );
|
||||
setambientroomreverb( "enclosed_room", "dig_stoneroom", 1, 1 );
|
||||
setambientroomcontext( "enclosed_room", "ringoff_plr", "indoor" );
|
||||
declareambientroom( "tarp_room" );
|
||||
setambientroomreverb( "tarp_room", "dig_mediumroom", 1, 1 );
|
||||
setambientroomcontext( "tarp_room", "ringoff_plr", "indoor" );
|
||||
declareambientroom( "open_air_room" );
|
||||
setambientroomreverb( "open_air_room", "dig_partialroom", 1, 1 );
|
||||
setambientroomcontext( "open_air_room", "ringoff_plr", "outdoor" );
|
||||
declareambientroom( "center_open_air_room" );
|
||||
setambientroomreverb( "center_open_air_room", "dig_smallroom", 1, 1 );
|
||||
setambientroomcontext( "center_open_air_room", "ringoff_plr", "outdoor" );
|
||||
declareambientroom( "tunnel_hall" );
|
||||
setambientroomtone( "tunnel_hall", "amb_tunnel_tone_2d", 0.55, 1 );
|
||||
setambientroomreverb( "tunnel_hall", "dig_hallroom", 1, 1 );
|
||||
setambientroomcontext( "tunnel_hall", "ringoff_plr", "indoor" );
|
||||
declareambientroom( "tunnel_room" );
|
||||
setambientroomtone( "tunnel_room", "amb_tunnel_tone_2d", 0.55, 1 );
|
||||
setambientroomreverb( "tunnel_room", "dig_hallroom", 1, 1 );
|
||||
setambientroomcontext( "tunnel_room", "ringoff_plr", "indoor" );
|
||||
thread snd_start_autofx_audio();
|
||||
thread snd_play_loopers();
|
||||
}
|
||||
|
||||
snd_start_autofx_audio()
|
||||
{
|
||||
snd_play_auto_fx( "fx_mp_dig_flood_light", "amb_light", 0, 0, 0, 0 );
|
||||
snd_play_auto_fx( "fx_mp_dig_gas_drip", "amb_drips", 0, 0, 0, 0 );
|
||||
}
|
||||
|
||||
snd_play_loopers()
|
||||
{
|
||||
playloopat( "amb_wind_middle", ( -414, -129, 484 ) );
|
||||
playloopat( "amb_gas_pumper", ( -1009, -168, 125 ) );
|
||||
playloopat( "amb_pipe_flow", ( -1396, 611, 188 ) );
|
||||
playloopat( "amb_pipe_flow_blend", ( -1431, 694, 209 ) );
|
||||
playloopat( "amb_pipe_flow_blend", ( -1313, 464, 170 ) );
|
||||
playloopat( "amb_pipe_flow_2", ( -1073, 141, 154 ) );
|
||||
playloopat( "amb_pipe_flow_2", ( -1144, 277, 152 ) );
|
||||
playloopat( "amb_pipe_flow_2", ( -989, -38, 55 ) );
|
||||
playloopat( "amb_generator", ( -657, 166, 32 ) );
|
||||
playloopat( "amb_generator", ( -622, -490, 39 ) );
|
||||
playloopat( "amb_generator", ( 418, 574, 202 ) );
|
||||
playloopat( "amb_generator", ( 326, -841, 205 ) );
|
||||
playloopat( "amb_generator", ( -538, -248, 112 ) );
|
||||
playloopat( "amb_generator", ( -1674, 1694, 68 ) );
|
||||
playloopat( "amb_generator", ( -1562, 1153, 122 ) );
|
||||
playloopat( "amb_generator", ( -1649, -756, 145 ) );
|
||||
playloopat( "amb_generator", ( -191, 1531, 131 ) );
|
||||
playloopat( "amb_generator", ( 80, 187, 80 ) );
|
||||
playloopat( "amb_generator", ( -514, -1586, 108 ) );
|
||||
}
|
76
MP/Maps/Dig/clientscripts/mp/mp_dig_fx.csc
Normal file
76
MP/Maps/Dig/clientscripts/mp/mp_dig_fx.csc
Normal file
@ -0,0 +1,76 @@
|
||||
// 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_dig_fx;
|
||||
#include clientscripts\mp\_fx;
|
||||
|
||||
precache_scripted_fx()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
precache_createfx_fx()
|
||||
{
|
||||
level._effect["fx_lf_mp_dig_sun1"] = loadfx( "lens_flares/fx_lf_mp_dig_sun1" );
|
||||
level._effect["fx_mp_dig_floor_swirl_sm"] = loadfx( "maps/mp_maps/fx_mp_dig_floor_swirl_sm" );
|
||||
level._effect["fx_mp_dig_floor_swirl_lg"] = loadfx( "maps/mp_maps/fx_mp_dig_floor_swirl_lg" );
|
||||
level._effect["fx_mp_dig_dust"] = loadfx( "maps/mp_maps/fx_mp_dig_dust" );
|
||||
level._effect["fx_mp_dig_dust_fall"] = loadfx( "maps/mp_maps/fx_mp_dig_dust_fall" );
|
||||
level._effect["fx_mp_dig_dust_fall_2"] = loadfx( "maps/mp_maps/fx_mp_dig_dust_fall_2" );
|
||||
level._effect["fx_mp_dig_dust_fall_3"] = loadfx( "maps/mp_maps/fx_mp_dig_dust_fall_3" );
|
||||
level._effect["fx_mp_dig_dust_floor"] = loadfx( "maps/mp_maps/fx_mp_dig_dust_floor" );
|
||||
level._effect["fx_mp_dig_dust_floor_fall"] = loadfx( "maps/mp_maps/fx_mp_dig_dust_floor_fall" );
|
||||
level._effect["fx_mp_dig_dust_fall_pill"] = loadfx( "maps/mp_maps/fx_mp_dig_dust_fall_pill" );
|
||||
level._effect["fx_mp_dig_vista_dust"] = loadfx( "maps/mp_maps/fx_mp_dig_vista_dust" );
|
||||
level._effect["fx_mp_dig_vista_dust_sm"] = loadfx( "maps/mp_maps/fx_mp_dig_vista_dust_sm" );
|
||||
level._effect["fx_mp_dig_vista_dust_close"] = loadfx( "maps/mp_maps/fx_mp_dig_vista_dust_close" );
|
||||
level._effect["fx_mp_dig_heat_distort"] = loadfx( "maps/mp_maps/fx_mp_dig_heat_distort" );
|
||||
level._effect["fx_mp_dig_dust_lg"] = loadfx( "maps/mp_maps/fx_mp_dig_dust_lg" );
|
||||
level._effect["fx_mp_dig_vista_birds"] = loadfx( "maps/mp_maps/fx_mp_dig_vista_birds" );
|
||||
level._effect["fx_mp_dig_godray"] = loadfx( "maps/mp_maps/fx_mp_dig_godray" );
|
||||
level._effect["fx_mp_dig_godray_wide"] = loadfx( "maps/mp_maps/fx_mp_dig_godray_wide" );
|
||||
level._effect["fx_mp_dig_flood_light"] = loadfx( "maps/mp_maps/fx_mp_dig_flood_light" );
|
||||
level._effect["fx_mp_dig_dust_mote"] = loadfx( "maps/mp_maps/fx_mp_dig_dust_mote" );
|
||||
level._effect["fx_mp_dig_gas_drip"] = loadfx( "maps/mp_maps/fx_mp_dig_gas_drip" );
|
||||
}
|
||||
|
||||
#using_animtree("fxanim_props_dlc4");
|
||||
|
||||
precache_fxanim_props_dlc4()
|
||||
{
|
||||
level.scr_anim["fxanim_props_dlc4"]["wires_yellow_01"] = %fxanim_mp_dig_wires_yellow_01_anim;
|
||||
level.scr_anim["fxanim_props_dlc4"]["wires_yellow_02"] = %fxanim_mp_dig_wires_yellow_02_anim;
|
||||
level.scr_anim["fxanim_props_dlc4"]["wires_yellow_03"] = %fxanim_mp_dig_wires_yellow_03_anim;
|
||||
level.scr_anim["fxanim_props_dlc4"]["ropes_01"] = %fxanim_mp_dig_ropes_01_anim;
|
||||
level.scr_anim["fxanim_props_dlc4"]["fuel_pipe"] = %fxanim_mp_dig_fuel_pipe_anim;
|
||||
level.scr_anim["fxanim_props_dlc4"]["wires_yellow_04"] = %fxanim_mp_dig_wires_yellow_04_anim;
|
||||
level.scr_anim["fxanim_props_dlc4"]["wires_yellow_05"] = %fxanim_mp_dig_wires_yellow_05_anim;
|
||||
level.scr_anim["fxanim_props_dlc4"]["wires_yellow_06"] = %fxanim_mp_dig_wires_yellow_06_anim;
|
||||
}
|
||||
|
||||
fxanim_init( localclientnum )
|
||||
{
|
||||
level thread clientscripts\mp\_fxanim_dlc4::fxanim_init_dlc( localclientnum );
|
||||
}
|
||||
|
||||
#using_animtree("fxanim_props");
|
||||
|
||||
precache_fx_anims()
|
||||
{
|
||||
level.scr_anim["fxanim_props"]["roaches"] = %fxanim_gp_roaches_anim;
|
||||
level.fx_anim_level_init = ::fxanim_init;
|
||||
}
|
||||
|
||||
main()
|
||||
{
|
||||
clientscripts\mp\createfx\mp_dig_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();
|
||||
}
|
Reference in New Issue
Block a user