‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
zclassic.gsc
Go to the documentation of this file.
1 #using scripts\codescripts\struct;
2 
3 #using scripts\shared\math_shared;
4 
5 #insert scripts\shared\shared.gsh;
6 #using scripts\zm\gametypes\_zm_gametype;
7 
8 #using scripts\zm\_zm_stats;
9 
10 /*
11  ZCLASSIC - ZClassic Mode, wave based gameplay
12  Objective: Stay alive for as long as you can
13  Map ends: When all players die
14  Respawning: No wait / Near teammates
15 */
16 
17 function ‪main()
18 {
19  ‪zm_gametype::main(); // Generic zombie mode setup - must be called first.
20 
21  // Mode specific over-rides.
22 
23  level.onPrecacheGameType =&‪onPrecacheGameType;
24  level.onStartGameType =&‪onStartGameType;
25  level._game_module_custom_spawn_init_func = &‪zm_gametype::custom_spawn_init_func;
26  level._game_module_stat_update_func = &‪zm_stats::survival_classic_custom_stat_update;
27 }
28 
30 {
31  level.playerSuicideAllowed = true;
32  level.canPlayerSuicide =&‪zm_gametype::canPlayerSuicide;
33 }
34 
36 {
37  level.spawnMins = ( 0, 0, 0 );
38  level.spawnMaxs = ( 0, 0, 0 );
39  structs = ‪struct::get_array("player_respawn_point", "targetname");
40  foreach(struct in structs)
41  {
42  level.spawnMins = ‪math::expand_mins( level.spawnMins, struct.origin );
43  level.spawnMaxs = ‪math::expand_maxs( level.spawnMaxs, struct.origin );
44  }
45 
46  level.mapCenter = ‪math::find_box_center( level.spawnMins, level.spawnMaxs );
47  setMapCenter( level.mapCenter );
48 }
49 
50 
51 
‪expand_maxs
‪function expand_maxs(maxs, point)
Definition: math_shared.gsc:114
‪custom_spawn_init_func
‪function custom_spawn_init_func()
Definition: _zm_gametype.gsc:906
‪find_box_center
‪function find_box_center(mins, maxs)
Definition: math_shared.gsc:86
‪get_array
‪function get_array(kvp_value, kvp_key="targetname")
Definition: struct.csc:34
‪onStartGameType
‪function onStartGameType()
Definition: zclassic.gsc:35
‪canPlayerSuicide
‪function canPlayerSuicide()
Definition: _zm_gametype.gsc:267
‪survival_classic_custom_stat_update
‪function survival_classic_custom_stat_update()
Definition: _zm_stats.gsc:293
‪expand_mins
‪function expand_mins(mins, point)
Definition: math_shared.gsc:94
‪onPrecacheGameType
‪function onPrecacheGameType()
Definition: zclassic.gsc:29
‪main
‪function main()
Definition: zclassic.gsc:17