1 #using scripts\codescripts\struct;
3 #using scripts\shared\callbacks_shared;
4 #using scripts\shared\clientfield_shared;
5 #using scripts\shared\filter_shared;
6 #using scripts\shared\util_shared;
8 #using scripts\shared\abilities\_ability_player;
9 #using scripts\shared\abilities\_ability_power;
10 #using scripts\shared\abilities\_ability_util;
12 #insert scripts\shared\shared.gsh;
13 #insert scripts\shared\version.gsh;
15 #using scripts\shared\lui_shared;
17 #using scripts\shared\system_shared;
19 #define MAX_FLASH_ALPHA GetDvarFloat("scr_unstoppableforce_flash_alpha", 0.6)
20 #define FLASH_FADE_IN_TIME GetDvarFloat("scr_unstoppableforce_flash_fade_in_time", 0.075)
21 #define FLASH_FADE_OUT_TIME GetDvarFloat("scr_unstoppableforce_flash_fade_out_time", 0.9)
22 #define UNSTOPPABLEFORCE_BLUR_AMOUNT GetDvarFloat( "scr_unstoppableforce_amount", 0.15 )
23 #define UNSTOPPABLEFORCE_BLUR_INNER_RADIUS GetDvarFloat( "scr_unstoppableforce_inner_radius", 0.6 )
24 #define UNSTOPPABLEFORCE_BLUR_OUTER_RADIUS GetDvarFloat( "scr_unstoppableforce_outer_radius", 1 )
25 #define UNSTOPPABLEFORCE_BLUR_VELOCITY_SHOULDSCALE GetDvarInt( "scr_unstoppableforce_velShouldScale", 1 )
26 #define UNSTOPPABLEFORCE_BLUR_VELOCITY_SCALE GetDvarInt( "scr_unstoppableforce_velScale", 220 )
28 #define UNSTOPPABLEFORCE_SHOW_BOOST_SPEED_TOLERANCE GetDvarInt( "scr_unstoppableforce_boost_speed_tol", 320 )
30 #define UNSTOPPABLEFORCE_ACTIVATION_DELAY GetDvarFloat( "scr_unstoppableforce_activation_delay", 0.35 )
32 #precache( "client_fx", "player/fx_plyr_ability_screen_blur_overdrive" );
51 if ( !
self IsLocalPlayer() || IsSpectating( localClientNum,
false ) || ( (isdefined(level.localPlayers[localClientNum])) && (
self GetEntityNumber() != level.localPlayers[localClientNum] GetEntityNumber())) )
56 if( (newVal != oldval) && newVal)
62 else if ( (newVal != oldval) && !newval )
65 DisableSpeedBlur( localClientNum );
68 self notify(
"end_unstoppableforce_boost_fx");
86 self.firstperson_fx_unstoppableforce = PlayFXOnCamera( localClientNum,
"player/fx_plyr_ability_screen_blur_overdrive", (0,0,0), (1,0,0), (0,0,1) );
92 if (isdefined(
self.firstperson_fx_unstoppableforce))
94 StopFX(localClientNum,
self.firstperson_fx_unstoppableforce);
95 self.firstperson_fx_unstoppableforce = undefined;
102 self endon(
"end_unstoppableforce_boost_fx");
107 self notify(
"end_unstoppableforce_boost_fx");
114 self endon(
"disable_cybercom");
116 self endon(
"end_unstoppableforce_boost_fx");
117 self endon(
"disconnect");
122 while (isDefined(
self))
125 v_player_velocity =
self GetVelocity();
126 v_player_forward = Anglestoforward(
self.angles);
127 n_dot = VectorDot(VectorNormalize(v_player_velocity), v_player_forward);
128 n_speed = Length(v_player_velocity);
133 if (!isdefined(
self.firstperson_fx_unstoppableforce))
140 if (isdefined(
self.firstperson_fx_unstoppableforce))