‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
All Data Structures Files Functions Variables Macros
_parasite.csc
Go to the documentation of this file.
1 #using scripts\codescripts\struct;
2 
3 #using scripts\shared\callbacks_shared;
4 #using scripts\shared\clientfield_shared;
5 #using scripts\shared\duplicaterender_mgr;
6 #using scripts\shared\filter_shared;
7 #using scripts\shared\postfx_shared;
8 #using scripts\shared\system_shared;
9 #using scripts\shared\util_shared;
10 #using scripts\shared\vehicle_shared;
11 
12 
13 #insert scripts\shared\shared.gsh;
14 #insert scripts\shared\version.gsh;
15 
16 #define PARASITE_BELLY_GLOW_MIN 0.1
17 #define PARASITE_BELLY_GLOW_MAX 1.0
18 
19 #namespace parasite;
20 
21 function autoexec ‪main()
22 {
26 
28 }
29 
30 function private ‪parasiteTellFxHandler( localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump )
31 {
32  if ( IsDefined( self.tellFxHandle ) )
33  {
34  StopFX( localClientNum, self.tellFxHandle );
35  self.tellFxHandle = undefined;
36  self MapShaderConstant( localClientNum, 0, "scriptVector2", ‪PARASITE_BELLY_GLOW_MIN );
37  }
38 
39  settings = ‪struct::get_script_bundle( "vehiclecustomsettings", "parasitesettings" );
40 
41  if( IsDefined( settings ) )
42  {
43  if( newValue )
44  {
45  self.tellFxHandle = PlayFXOnTag( localClientNum, settings.weakspotfx, self, "tag_flash" );
46  self MapShaderConstant( localClientNum, 0, "scriptVector2", ‪PARASITE_BELLY_GLOW_MAX );
47  }
48  }
49 }
50 
51 function private ‪parasite_damage( localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump )
52 {
53  if ( newValue )
54  {
55  self postfx::PlayPostfxBundle( "pstfx_parasite_dmg" );
56  }
57 }
58 
59 function private ‪parasiteSecondaryDeathFxHandler( localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump )
60 {
61  settings = ‪struct::get_script_bundle( "vehiclecustomsettings", "parasitesettings" );
62 
63  if( IsDefined( settings ) )
64  {
65  if( newValue )
66  {
67  handle = PlayFX( localClientNum, settings.secondary_death_fx_1, self GetTagOrigin( settings.secondary_death_tag_1 ) );
68  SetFXIgnorePause( localClientNum, handle, true );
69  }
70  }
71 }
72 
73 function private ‪_setup_( localClientNum )
74 {
75  self MapShaderConstant( localClientNum, 0, "scriptVector2", ‪PARASITE_BELLY_GLOW_MIN );
76 
77  if( ‪IS_TRUE(level.debug_keyline_zombies) )
78  {
79  self ‪duplicate_render::set_dr_flag( "keyline_active", 1 );
80  self ‪duplicate_render::update_dr_filters(localClientNum);
81  }
82 }
‪main
‪function autoexec main()
Definition: _parasite.csc:21
‪_setup_
‪function private _setup_(localClientNum)
Definition: _parasite.csc:73
‪parasiteSecondaryDeathFxHandler
‪function private parasiteSecondaryDeathFxHandler(localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump)
Definition: _parasite.csc:59
‪CF_CALLBACK_ZERO_ON_NEW_ENT
‪#define CF_CALLBACK_ZERO_ON_NEW_ENT
Definition: version.gsh:103
‪VERSION_SHIP
‪#define VERSION_SHIP
Definition: version.gsh:36
‪update_dr_filters
‪function update_dr_filters(localClientNum)
Definition: duplicaterender_mgr.csc:329
‪IS_TRUE
‪#define IS_TRUE(__a)
Definition: shared.gsh:251
‪parasite_damage
‪function private parasite_damage(localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump)
Definition: _parasite.csc:51
‪parasiteTellFxHandler
‪function private parasiteTellFxHandler(localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump)
Definition: _parasite.csc:30
‪CF_HOST_ONLY
‪#define CF_HOST_ONLY
Definition: version.gsh:102
‪PARASITE_BELLY_GLOW_MIN
‪#define PARASITE_BELLY_GLOW_MIN
Definition: _parasite.csc:16
‪add_vehicletype_callback
‪function add_vehicletype_callback(vehicletype, callback)
Definition: vehicle_shared.csc:77
‪PARASITE_BELLY_GLOW_MAX
‪#define PARASITE_BELLY_GLOW_MAX
Definition: _parasite.csc:17
‪register
‪function register()
Definition: _ai_tank.gsc:126
‪get_script_bundle
‪function get_script_bundle(str_type, str_name)
Definition: struct.csc:45
‪set_dr_flag
‪function set_dr_flag(toset, setto=true)
Definition: duplicaterender_mgr.csc:251