 |
Black Ops 3 Source Code Explorer
0.1
An script explorer for Black Ops 3 by ZeRoY
|
Go to the documentation of this file. 1 #using scripts\codescripts\struct;
3 #using scripts\shared\challenges_shared;
4 #using scripts\shared\clientfield_shared;
5 #using scripts\shared\system_shared;
6 #using scripts\shared\util_shared;
7 #using scripts\shared\hostmigration_shared;
8 #using scripts\shared\callbacks_shared;
9 #using scripts\shared\tweakables_shared;
10 #using scripts\shared\weapons\_heatseekingmissile;
11 #using scripts\shared\weapons\_weaponobjects;
12 #using scripts\shared\damagefeedback_shared;
13 #using scripts\shared\scoreevents_shared;
14 #using scripts\shared\math_shared;
15 #using scripts\shared\killstreaks_shared;
17 #using scripts\mp\gametypes\_battlechatter;
18 #using scripts\mp\gametypes\_globallogic_audio;
19 #using scripts\mp\killstreaks\_airsupport;
20 #using scripts\mp\killstreaks\_killstreak_bundles;
21 #using scripts\mp\killstreaks\_killstreak_hacking;
22 #using scripts\mp\killstreaks\_killstreakrules;
23 #using scripts\mp\killstreaks\_killstreaks;
24 #using scripts\mp\teams\_teams;
25 #using scripts\mp\_util;
27 #insert scripts\mp\_hacker_tool.gsh;
28 #insert scripts\mp\killstreaks\_killstreaks.gsh;
29 #insert scripts\shared\shared.gsh;
30 #insert scripts\shared\version.gsh;
34 #define SATELLITE_NAME "satellite"
35 #define SATELLITE_KILLSTREAK_NAME "killstreak_satellite"
37 #precache( "string", "mpl_killstreak_satellite" );
38 #precache( "string", "KILLSTREAK_EARNED_SATELLITE" );
39 #precache( "string", "KILLSTREAK_SATELLITE_INBOUND" );
40 #precache( "string", "KILLSTREAK_DESTROYED_SATELLITE" );
41 #precache( "string", "KILLSTREAK_SATELLITE_NOT_AVAILABLE" );
42 #precache( "string", "KILLSTREAK_SATELLITE_HACKED" );
46 if ( level.teamBased )
48 foreach( team
in level.teams )
50 level.activeSatellites[ team ] = 0;
55 level.activeSatellites = [];
58 level.activePlayerSatellites = [];
64 killstreaks::register_dialog(
SATELLITE_NAME,
"mpl_killstreak_satellite",
"satelliteDialogBundle", undefined,
"friendlySatellite",
"enemySatellite",
"enemySatelliteMultiple",
"friendlySatelliteHacked",
"enemySatelliteHacked",
"requestSatellite",
"threatSatellite" );
75 self.entnum =
self getEntityNumber();
77 if ( !level.teamBased )
79 level.activeSatellites[
self.entnum ] = 0;
82 level.activePlayerSatellites[
self.entnum ] = 0;
87 if ( !level.teambased )
101 if( killstreak_id == -1 )
112 xOffset = sin( travelAngle ) * travelRadius;
113 yOffset = cos( travelAngle ) * travelRadius;
119 satellite.killstreak_id = killstreak_id;
120 satellite.owner =
self;
121 satellite.ownerEntNum =
self GetEntityNumber();
122 satellite.team =
self.team;
123 satellite setTeam(
self.team );
124 satellite setOwner(
self );
130 satellite.health = 99999;
131 satellite.leaving =
false;
133 satellite SetCanDamage(
true );
148 Target_Set( satellite );
182 satellite SetVisibleToAll();
189 self endon(
"death" );
193 self rotateyaw( -360, duration );
217 if( Target_IsTarget(
self ) )
218 Target_Remove(
self );
230 attacker =
self [[ level.figure_out_attacker ]]( attacker );
231 if ( isdefined( attacker ) && ( !isdefined(
self.owner ) ||
self.owner
util::IsEnemyPlayer( attacker ) ) )
236 LUINotifyEvent( &
"player_callout", 2, &
"KILLSTREAK_DESTROYED_SATELLITE", attacker.entnum );
241 self notify(
"crashing" );
244 if( isdefined( params.ksExplosionFX ) )
245 PlayFXOnTag( params.ksExplosionFX,
self,
"tag_origin" );
247 self setModel(
"tag_origin" );
248 if( Target_IsTarget(
self ) )
249 Target_Remove(
self );
261 return level.activeSatellites[ team_or_entnum ] > 0;
266 if ( level.teamBased )
268 level.activeSatellites[
self.team ]++;
272 level.activeSatellites[
self.ownerEntNum ]++;
275 level.activePlayerSatellites[
self.ownerEntNum ]++;
277 level notify(
"satellite_update" );
289 if( level.teamBased )
291 level.activeSatellites[
self.team ]--;
293 assert( level.activeSatellites[
self.team ] >= 0 );
294 if( level.activeSatellites[
self.team ] < 0 )
296 level.activeSatellites[
self.team ] = 0;
299 else if ( isdefined(
self.ownerEntNum ) )
301 level.activeSatellites[
self.ownerEntNum ]--;
303 assert( level.activeSatellites[
self.ownerEntNum ] >= 0 );
304 if( level.activeSatellites[
self.ownerEntNum ] < 0 )
306 level.activeSatellites[
self.ownerEntNum ] = 0;
310 assert( isdefined(
self.ownerEntNum ) );
311 level.activePlayerSatellites[
self.ownerEntNum ]--;
312 assert( level.activePlayerSatellites[
self.ownerEntNum ] >= 0 );
314 level notify(
"satellite_update" );
319 level endon (
"game_ended" );
323 level waittill (
"satellite_update" );
328 if( level.teamBased )
330 foreach( team
in level.teams )
332 activeSatellites = level.activeSatellites[ team ];
333 activeSatellitesAndUAVs = activeSatellites + ( ( isdefined( level.activeUAVs ) ) ? level.activeUAVs[ team ] : 0 );
335 SetTeamSatellite( team, ( activeSatellites > 0 ) );
341 for( i = 0; i < level.players.size; i++ )
351 if( !isdefined( player.entnum ) )
353 player.entnum = player getEntityNumber();
356 activeSatellites = level.activeSatellites[ player.entnum ];
357 activeSatellitesAndUAVs = activeSatellites + ( ( isdefined( level.activeUAVs ) ) ? level.activeUAVs[ player.entnum ] : 0 );
359 player SetClientUIVisibilityFlag(
"radar_client", ( activeSatellitesAndUAVs > 0 ) );
360 player.hasSatellite = ( activeSatellites > 0 );
363 function killstreakDamageModifier(
damage, attacker, direction, point, sMeansOfDeath, tagName, modelName, partname, weapon, flags, inflictor, chargeLevel )
365 if( ( sMeansOfDeath ==
"MOD_PISTOL_BULLET" ) || ( sMeansOfDeath ==
"MOD_RIFLE_BULLET" ) )
368 if ( sMeansOfDeath ==
"MOD_PROJECTILE_SPLASH" )
function processScoreEvent(event, player, victim, weapon)
#define SATELLITE_TRAVEL_DISTANCE_SCALE
function WaitForTimeout(killstreak, duration, callback, endCondition1, endCondition2, endCondition3)
function set_team_radar(team, value)
function HackedPreFunction(hacker)
function MissileTarget_ProximityDetonateIncomingMissile(endon1, endon2, allowDirectDamage)
function getMinimumFlyHeight()
function play_killstreak_start_dialog(killstreakType, team, killstreakId)
#define VAL(__var, __default)
function OnPlayerSpawned(local_client_num)
function play_pilot_dialog_on_owner(dialogKey, killstreakType, killstreakId)
function getTweakableValue(category, name)
function ActivateSatellite()
function addFlySwatterStat(weapon, aircraft)
#define SATELLITE_MISSILES_TO_DESTROY
function spawn(v_origin=(0, 0, 0), v_angles=(0, 0, 0))
function RemoveActiveSatellite()
function GetMaxMapWidth()
#define SATELLITE_KILLSTREAK_NAME
function MonitorDamage(killstreak_ref, max_health, destroyed_callback, low_health, low_health_callback, emp_damage, emp_callback, allow_bullet_damage)
function IsEnemyPlayer(player)
function HideToSameTeam()
function SatelliteTracker()
function on_spawned(func, obj)
function destroyedAircraft(attacker, weapon, playerControlled)
#define SATELLITE_MODEL_SCALE
function play_destroyed_dialog_on_owner(killstreakType, killstreakId)
#define SATELLITE_SPAWN_FROM_ANGLE_MIN
function isKillstreakAllowed(hardpointType, team)
function DestroySatelliteByEMP(attacker, arg)
function HasSatellite(team_or_entnum)
function Rotate(duration)
function register_dialog(killstreakType, informDialog, taacomDialogBundleKey, pilotDialogArrayKey, startDialogKey, enemyStartDialogKey, enemyStartMultipleDialogKey, hackedDialogKey, hackedStartDialogKey, requestDialogKey, threatDialogKey, isInventory)
#define SATELLITE_ROTATION_DURATION
function ConfigureTeamPost(owner, isHacked)
function OnTeamChange(entNum, event)
function register_strings(killstreakType, receivedText, notUsableText, inboundText, inboundNearPlayerText, hackedText, utilizesAirspace=true, isInventory=false)
function killstreakStop(hardpointType, team, id)
function OnPlayerConnect()
function ResetActiveSatellite()
function AddActiveSatellite()
#define SATELLITE_Z_OFFSET
function killstreakStart(hardpointType, team, hacked, displayTeamMessage)
#define SATELLITE_SPAWN_FROM_ANGLE_MAX
function set(str_field_name, n_value)
function WaitUntilTeamChangeSingleTon(player, singletonString, callback, arg, end_condition1, end_condition2, end_condition3)
function configure_team(killstreakType, killstreakId, owner, influencerType, configureTeamPreFunction, configureTeamPostFunction, isHacked=false)
function DestroySatellite(attacker=undefined, weapon=undefined)
function player_killstreak_threat_tracking(killstreakType)
function killstreakDamageModifier(damage, attacker, direction, point, sMeansOfDeath, tagName, modelName, partname, weapon, flags, inflictor, chargeLevel)
function enable_hacking(killstreakName, preHackFunction, postHackFunction)
function WaitTillEMP(onEmpdCallback, arg)
#define SATELLITE_HEALTH
function OnLowHealth(attacker, weapon)
#define SATELLITE_DURATION_MS
function Leave(duration)
#define SATELLITE_LOW_HEALTH
function UpdatePlayerSatelliteForDM(player)