‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
_zm_melee_weapon.gsc
Go to the documentation of this file.
1 #using scripts\codescripts\struct;
2 
3 #using scripts\shared\clientfield_shared;
4 #using scripts\shared\laststand_shared;
5 #using scripts\shared\util_shared;
6 #using scripts\shared\system_shared;
7 
8 #insert scripts\shared\shared.gsh;
9 
10 #using scripts\zm\_zm_audio;
11 #using scripts\zm\_zm_equipment;
12 #using scripts\zm\_zm_laststand;
13 #using scripts\zm\_zm_pers_upgrades_functions;
14 #using scripts\zm\_zm_score;
15 #using scripts\zm\_zm_utility;
16 #using scripts\zm\_zm_weapons;
17 
18 #insert scripts\zm\_zm_utility.gsh;
19 
20 #namespace zm_melee_weapon;
21 
22 //
23 // General melee weapon support
24 //
25 
26 //
27 // global settings
28 // Add this line to main() if players should be able to switch between melee weapons
29 // level._allow_melee_weapon_switching = 1;
30 // Without it, buying any melee weapon will disable the wall-buys for all other melee weapons
31 //
32 
33 //
34 // Unresolved corner case:
35 // Buy sickle
36 // Buy ballistic knife
37 // Go to pack a puch and start upgrading the ballistic knife
38 // While the machine is churning buy a bowie knife
39 // Take your upgraded weapon
40 // -- you should have the ballistic & bowie but instead you will have ballistic and sickle
41 //
42 
43 ‪REGISTER_SYSTEM_EX( "melee_weapon", &‪__init__, &‪__main__, undefined )
44 
45 function private ‪__init__()
46 {
47  if ( !isdefined( level._melee_weapons ) )
48  {
49  level._melee_weapons = [];
50  }
51 }
52 
53 function private ‪__main__()
54 {
55 }
56 
57 
58 // This is called from the init() calls for the individual weapons
59 
60 function ‪init( weapon_name, flourish_weapon_name, ballistic_weapon_name, ballistic_upgraded_weapon_name, cost, wallbuy_targetname, hint_string, vo_dialog_id, flourish_fn )
61 {
62  weapon = GetWeapon( weapon_name );
63  flourish_weapon = GetWeapon( flourish_weapon_name );
64  ballistic_weapon = level.weaponNone;
65  if ( isdefined( ballistic_weapon_name ) )
66  ballistic_weapon = GetWeapon( ballistic_weapon_name );
67  ballistic_upgraded_weapon = level.weaponNone;
68  if ( isdefined( ballistic_upgraded_weapon_name ) )
69  ballistic_upgraded_weapon = GetWeapon( ballistic_upgraded_weapon_name );
70 
71  ‪add_melee_weapon( weapon, flourish_weapon, ballistic_weapon, ballistic_upgraded_weapon, cost, wallbuy_targetname, hint_string, vo_dialog_id, flourish_fn );
72 
73  melee_weapon_triggers = GetEntArray( wallbuy_targetname, "targetname" );
74  for ( i = 0; i < melee_weapon_triggers.size; i++ )
75  {
76  knife_model = GetEnt( melee_weapon_triggers[i].target, "targetname" );
77  if ( isdefined( knife_model ) )
78  {
79  knife_model hide();
80  }
81 
82  melee_weapon_triggers[i] thread ‪melee_weapon_think( weapon, cost, flourish_fn, vo_dialog_id, flourish_weapon, ballistic_weapon, ballistic_upgraded_weapon );
83 
84  melee_weapon_triggers[i] SetHintString( hint_string, cost );
85  cursor_hint = "HINT_WEAPON";
86  cursor_hint_weapon = weapon;
87  melee_weapon_triggers[i] setCursorHint( cursor_hint, cursor_hint_weapon );
88  melee_weapon_triggers[i] UseTriggerRequireLookAt();
89  }
90 
91  // Support for spawnable system.
92 
93  melee_weapon_structs = ‪struct::get_array( wallbuy_targetname, "targetname");
94 
95  for ( i = 0; i < melee_weapon_structs.size; i++ )
96  {
97  ‪prepare_stub( melee_weapon_structs[i].trigger_stub, weapon, flourish_weapon, ballistic_weapon, ballistic_upgraded_weapon, cost, wallbuy_targetname, hint_string, vo_dialog_id, flourish_fn );
98  }
99 
100 
102  //zm_weapons::add_retrievable_knife_init_name( ballistic_weapon );
103  //zm_weapons::add_retrievable_knife_init_name( ballistic_upgraded_weapon );
104 
105  if ( !isDefined( level.ballistic_weapon ) )
106  {
107  level.ballistic_weapon = [];
108  }
109  level.ballistic_weapon[weapon] = ballistic_weapon;
110 
111  if ( !isDefined( level.ballistic_upgraded_weapon ) )
112  {
113  level.ballistic_upgraded_weapon = [];
114  }
115  level.ballistic_upgraded_weapon[weapon] = ballistic_upgraded_weapon;
116 
117 }
118 
119 function ‪prepare_stub( stub, weapon, flourish_weapon, ballistic_weapon, ballistic_upgraded_weapon, cost, wallbuy_targetname, hint_string, vo_dialog_id, flourish_fn )
120 {
121  if ( isdefined( stub ) )
122  {
123  stub.hint_string = hint_string;
124  stub.cursor_hint = "HINT_WEAPON";
125  stub.cursor_hint_weapon = weapon;
126  stub.cost = cost;
127  if (!‪IS_TRUE( level.weapon_cost_client_filled ))
128  {
129  stub.hint_parm1 = cost;
130  }
131  stub.weapon = weapon;
132  stub.vo_dialog_id = vo_dialog_id;
133  stub.flourish_weapon = flourish_weapon;
134  stub.ballistic_weapon = ballistic_weapon;
135  stub.ballistic_upgraded_weapon = ballistic_upgraded_weapon;
136  stub.trigger_func = &‪melee_weapon_think;
137  stub.flourish_fn = flourish_fn;
138  }
139 }
140 
141 function ‪find_melee_weapon( weapon )
142 {
143  melee_weapon = undefined;
144  for ( i = 0; i < level._melee_weapons.size; i++ )
145  {
146  if ( level._melee_weapons[i].weapon == weapon )
147  {
148  return level._melee_weapons[i];
149  }
150  }
151  return undefined;
152 }
153 
154 function ‪add_stub( stub, weapon )
155 {
156  melee_weapon = ‪find_melee_weapon( weapon );
157  if ( isdefined( stub ) && isdefined( melee_weapon ) )
158  {
159  ‪prepare_stub( stub, melee_weapon.weapon, melee_weapon.flourish_weapon, melee_weapon.ballistic_weapon, melee_weapon.ballistic_upgraded_weapon,
160  melee_weapon.cost, melee_weapon.wallbuy_targetname, melee_weapon.hint_string, melee_weapon.vo_dialog_id,
161  melee_weapon.flourish_fn );
162  }
163 }
164 
165 function ‪add_melee_weapon( weapon, flourish_weapon, ballistic_weapon, ballistic_upgraded_weapon, cost, wallbuy_targetname, hint_string, vo_dialog_id, flourish_fn )
166 {
167  melee_weapon = SpawnStruct();
168  melee_weapon.weapon = weapon;
169  melee_weapon.flourish_weapon = flourish_weapon;
170  melee_weapon.ballistic_weapon = ballistic_weapon;
171  melee_weapon.ballistic_upgraded_weapon = ballistic_upgraded_weapon;
172  melee_weapon.cost = cost;
173  melee_weapon.wallbuy_targetname = wallbuy_targetname;
174  melee_weapon.hint_string = hint_string;
175  melee_weapon.vo_dialog_id = vo_dialog_id;
176  melee_weapon.flourish_fn = flourish_fn;
177 
178  if ( !isdefined( level._melee_weapons ) )
179  {
180  level._melee_weapons = [];
181  }
182  level._melee_weapons[level._melee_weapons.size] = melee_weapon;
183 }
184 
185 function ‪set_fallback_weapon( weapon_name, fallback_weapon_name )
186 {
187  melee_weapon = ‪find_melee_weapon( GetWeapon( weapon_name ) );
188  if ( isdefined( melee_weapon ) )
189  {
190  melee_weapon.fallback_weapon = GetWeapon( fallback_weapon_name );
191  }
192 }
193 
195 {
196  fallback_weapon = level.weaponZMFists;
197  if ( IsDefined( self ‪zm_utility::get_player_melee_weapon() ) && self HasWeapon( self ‪zm_utility::get_player_melee_weapon() ) )
198  {
200  if ( isdefined(melee_weapon) && isdefined(melee_weapon.fallback_weapon) )
201  {
202  return melee_weapon.fallback_weapon;
203  }
204  }
205  return fallback_weapon;
206 }
207 
208 function ‪give_fallback_weapon( immediate = false )
209 {
210  fallback_weapon = self ‪determine_fallback_weapon();
211  had_weapon = self HasWeapon( fallback_weapon );
212  self GiveWeapon( fallback_weapon );
213  if( immediate && had_weapon )
214  {
215  self SwitchToWeaponImmediate( fallback_weapon );
216  }
217  else
218  {
219  self SwitchToWeapon( fallback_weapon );
220  }
221 }
222 
224 {
225  fallback_weapon = self ‪determine_fallback_weapon();
226  had_weapon = self HasWeapon( fallback_weapon );
227  self ‪zm_weapons::weapon_take( fallback_weapon );
228  return had_weapon;
229 }
230 
232 {
233  if ( ‪IS_TRUE( level._allow_melee_weapon_switching ) )
234  {
235  return true;
236  }
237 
238  if ( IsDefined( self ‪zm_utility::get_player_melee_weapon() ) && self HasWeapon( self ‪zm_utility::get_player_melee_weapon() ) )
239  {
240  return false;
241  }
242 
243  return true;
244 }
245 
246 // Re-enable all melee weapon wallbuy triggers
248 {
249  for ( i = 0; i < level._melee_weapons.size; i++ )
250  {
251  self ‪spectator_respawn( level._melee_weapons[i].wallbuy_targetname, level._melee_weapons[i].weapon );
252  }
253 }
254 
255 function ‪spectator_respawn( wallbuy_targetname, weapon )
256 {
257  melee_triggers = GetEntArray( wallbuy_targetname, "targetname" );
258  // ww: player needs to reset trigger knowledge without claiming full ownership
259  players = GetPlayers();
260  for ( i = 0; i < melee_triggers.size; i++ )
261  {
262  melee_triggers[i] SetVisibleToAll();
263  if ( !‪IS_TRUE( level._allow_melee_weapon_switching ) )
264  {
265  for ( j = 0; j < players.size; j++ )
266  {
267  if ( !players[j] ‪player_can_see_weapon_prompt() )
268  {
269  melee_triggers[i] SetInvisibleToPlayer( players[j] );
270  }
271  }
272  }
273  }
274 }
275 
276 // Hide all melee weapon wallbuy triggers
278 {
279  for ( i = 0; i < level._melee_weapons.size; i++ )
280  {
281  self ‪trigger_hide( level._melee_weapons[i].wallbuy_targetname );
282  }
283 }
284 
285 function ‪trigger_hide( wallbuy_targetname )
286 {
287  melee_triggers = GetEntArray( wallbuy_targetname, "targetname" );
288 
289  for ( i = 0; i < melee_triggers.size; i++ )
290  {
291  melee_triggers[i] SetInvisibleToPlayer( self );
292  }
293 }
294 
296 {
297  primaryWeapons = self GetWeaponsListPrimaries();
298 
299  for ( i = 0; i < primaryweapons.size; i++ )
300  {
301  if ( primaryWeapons[i].isBallisticKnife )
302  {
303  return true;
304  }
305  }
306 
307  return false;
308 }
309 
311 {
312  primaryWeapons = self GetWeaponsListPrimaries();
313 
314  for ( i = 0; i < primaryweapons.size; i++ )
315  {
316  if ( primaryWeapons[i].isBallisticKnife && ‪zm_weapons::is_weapon_upgraded( primaryWeapons[i] ) )
317  {
318  return true;
319  }
320  }
321 
322  return false;
323 }
324 
325 function ‪give_ballistic_knife( weapon, upgraded )
326 {
327  current_melee_weapon = self ‪zm_utility::get_player_melee_weapon();
328  if ( IsDefined( current_melee_weapon ) )
329  {
330  if ( upgraded && IsDefined( level.ballistic_upgraded_weapon ) && IsDefined( level.ballistic_upgraded_weapon[current_melee_weapon] ) )
331  {
332  weapon = level.ballistic_upgraded_weapon[current_melee_weapon];
333  }
334  if ( !upgraded && IsDefined( level.ballistic_weapon ) && IsDefined( level.ballistic_weapon[current_melee_weapon] ) )
335  {
336  weapon = level.ballistic_weapon[current_melee_weapon];
337  }
338  }
339 
340  return weapon;
341 }
342 
343 
344 function ‪change_melee_weapon( weapon, current_weapon )
345 {
346  had_fallback_weapon = self ‪take_fallback_weapon();
347  current_melee_weapon = self ‪zm_utility::get_player_melee_weapon();
348  if ( current_melee_weapon != level.weaponNone && current_melee_weapon != weapon )
349  {
350  self TakeWeapon( current_melee_weapon );
351  }
353 
354  had_ballistic = 0;
355  had_ballistic_upgraded = 0;
356  ballistic_was_primary = 0;
357 
358  primaryWeapons = self GetWeaponsListPrimaries();
359 
360  for ( i = 0; i < primaryweapons.size; i++ )
361  {
362  primary_weapon = primaryweapons[i];
363  if ( primary_weapon.isBallisticKnife )
364  {
365  had_ballistic = 1;
366  if ( primary_weapon == current_weapon )
367  {
368  ballistic_was_primary = 1;
369  }
370 
371  self notify( "zmb_lost_knife" );
372  self TakeWeapon( primary_weapon );
373  if ( ‪zm_weapons::is_weapon_upgraded( primary_weapon ) )
374  {
375  had_ballistic_upgraded = 1;
376  }
377  }
378 
379  }
380 
381  if ( had_ballistic )
382  {
383  if ( had_ballistic_upgraded )
384  {
385  new_ballistic = level.ballistic_upgraded_weapon[weapon];
386  if ( ballistic_was_primary )
387  {
388  current_weapon = new_ballistic;
389  }
390 
391  self ‪zm_weapons::give_build_kit_weapon( new_ballistic );
392  }
393  else
394  {
395  new_ballistic = level.ballistic_weapon[weapon];
396  if ( ballistic_was_primary )
397  {
398  current_weapon = new_ballistic;
399  }
400 
401  self GiveWeapon( new_ballistic, 0 );
402  }
403  }
404 
405  if ( had_fallback_weapon )
406  {
408  }
409 
410  return current_weapon;
411 }
412 
413 
414 
415 function ‪melee_weapon_think( weapon, cost, flourish_fn, vo_dialog_id, flourish_weapon, ballistic_weapon, ballistic_upgraded_weapon )
416 {
417  self.first_time_triggered = false;
418  if ( isdefined( self.stub ) )
419  {
420  self endon( "kill_trigger" );
421  if ( isdefined( self.stub.first_time_triggered ) )
422  {
423  self.first_time_triggered = self.stub.first_time_triggered;
424  }
425 
426  weapon = self.stub.weapon;
427  cost = self.stub.cost;
428  flourish_fn = self.stub.flourish_fn;
429  vo_dialog_id = self.stub.vo_dialog_id;
430  flourish_weapon = self.stub.flourish_weapon;
431  ballistic_weapon = self.stub.ballistic_weapon;
432  ballistic_upgraded_weapon = self.stub.ballistic_upgraded_weapon;
433 
434  players = GetPlayers();
435 
436  if ( !‪IS_TRUE( level._allow_melee_weapon_switching ) )
437  {
438  for ( i = 0; i < players.size; i++ )
439  {
440  if ( !players[i] ‪player_can_see_weapon_prompt() )
441  {
442  self SetInvisibleToPlayer( players[i] );
443  }
444  }
445  }
446 
447  }
448 
449  for ( ;; )
450  {
451  self waittill( "trigger", player );
452  // if not first time and they have the weapon give ammo
453 
454  if ( !‪zm_utility::is_player_valid( player ) )
455  {
456  player thread ‪zm_utility::ignore_triggers( 0.5 );
457  continue;
458  }
459 
460  if ( player ‪zm_utility::in_revive_trigger() )
461  {
462  wait( 0.1 );
463  continue;
464  }
465 
466  if ( player isThrowingGrenade() )
467  {
468  wait( 0.1 );
469  continue;
470  }
471 
472  if ( ‪IS_DRINKING( player.is_drinking ) )
473  {
474  wait( 0.1 );
475  continue;
476  }
477 
478  player_has_weapon = player HasWeapon( weapon );
479  if ( player_has_weapon || player ‪zm_utility::has_powerup_weapon() )
480  {
481  wait( 0.1 );
482  continue;
483  }
484 
485  if ( player isSwitchingWeapons() )
486  {
487  wait( 0.1 );
488  continue;
489  }
490 
491  current_weapon = player GetCurrentWeapon();
492  if ( ‪zm_utility::is_placeable_mine( current_weapon ) || ‪zm_equipment::is_equipment( current_weapon ) )
493  {
494  wait( 0.1 );
495  continue;
496  }
497 
498  if ( player ‪laststand::player_is_in_laststand() || ‪IS_TRUE( player.intermission ) )
499  {
500  wait( 0.1 );
501  continue;
502  }
503 
504  if ( IsDefined(player.check_override_melee_wallbuy_purchase) )
505  {
506  if ( player [[player.check_override_melee_wallbuy_purchase]]( vo_dialog_id, flourish_weapon, weapon, ballistic_weapon, ballistic_upgraded_weapon, flourish_fn, self ) )
507  {
508  continue;
509  }
510  }
511 
512  if ( !player_has_weapon )
513  {
514  cost = self.stub.cost;
515 
516  // else make the weapon show and give it
517  if ( player ‪zm_score::can_player_purchase( cost ) )
518  {
519  if ( self.first_time_triggered == false )
520  {
521  model = getent( self.target, "targetname" );
522 
523  if ( isdefined( model ) )
524  {
525  model thread ‪melee_weapon_show( player );
526  }
527  else if ( isdefined( self.clientFieldName ) )
528  {
529  level ‪clientfield::set( self.clientFieldName, 1 );
530  }
531 
532  self.first_time_triggered = true;
533  if ( isdefined( self.stub ) )
534  {
535  self.stub.first_time_triggered = true;
536  }
537 
538  }
539 
540  player ‪zm_score::minus_to_player_score( cost );
541 
542  player thread ‪give_melee_weapon( vo_dialog_id, flourish_weapon, weapon, ballistic_weapon, ballistic_upgraded_weapon, flourish_fn, self );
543  }
544  else
545  {
546  ‪zm_utility::play_sound_on_ent( "no_purchase" );
547  player ‪zm_audio::create_and_play_dialog( "general", "outofmoney", 1 );
548  }
549  }
550  else
551  {
552  if ( !‪IS_TRUE( level._allow_melee_weapon_switching ) )
553  {
554  self SetInvisibleToPlayer( player );
555  }
556  }
557  }
558 }
559 
560 function ‪melee_weapon_show( player )
561 {
562  player_angles = VectorToAngles( player.origin - self.origin );
563 
564  player_yaw = player_angles[1];
565  weapon_yaw = self.angles[1];
566 
567  yaw_diff = AngleClamp180( player_yaw - weapon_yaw );
568 
569  if ( yaw_diff > 0 )
570  {
571  yaw = weapon_yaw - 90;
572  }
573  else
574  {
575  yaw = weapon_yaw + 90;
576  }
577 
578  self.og_origin = self.origin;
579  self.origin = self.origin + ( AnglesToForward( (0, yaw, 0) ) * 8 );
580 
582  self Show();
583 
584  ‪zm_utility::play_sound_at_pos( "weapon_show", self.origin, self );
585 
586  time = 1;
587  self MoveTo( self.og_origin, time );
588 }
589 
590 function ‪award_melee_weapon( weapon_name )
591 {
592  weapon = GetWeapon( weapon_name );
593  melee_weapon = ‪find_melee_weapon( weapon );
594  if ( isdefined( melee_weapon ) )
595  {
596  self ‪give_melee_weapon( melee_weapon.vo_dialog_id, melee_weapon.flourish_weapon, melee_weapon.weapon, melee_weapon.ballistic_weapon, melee_weapon.ballistic_upgraded_weapon, melee_weapon.flourish_fn, undefined );
597  }
598 }
599 
600 function ‪give_melee_weapon( vo_dialog_id, flourish_weapon, weapon, ballistic_weapon, ballistic_upgraded_weapon, flourish_fn, trigger )
601 {
602  if ( isdefined( flourish_fn ) )
603  {
604  self thread [[flourish_fn]]();
605  }
606 
607  original_weapon = self ‪do_melee_weapon_flourish_begin( flourish_weapon );
608  self ‪zm_audio::create_and_play_dialog( "weapon_pickup", vo_dialog_id );
609 
610  self ‪util::waittill_any( "fake_death", "death", "player_downed", "weapon_change_complete" );
611 
612  // restore player controls and movement
613  self ‪do_melee_weapon_flourish_end( original_weapon, flourish_weapon, weapon, ballistic_weapon, ballistic_upgraded_weapon );
614 
616  {
617  // if they're in laststand at this point then they won't have gotten the weapon, so don't hide the trigger
618  return;
619  }
620 
621  if ( !‪IS_TRUE( level._allow_melee_weapon_switching) )
622  {
623  if ( IsDefined( trigger ) )
624  {
625  trigger SetInvisibleToPlayer( self );
626  }
627  self ‪trigger_hide_all();
628  }
629 
630 }
631 
632 function ‪do_melee_weapon_flourish_begin( flourish_weapon )
633 {
635 
637 
638  original_weapon = self GetCurrentWeapon();
639  weapon = flourish_weapon;
640 
642  self SwitchToWeapon( weapon );
643 
644  return original_weapon;
645 }
646 
647 function ‪do_melee_weapon_flourish_end( original_weapon, flourish_weapon, weapon, ballistic_weapon, ballistic_upgraded_weapon )
648 {
649  Assert( !original_weapon.isPerkBottle );
650  Assert( original_weapon != level.weaponReviveTool );
651 
652 
654 
655  // TODO: race condition?
657  {
658  self TakeWeapon( weapon );
659  self.lastActiveWeapon = level.weaponNone; // this should be handled by laststand.gsc, but then we couldn't FFOTD the fix
660  return;
661  }
662 
663  self TakeWeapon( flourish_weapon );
664 
666  original_weapon = ‪change_melee_weapon( weapon, original_weapon );
667 
668  if ( self HasWeapon( level.weaponBaseMelee ) )
669  {
670  self TakeWeapon( level.weaponBaseMelee );
671  }
672 
674  {
676  return;
677  }
678  else if ( original_weapon == level.weaponBaseMelee ) // if all they had was the knife, we need to switch them to the new weapon
679  {
680  self SwitchToWeapon( weapon );
681 
682  // and since it has no raise anim, there'll be no "weapon_change_complete" notify
684  return;
685  }
686  else if ( original_weapon != level.weaponBaseMelee && !‪zm_utility::is_placeable_mine( original_weapon ) && !‪zm_equipment::is_equipment( original_weapon ) )
687  {
688  self ‪zm_weapons::switch_back_primary_weapon( original_weapon );
689  }
690  else
691  {
693  }
694 
695  self waittill( "weapon_change_complete" );
696 
698  {
700  }
701 }
702 
703 
‪spectator_respawn
‪function spectator_respawn(wallbuy_targetname, weapon)
Definition: _zm_melee_weapon.gsc:255
‪is_equipment
‪function is_equipment(weapon)
Definition: _zm_equipment.gsc:691
‪give_ballistic_knife
‪function give_ballistic_knife(weapon, upgraded)
Definition: _zm_melee_weapon.gsc:325
‪player_can_see_weapon_prompt
‪function player_can_see_weapon_prompt()
Definition: _zm_melee_weapon.gsc:231
‪has_upgraded_ballistic_knife
‪function has_upgraded_ballistic_knife()
Definition: _zm_melee_weapon.gsc:310
‪play_sound_at_pos
‪function play_sound_at_pos(ref, pos, ent)
Definition: _zm_utility.gsc:3040
‪play_sound_on_ent
‪function play_sound_on_ent(ref)
Definition: _zm_utility.gsc:3070
‪intermission
‪function intermission()
Definition: _zm.gsc:6542
‪award_melee_weapon
‪function award_melee_weapon(weapon_name)
Definition: _zm_melee_weapon.gsc:590
‪get_array
‪function get_array(kvp_value, kvp_key="targetname")
Definition: struct.csc:34
‪disable_player_move_states
‪function disable_player_move_states(forceStanceChange)
Definition: _zm_utility.gsc:5536
‪trigger_hide
‪function trigger_hide(wallbuy_targetname)
Definition: _zm_melee_weapon.gsc:285
‪__init__
‪function private __init__()
Definition: _zm_melee_weapon.gsc:45
‪init
‪function init(weapon_name, flourish_weapon_name, ballistic_weapon_name, ballistic_upgraded_weapon_name, cost, wallbuy_targetname, hint_string, vo_dialog_id, flourish_fn)
Definition: _zm_melee_weapon.gsc:60
‪find_melee_weapon
‪function find_melee_weapon(weapon)
Definition: _zm_melee_weapon.gsc:141
‪is_weapon_upgraded
‪function is_weapon_upgraded(weapon)
Definition: _zm_weapons.csc:155
‪IS_TRUE
‪#define IS_TRUE(__a)
Definition: shared.gsh:251
‪trigger_hide_all
‪function trigger_hide_all()
Definition: _zm_melee_weapon.gsc:277
‪get_player_melee_weapon
‪function get_player_melee_weapon()
Definition: _zm_utility.gsc:4361
‪enable_player_move_states
‪function enable_player_move_states()
Definition: _zm_utility.gsc:5554
‪is_player_valid
‪function is_player_valid(player, checkIgnoreMeFlag, ignore_laststand_players)
Definition: skeleton.gsc:256
‪change_melee_weapon
‪function change_melee_weapon(weapon, current_weapon)
Definition: _zm_melee_weapon.gsc:344
‪increment_is_drinking
‪function increment_is_drinking()
Definition: _zm_utility.gsc:3859
‪switch_back_primary_weapon
‪function switch_back_primary_weapon(oldprimary, immediate=false)
Definition: _zm_weapons.gsc:280
‪do_melee_weapon_flourish_end
‪function do_melee_weapon_flourish_end(original_weapon, flourish_weapon, weapon, ballistic_weapon, ballistic_upgraded_weapon)
Definition: _zm_melee_weapon.gsc:647
‪give_fallback_weapon
‪function give_fallback_weapon(immediate=false)
Definition: _zm_melee_weapon.gsc:208
‪minus_to_player_score
‪function minus_to_player_score(points)
Definition: _zm_score.gsc:551
‪can_player_purchase
‪function can_player_purchase(n_cost)
Definition: _zm_score.gsc:655
‪has_powerup_weapon
‪function has_powerup_weapon()
Definition: _zm_utility.gsc:4519
‪REGISTER_SYSTEM_EX
‪#define REGISTER_SYSTEM_EX(__sys, __func_init_preload, __func_init_postload, __reqs)
Definition: shared.gsh:209
‪spectator_respawn_all
‪function spectator_respawn_all()
Definition: _zm_melee_weapon.gsc:247
‪waittill_any
‪function waittill_any(str_notify1, str_notify2, str_notify3, str_notify4, str_notify5)
Definition: util_shared.csc:375
‪decrement_is_drinking
‪function decrement_is_drinking()
Definition: _zm_utility.gsc:3898
‪do_melee_weapon_flourish_begin
‪function do_melee_weapon_flourish_begin(flourish_weapon)
Definition: _zm_melee_weapon.gsc:632
‪give_build_kit_weapon
‪function give_build_kit_weapon(weapon)
Definition: _zm_weapons.gsc:2543
‪prepare_stub
‪function prepare_stub(stub, weapon, flourish_weapon, ballistic_weapon, ballistic_upgraded_weapon, cost, wallbuy_targetname, hint_string, vo_dialog_id, flourish_fn)
Definition: _zm_melee_weapon.gsc:119
‪weapon_take
‪function weapon_take(weapon)
Definition: _zm_weapons.gsc:2829
‪__main__
‪function private __main__()
Definition: _zm_melee_weapon.gsc:53
‪is_multiple_drinking
‪function is_multiple_drinking()
Definition: _zm_utility.gsc:3891
‪melee_weapon_think
‪function melee_weapon_think(weapon, cost, flourish_fn, vo_dialog_id, flourish_weapon, ballistic_weapon, ballistic_upgraded_weapon)
Definition: _zm_melee_weapon.gsc:415
‪ignore_triggers
‪function ignore_triggers(timer)
Definition: _zm_utility.csc:21
‪give_melee_weapon
‪function give_melee_weapon(vo_dialog_id, flourish_weapon, weapon, ballistic_weapon, ballistic_upgraded_weapon, flourish_fn, trigger)
Definition: _zm_melee_weapon.gsc:600
‪has_any_ballistic_knife
‪function has_any_ballistic_knife()
Definition: _zm_melee_weapon.gsc:295
‪set
‪function set(str_field_name, n_value)
Definition: clientfield_shared.gsc:34
‪register_melee_weapon_for_level
‪function register_melee_weapon_for_level(weaponname)
Definition: _zm_utility.gsc:4322
‪player_is_in_laststand
‪function player_is_in_laststand()
Definition: laststand_shared.gsc:18
‪determine_fallback_weapon
‪function determine_fallback_weapon()
Definition: _zm_melee_weapon.gsc:194
‪melee_weapon_show
‪function melee_weapon_show(player)
Definition: _zm_melee_weapon.gsc:560
‪create_and_play_dialog
‪function create_and_play_dialog(category, subcategory, force_variant)
Definition: _zm_audio.gsc:603
‪in_revive_trigger
‪function in_revive_trigger()
Definition: _zm_utility.gsc:1684
‪set_fallback_weapon
‪function set_fallback_weapon(weapon_name, fallback_weapon_name)
Definition: _zm_melee_weapon.gsc:185
‪IS_DRINKING
‪#define IS_DRINKING(_is_drinking)
Definition: _zm_utility.gsh:1
‪is_placeable_mine
‪function is_placeable_mine(weapon)
Definition: _zm_utility.gsc:4267
‪take_fallback_weapon
‪function take_fallback_weapon()
Definition: _zm_melee_weapon.gsc:223
‪add_stub
‪function add_stub(stub, weapon)
Definition: _zm_melee_weapon.gsc:154
‪set_player_melee_weapon
‪function set_player_melee_weapon(weapon)
Definition: _zm_utility.gsc:4374
‪add_melee_weapon
‪function add_melee_weapon(weapon, flourish_weapon, ballistic_weapon, ballistic_upgraded_weapon, cost, wallbuy_targetname, hint_string, vo_dialog_id, flourish_fn)
Definition: _zm_melee_weapon.gsc:165
‪WAIT_SERVER_FRAME
‪#define WAIT_SERVER_FRAME
Definition: shared.gsh:265