Xonotic
sv_keepaway.qc File Reference
#include "sv_keepaway.qh"
#include <common/effects/all.qh>
#include <server/client.qh>
#include <server/gamelog.qh>
#include <server/damage.qh>
#include <server/items/items.qh>
#include <server/world.qh>
+ Include dependency graph for sv_keepaway.qc:

Go to the source code of this file.

Functions

void havocbot_goalrating_ball (entity this, float ratingscale, vector org)
 
void havocbot_role_ka_carrier (entity this)
 
void havocbot_role_ka_collector (entity this)
 
bool ka_ballcarrier_waypointsprite_visible_for_player (entity this, entity player, entity view)
 
void ka_DamageEvent (entity this, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
 
void ka_DropEvent (entity player)
 
void ka_EventLog (string mode, entity actor)
 
void ka_Handler_CheckBall (entity this)
 
void ka_Initialize ()
 
void ka_PlayerReset (entity player)
 
void ka_RemoveBall (entity ball)
 
void ka_RemoveBalls ()
 
void ka_RespawnBall (entity this)
 
void ka_SpawnBall ()
 
void ka_SpawnBalls (int ballcount)
 
void ka_TimeScoring (entity this)
 
void ka_TouchEvent (entity this, entity toucher)
 
 MODEL (KA_BALL, "models/orbs/orbblue.md3")
 
 MUTATOR_HOOKFUNCTION (ka, reset_map_global)
 
 MUTATOR_HOOKFUNCTION (ka, PlayerDies)
 
 MUTATOR_HOOKFUNCTION (ka, GiveFragsForKill)
 
 MUTATOR_HOOKFUNCTION (ka, Scores_CountFragsRemaining)
 
 MUTATOR_HOOKFUNCTION (ka, PlayerPreThink)
 
 MUTATOR_HOOKFUNCTION (ka, PlayerUseKey)
 
 MUTATOR_HOOKFUNCTION (ka, Damage_Calculate)
 
 MUTATOR_HOOKFUNCTION (ka, ClientDisconnect)
 
 MUTATOR_HOOKFUNCTION (ka, MakePlayerObserver)
 
 MUTATOR_HOOKFUNCTION (ka, PlayerPowerups)
 
 MUTATOR_HOOKFUNCTION (ka, PlayerPhysics_UpdateStats)
 
 MUTATOR_HOOKFUNCTION (ka, BotShouldAttack)
 
 MUTATOR_HOOKFUNCTION (ka, HavocBot_ChooseRole)
 
 MUTATOR_HOOKFUNCTION (ka, DropSpecialItems)
 

Variables

float autocvar_g_keepaway_ballcarrier_damage
 
int autocvar_g_keepaway_ballcarrier_effects
 
float autocvar_g_keepaway_ballcarrier_force
 
float autocvar_g_keepaway_ballcarrier_highspeed
 
float autocvar_g_keepaway_ballcarrier_selfdamage
 
float autocvar_g_keepaway_ballcarrier_selfforce
 
float autocvar_g_keepaway_noncarrier_damage
 
float autocvar_g_keepaway_noncarrier_force
 
float autocvar_g_keepaway_noncarrier_selfdamage
 
float autocvar_g_keepaway_noncarrier_selfforce
 
bool autocvar_g_keepaway_noncarrier_warn
 
int autocvar_g_keepaway_score_bckill
 
int autocvar_g_keepaway_score_killac
 
float autocvar_g_keepaway_score_timeinterval
 
int autocvar_g_keepaway_score_timepoints
 
float autocvar_g_keepawayball_damageforcescale
 
int autocvar_g_keepawayball_effects
 
float autocvar_g_keepawayball_respawntime
 
int autocvar_g_keepawayball_trail_color
 
entity ballcarried
 
bool pushable
 
float timepoints_counter
 

Function Documentation

◆ havocbot_goalrating_ball()

void havocbot_goalrating_ball ( entity  this,
float  ratingscale,
vector  org 
)

Definition at line 309 of file sv_keepaway.qc.

References entity(), g_kaballs, IL_EACH, navigation_routerating(), and NULL.

Referenced by havocbot_role_ka_collector().

310 {
311  entity ball = NULL, ball_carried = NULL;
312 
313  // stops at last ball, prefers ball without carrier
314  IL_EACH(g_kaballs, it.owner != this,
315  {
316  if(it.owner)
317  ball_carried = it.owner;
318  else
319  ball = it;
320  });
321 
322  if(ball)
323  navigation_routerating(this, ball, ratingscale, 2000);
324  else if(ball_carried)
325  navigation_routerating(this, ball_carried, ratingscale, 2000);
326 }
#define IL_EACH(this, cond, body)
entity() spawn
void navigation_routerating(entity this, entity e, float f, float rangebias)
Definition: navigation.qc:1220
#define NULL
Definition: post.qh:17
IntrusiveList g_kaballs
Definition: sv_keepaway.qh:7
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ havocbot_role_ka_carrier()

void havocbot_role_ka_carrier ( entity  this)

Definition at line 328 of file sv_keepaway.qc.

References ballcarried, havocbot_goalrating_enemyplayers(), havocbot_goalrating_items(), havocbot_goalrating_waypoints(), havocbot_role_ka_collector(), IS_DEAD, navigation_goalrating_end(), navigation_goalrating_start(), navigation_goalrating_timeout(), navigation_goalrating_timeout_expire(), navigation_goalrating_timeout_set(), and origin.

Referenced by havocbot_role_ka_collector(), and MUTATOR_HOOKFUNCTION().

329 {
330  if (IS_DEAD(this))
331  return;
332 
334  {
336  havocbot_goalrating_items(this, 10000, this.origin, 10000);
337  havocbot_goalrating_enemyplayers(this, 10000, this.origin, 10000);
338  havocbot_goalrating_waypoints(this, 1, this.origin, 3000);
340 
342  }
343 
344  if (!this.ballcarried)
345  {
346  this.havocbot_role = havocbot_role_ka_collector;
348  }
349 }
void navigation_goalrating_start(entity this)
Definition: navigation.qc:1830
void havocbot_goalrating_items(entity this, float ratingscale, vector org, float sradius)
Definition: roles.qc:106
void havocbot_role_ka_collector(entity this)
Definition: sv_keepaway.qc:351
void navigation_goalrating_end(entity this)
Definition: navigation.qc:1845
origin
Definition: ent_cs.qc:114
void havocbot_goalrating_enemyplayers(entity this, float ratingscale, vector org, float sradius)
Definition: roles.qc:176
bool navigation_goalrating_timeout(entity this)
Definition: navigation.qc:43
#define IS_DEAD(s)
Definition: utils.qh:26
void navigation_goalrating_timeout_set(entity this)
Definition: navigation.qc:19
void navigation_goalrating_timeout_expire(entity this, float seconds)
Definition: navigation.qc:35
void havocbot_goalrating_waypoints(entity this, float ratingscale, vector org, float sradius)
Definition: roles.qc:16
entity ballcarried
Definition: sv_keepaway.qc:10
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ havocbot_role_ka_collector()

void havocbot_role_ka_collector ( entity  this)

Definition at line 351 of file sv_keepaway.qc.

References ballcarried, havocbot_goalrating_ball(), havocbot_goalrating_enemyplayers(), havocbot_goalrating_items(), havocbot_role_ka_carrier(), IS_DEAD, navigation_goalrating_end(), navigation_goalrating_start(), navigation_goalrating_timeout(), navigation_goalrating_timeout_expire(), navigation_goalrating_timeout_set(), and origin.

Referenced by havocbot_role_ka_carrier(), and MUTATOR_HOOKFUNCTION().

352 {
353  if (IS_DEAD(this))
354  return;
355 
357  {
359  havocbot_goalrating_items(this, 10000, this.origin, 10000);
360  havocbot_goalrating_enemyplayers(this, 500, this.origin, 10000);
361  havocbot_goalrating_ball(this, 8000, this.origin);
363 
365  }
366 
367  if (this.ballcarried)
368  {
369  this.havocbot_role = havocbot_role_ka_carrier;
371  }
372 }
void navigation_goalrating_start(entity this)
Definition: navigation.qc:1830
void havocbot_goalrating_items(entity this, float ratingscale, vector org, float sradius)
Definition: roles.qc:106
void navigation_goalrating_end(entity this)
Definition: navigation.qc:1845
void havocbot_role_ka_carrier(entity this)
Definition: sv_keepaway.qc:328
origin
Definition: ent_cs.qc:114
void havocbot_goalrating_enemyplayers(entity this, float ratingscale, vector org, float sradius)
Definition: roles.qc:176
bool navigation_goalrating_timeout(entity this)
Definition: navigation.qc:43
#define IS_DEAD(s)
Definition: utils.qh:26
void navigation_goalrating_timeout_set(entity this)
Definition: navigation.qc:19
void navigation_goalrating_timeout_expire(entity this, float seconds)
Definition: navigation.qc:35
void havocbot_goalrating_ball(entity this, float ratingscale, vector org)
Definition: sv_keepaway.qc:309
entity ballcarried
Definition: sv_keepaway.qc:10
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ka_ballcarrier_waypointsprite_visible_for_player()

bool ka_ballcarrier_waypointsprite_visible_for_player ( entity  this,
entity  player,
entity  view 
)

Definition at line 32 of file sv_keepaway.qc.

References IS_SPEC.

Referenced by ka_TouchEvent().

33 {
34  if(view.ballcarried)
35  if(IS_SPEC(player))
36  return false; // we don't want spectators of the ballcarrier to see the attached waypoint on the top of their screen
37 
38  // TODO: Make the ballcarrier lack a waypointsprite whenever they have the invisibility powerup
39 
40  return true;
41 }
#define IS_SPEC(v)
Definition: utils.qh:10
+ Here is the caller graph for this function:

◆ ka_DamageEvent()

void ka_DamageEvent ( entity  this,
entity  inflictor,
entity  attacker,
float  damage,
int  deathtype,
.entity  weaponentity,
vector  hitloc,
vector  force 
)

Definition at line 106 of file sv_keepaway.qc.

References ITEM_DAMAGE_NEEDKILL, and ka_RespawnBall().

Referenced by ka_DropEvent(), and ka_SpawnBall().

107 {
108  if(ITEM_DAMAGE_NEEDKILL(deathtype))
109  ka_RespawnBall(this);
110 }
#define ITEM_DAMAGE_NEEDKILL(dt)
Definition: items.qh:130
void ka_RespawnBall(entity this)
Definition: sv_keepaway.qc:49
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ka_DropEvent()

void ka_DropEvent ( entity  player)

Definition at line 187 of file sv_keepaway.qc.

References ATTEN_NONE, autocvar_g_keepawayball_respawntime, CH_TRIGGER, crandom, DAMAGE_YES, EF_NODRAW, entity(), g_damagedbycontents, IL_PUSH(), ka_DamageEvent(), ka_EventLog(), ka_PlayerReset(), ka_RespawnBall(), ka_TouchEvent(), MOVETYPE_BOUNCE, navigation_dynamicgoal_set(), NULL, set_movetype(), setorigin(), setthink, sound, SPRITERULE_DEFAULT, time, and VOL_BASE.

Referenced by MUTATOR_HOOKFUNCTION().

188 {
189  entity ball = player.ballcarried;
190 
191  if(!ball) { return; }
192 
193  // reset the ball
194  setattachment(ball, NULL, "");
196  ball.wait = time + 1;
197  settouch(ball, ka_TouchEvent);
198  setthink(ball, ka_RespawnBall);
199  ball.nextthink = time + autocvar_g_keepawayball_respawntime;
200  ball.takedamage = DAMAGE_YES;
201  ball.event_damage = ka_DamageEvent;
202  ball.damagedbycontents = true;
204  ball.effects &= ~EF_NODRAW;
205  setorigin(ball, player.origin + '0 0 10');
206  ball.velocity = '0 0 200' + '0 100 0'*crandom() + '100 0 0'*crandom();
207  ball.owner = NULL;
208  navigation_dynamicgoal_set(ball, player);
209 
210  // messages and sounds
211  ka_EventLog("dropped", player);
212  Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_KEEPAWAY_DROPPED, player.netname);
213  Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_KEEPAWAY_DROPPED, player.netname);
214  sound(NULL, CH_TRIGGER, SND_KA_DROPPED, VOL_BASE, ATTEN_NONE); // ATTEN_NONE (it's a sound intended to be heard anywhere)
215 
216  // waypoints
217  WaypointSprite_Spawn(WP_KaBall, 0, 0, ball, '0 0 64', NULL, ball.team, ball, waypointsprite_attachedforcarrier, false, RADARICON_FLAGCARRIER);
218  WaypointSprite_UpdateRule(ball.waypointsprite_attachedforcarrier, 0, SPRITERULE_DEFAULT);
219  WaypointSprite_Ping(ball.waypointsprite_attachedforcarrier);
220 
221  ka_PlayerReset(player);
222 }
const int SPRITERULE_DEFAULT
IntrusiveList g_damagedbycontents
Definition: damage.qh:155
entity() spawn
const float ATTEN_NONE
Definition: sound.qh:27
void ka_EventLog(string mode, entity actor)
Definition: sv_keepaway.qc:43
void navigation_dynamicgoal_set(entity this, entity dropper)
Definition: navigation.qc:86
float autocvar_g_keepawayball_respawntime
Definition: sv_keepaway.qc:29
float MOVETYPE_BOUNCE
Definition: progsdefs.qc:256
const float EF_NODRAW
Definition: csprogsdefs.qc:305
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
const int CH_TRIGGER
Definition: sound.qh:12
#define NULL
Definition: post.qh:17
#define crandom()
Returns a random number between -1.0 and 1.0.
Definition: math.qh:27
const float VOL_BASE
Definition: sound.qh:36
void ka_TouchEvent(entity this, entity toucher)
Definition: sv_keepaway.qc:112
void ka_RespawnBall(entity this)
Definition: sv_keepaway.qc:49
void ka_DamageEvent(entity this, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
Definition: sv_keepaway.qc:106
setorigin(ent, v)
#define setthink(e, f)
#define sound(e, c, s, v, a)
Definition: sound.qh:52
void ka_PlayerReset(entity player)
Definition: sv_keepaway.qc:176
float time
Definition: csprogsdefs.qc:16
void set_movetype(entity this, int mt)
float DAMAGE_YES
Definition: progsdefs.qc:283
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ka_EventLog()

void ka_EventLog ( string  mode,
entity  actor 
)

Definition at line 43 of file sv_keepaway.qc.

References autocvar_sv_eventlog, ftos(), GameLogEcho(), NULL, and strcat().

Referenced by ka_DropEvent(), and ka_TouchEvent().

44 {
46  GameLogEcho(strcat(":ka:", mode, ((actor != NULL) ? (strcat(":", ftos(actor.playerid))) : "")));
47 }
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
#define NULL
Definition: post.qh:17
void GameLogEcho(string s)
Definition: gamelog.qc:12
bool autocvar_sv_eventlog
Definition: gamelog.qh:3
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ka_Handler_CheckBall()

void ka_Handler_CheckBall ( entity  this)

Definition at line 280 of file sv_keepaway.qc.

References g_kaballs, IL_EMPTY, KA_BALL_COUNT, ka_RemoveBalls(), ka_SpawnBalls(), nextthink, and time.

Referenced by ka_Initialize().

281 {
282  if(time < game_starttime)
283  {
284  if (!IL_EMPTY(g_kaballs))
285  ka_RemoveBalls();
286  }
287  else
288  {
289  if (IL_EMPTY(g_kaballs))
291  }
292 
293  this.nextthink = time;
294 }
const int KA_BALL_COUNT
Definition: sv_keepaway.qh:24
float nextthink
Definition: csprogsdefs.qc:121
void ka_SpawnBalls(int ballcount)
Definition: sv_keepaway.qc:271
#define IL_EMPTY(this)
void ka_RemoveBalls()
Definition: sv_keepaway.qc:238
float time
Definition: csprogsdefs.qc:16
IntrusiveList g_kaballs
Definition: sv_keepaway.qh:7
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ka_Initialize()

void ka_Initialize ( )

Definition at line 296 of file sv_keepaway.qc.

References g_kaballs, IL_NEW, ka_Handler, ka_Handler_CheckBall(), new_pure, setthink, and time.

Referenced by REGISTER_MUTATOR().

297 {
298  g_kaballs = IL_NEW();
301  ka_Handler.nextthink = time;
302 }
entity ka_Handler
Definition: sv_keepaway.qh:26
#define IL_NEW()
void ka_Handler_CheckBall(entity this)
Definition: sv_keepaway.qc:280
#define new_pure(class)
purely logical entities (.origin doesn&#39;t work)
Definition: oo.qh:62
#define setthink(e, f)
float time
Definition: csprogsdefs.qc:16
IntrusiveList g_kaballs
Definition: sv_keepaway.qh:7
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ka_PlayerReset()

void ka_PlayerReset ( entity  player)

Definition at line 176 of file sv_keepaway.qc.

References autocvar_g_keepaway_ballcarrier_effects, GameRules_scoring_vip(), and NULL.

Referenced by ka_DropEvent(), and ka_RemoveBall().

177 {
178  player.ballcarried = NULL;
179  GameRules_scoring_vip(player, false);
180  WaypointSprite_Kill(player.waypointsprite_attachedforcarrier);
181 
182  // reset the player effects
183  player.glow_trail = false;
184  player.effects &= ~autocvar_g_keepaway_ballcarrier_effects;
185 }
void GameRules_scoring_vip(entity player, bool value)
Mark a player as being &#39;important&#39; (flag carrier, ball carrier, etc)
Definition: sv_rules.qc:98
#define NULL
Definition: post.qh:17
int autocvar_g_keepaway_ballcarrier_effects
Definition: sv_keepaway.qc:12
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ka_RemoveBall()

void ka_RemoveBall ( entity  ball)

Definition at line 228 of file sv_keepaway.qc.

References entity(), and ka_PlayerReset().

Referenced by ka_RemoveBalls().

229 {
230  entity player = ball.owner;
231  if (player) // it was attached
232  ka_PlayerReset(player);
233  else
234  WaypointSprite_DetachCarrier(ball);
235  delete(ball);
236 }
entity() spawn
void ka_PlayerReset(entity player)
Definition: sv_keepaway.qc:176
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ka_RemoveBalls()

void ka_RemoveBalls ( )

Definition at line 238 of file sv_keepaway.qc.

References g_kaballs, IL_EACH, and ka_RemoveBall().

Referenced by ka_Handler_CheckBall().

239 {
240  IL_EACH(g_kaballs, true,
241  {
242  ka_RemoveBall(it);
243  });
244 }
#define IL_EACH(this, cond, body)
void ka_RemoveBall(entity ball)
Definition: sv_keepaway.qc:228
IntrusiveList g_kaballs
Definition: sv_keepaway.qh:7
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ka_RespawnBall()

void ka_RespawnBall ( entity  this)

Definition at line 49 of file sv_keepaway.qc.

References angles, ATTEN_NONE, autocvar_g_keepawayball_effects, autocvar_g_keepawayball_respawntime, CH_TRIGGER, DPCONTENTS_BODY, DPCONTENTS_CORPSE, DPCONTENTS_DONOTENTER, DPCONTENTS_LAVA, DPCONTENTS_PLAYERCLIP, DPCONTENTS_SKY, DPCONTENTS_SLIME, DPCONTENTS_SOLID, effects, entity(), ka_TouchEvent(), makevectors, MoveToRandomMapLocation(), MOVETYPE_BOUNCE, navigation_dynamicgoal_set(), nextthink, NULL, origin, Q3SURFACEFLAG_SKY, SelectSpawnPoint(), set_movetype(), setorigin(), setthink, sound, team, time, vector(), velocity, and VOL_BASE.

Referenced by ka_DamageEvent(), ka_DropEvent(), ka_SpawnBall(), and ka_TouchEvent().

50 {
51  if(game_stopped) return;
52  vector oldballorigin = this.origin;
53 
55  {
56  entity spot = SelectSpawnPoint(this, true);
57  setorigin(this, spot.origin);
58  this.angles = spot.angles;
59  }
60 
61  makevectors(this.angles);
63  this.velocity = '0 0 200';
64  this.angles = '0 0 0';
66  settouch(this, ka_TouchEvent);
67  setthink(this, ka_RespawnBall);
70 
71  Send_Effect(EFFECT_ELECTRO_COMBO, oldballorigin, '0 0 0', 1);
72  Send_Effect(EFFECT_ELECTRO_COMBO, this.origin, '0 0 0', 1);
73 
74  WaypointSprite_Spawn(WP_KaBall, 0, 0, this, '0 0 64', NULL, this.team, this, waypointsprite_attachedforcarrier, false, RADARICON_FLAGCARRIER);
75  WaypointSprite_Ping(this.waypointsprite_attachedforcarrier);
76 
77  sound(this, CH_TRIGGER, SND_KA_RESPAWN, VOL_BASE, ATTEN_NONE); // ATTEN_NONE (it's a sound intended to be heard anywhere)
78 }
entity SelectSpawnPoint(entity this, bool anypoint)
Definition: spawnpoints.qc:329
int team
Definition: main.qh:157
entity() spawn
const float ATTEN_NONE
Definition: sound.qh:27
float DPCONTENTS_SKY
void navigation_dynamicgoal_set(entity this, entity dropper)
Definition: navigation.qc:86
float MoveToRandomMapLocation(entity e, float goodcontents, float badcontents, float badsurfaceflags, float attempts, float maxaboveground, float minviewdistance)
Definition: world.qc:1157
float DPCONTENTS_PLAYERCLIP
float autocvar_g_keepawayball_respawntime
Definition: sv_keepaway.qc:29
origin
Definition: ent_cs.qc:114
float MOVETYPE_BOUNCE
Definition: progsdefs.qc:256
float effects
Definition: csprogsdefs.qc:111
int autocvar_g_keepawayball_effects
Definition: sv_keepaway.qc:28
float Q3SURFACEFLAG_SKY
const int CH_TRIGGER
Definition: sound.qh:12
#define NULL
Definition: post.qh:17
float DPCONTENTS_SOLID
const float VOL_BASE
Definition: sound.qh:36
float nextthink
Definition: csprogsdefs.qc:121
vector(float skel, float bonenum) _skel_get_boneabs_hidden
float DPCONTENTS_BODY
void ka_TouchEvent(entity this, entity toucher)
Definition: sv_keepaway.qc:112
void ka_RespawnBall(entity this)
Definition: sv_keepaway.qc:49
setorigin(ent, v)
#define setthink(e, f)
float DPCONTENTS_SLIME
vector angles
Definition: csprogsdefs.qc:104
#define sound(e, c, s, v, a)
Definition: sound.qh:52
float DPCONTENTS_DONOTENTER
float time
Definition: csprogsdefs.qc:16
vector velocity
Definition: csprogsdefs.qc:103
#define makevectors
Definition: post.qh:21
void set_movetype(entity this, int mt)
float DPCONTENTS_CORPSE
float DPCONTENTS_LAVA
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ka_SpawnBall()

void ka_SpawnBall ( )

Definition at line 246 of file sv_keepaway.qc.

References autocvar_g_keepawayball_damageforcescale, autocvar_g_keepawayball_trail_color, DAMAGE_YES, entity(), FL_ITEM, g_damagedbycontents, g_items, g_kaballs, IL_PUSH(), InitializeEntity(), ka_DamageEvent(), ka_RespawnBall(), ka_TouchEvent(), MOVETYPE_BOUNCE, navigation_dynamicgoal_init(), NULL, set_movetype(), setmodel, and SOLID_TRIGGER.

Referenced by ka_SpawnBalls().

247 {
248  entity e = new(keepawayball);
249  setmodel(e, MDL_KA_BALL);
250  setsize(e, '-16 -16 -20', '16 16 20'); // 20 20 20 was too big, player is only 16 16 24... gotta cheat with the Z (20) axis so that the particle isn't cut off
251  e.damageforcescale = autocvar_g_keepawayball_damageforcescale;
252  e.takedamage = DAMAGE_YES;
253  e.event_damage = ka_DamageEvent;
254  e.damagedbycontents = true;
256  e.solid = SOLID_TRIGGER;
259  e.glow_trail = true;
260  e.flags = FL_ITEM;
261  IL_PUSH(g_items, e);
262  e.pushable = true;
263  settouch(e, ka_TouchEvent);
264  e.owner = NULL;
265  IL_PUSH(g_kaballs, e);
266  navigation_dynamicgoal_init(e, false);
267 
268  InitializeEntity(e, ka_RespawnBall, INITPRIO_SETLOCATION); // is this the right priority? Neh, I have no idea.. Well-- it works! So.
269 }
IntrusiveList g_damagedbycontents
Definition: damage.qh:155
entity() spawn
void navigation_dynamicgoal_init(entity this, bool initially_static)
Definition: navigation.qc:76
float MOVETYPE_BOUNCE
Definition: progsdefs.qc:256
float FL_ITEM
Definition: progsdefs.qc:239
float autocvar_g_keepawayball_damageforcescale
Definition: sv_keepaway.qc:27
#define setmodel(this, m)
Definition: model.qh:26
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
IntrusiveList g_items
Definition: items.qh:126
#define NULL
Definition: post.qh:17
void InitializeEntity(entity e, void(entity this) func, int order)
Definition: world.qc:2146
void ka_TouchEvent(entity this, entity toucher)
Definition: sv_keepaway.qc:112
void ka_RespawnBall(entity this)
Definition: sv_keepaway.qc:49
void ka_DamageEvent(entity this, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
Definition: sv_keepaway.qc:106
const float SOLID_TRIGGER
Definition: csprogsdefs.qc:245
int autocvar_g_keepawayball_trail_color
Definition: sv_keepaway.qc:30
IntrusiveList g_kaballs
Definition: sv_keepaway.qh:7
void set_movetype(entity this, int mt)
float DAMAGE_YES
Definition: progsdefs.qc:283
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ka_SpawnBalls()

void ka_SpawnBalls ( int  ballcount)

Definition at line 271 of file sv_keepaway.qc.

References ka_SpawnBall(), and max().

Referenced by ka_Handler_CheckBall().

272 {
273  int realballcount = max(1, ballcount); // never allow less than 1 ball to spawn
274  for(int j = 0; j < realballcount; ++j)
275  {
276  ka_SpawnBall();
277  }
278 }
void ka_SpawnBall()
Definition: sv_keepaway.qc:246
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ka_TimeScoring()

void ka_TimeScoring ( entity  this)

Definition at line 90 of file sv_keepaway.qc.

References autocvar_g_keepaway_score_timeinterval, autocvar_g_keepaway_score_timepoints, GameRules_scoring_add, GameRules_scoring_add_float2int, max(), nextthink, owner, time, and timepoints_counter.

Referenced by ka_TouchEvent().

91 {
92  if(this.owner.ballcarried)
93  { // add points for holding the ball after a certain amount of time
94  float timescore = 0;
97 
98  if (timescore)
99  GameRules_scoring_add_float2int(this.owner, SCORE, timescore, timepoints_counter, 1);
100 
101  GameRules_scoring_add(this.owner, KEEPAWAY_BCTIME, 1);
102  this.nextthink = time + 1;
103  }
104 }
int autocvar_g_keepaway_score_timepoints
Definition: sv_keepaway.qc:25
float timepoints_counter
Definition: sv_keepaway.qc:80
#define GameRules_scoring_add(client, fld, value)
Definition: sv_rules.qh:78
entity owner
Definition: main.qh:73
#define GameRules_scoring_add_float2int(client, fld, value, float_field, score_factor)
Definition: sv_rules.qh:75
float nextthink
Definition: csprogsdefs.qc:121
float time
Definition: csprogsdefs.qc:16
float autocvar_g_keepaway_score_timeinterval
Definition: sv_keepaway.qc:26
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ka_TouchEvent()

void ka_TouchEvent ( entity  this,
entity  toucher 
)

Definition at line 112 of file sv_keepaway.qc.

References ATTEN_NONE, ATTEN_NORM, autocvar_g_keepaway_ballcarrier_effects, autocvar_g_keepawayball_trail_color, CH_TRIGGER, DAMAGE_NO, damagedbycontents, EF_NODRAW, effects, func_null(), g_damagedbycontents, GameRules_scoring_add, GameRules_scoring_vip(), IL_REMOVE(), IS_DEAD, IS_PLAYER, ka_ballcarrier_waypointsprite_visible_for_player(), ka_EventLog(), ka_RespawnBall(), ka_TimeScoring(), MOVETYPE_NONE, navigation_dynamicgoal_unset(), nextthink, NULL, origin, owner, Q3SURFACEFLAG_NOIMPACT, set_movetype(), setorigin(), setthink, sound, SPRITERULE_DEFAULT, takedamage, time, trace_dphitq3surfaceflags, velocity, VOL_BASE, and wait.

Referenced by ka_DropEvent(), ka_RespawnBall(), and ka_SpawnBall().

113 {
114  if (!this || game_stopped)
115  return;
116 
118  { // The ball fell off the map, respawn it since players can't get to it
119  ka_RespawnBall(this);
120  return;
121  }
122  if(toucher.ballcarried) { return; }
123  if(IS_DEAD(toucher)) { return; }
124  if(STAT(FROZEN, toucher)) { return; }
125  if (!IS_PLAYER(toucher))
126  { // The ball just touched an object, most likely the world
127  Send_Effect(EFFECT_BALL_SPARKS, this.origin, '0 0 0', 1);
128  sound(this, CH_TRIGGER, SND_KA_TOUCH, VOL_BASE, ATTEN_NORM);
129  return;
130  }
131  else if(this.wait > time) { return; }
132 
133  // attach the ball to the player
134  this.owner = toucher;
135  toucher.ballcarried = this;
136  GameRules_scoring_vip(toucher, true);
137  setattachment(this, toucher, "");
138  setorigin(this, '0 0 0');
139 
140  // make the ball invisible/unable to do anything/set up time scoring
141  this.velocity = '0 0 0';
143  this.effects |= EF_NODRAW;
144  settouch(this, func_null);
145  setthink(this, ka_TimeScoring);
146  this.nextthink = time + 1;
147  this.takedamage = DAMAGE_NO;
148  this.event_damage = func_null;
149  this.damagedbycontents = false;
152 
153  // apply effects to player
154  toucher.glow_color = autocvar_g_keepawayball_trail_color;
155  toucher.glow_trail = true;
156  toucher.effects |= autocvar_g_keepaway_ballcarrier_effects;
157 
158  // messages and sounds
159  ka_EventLog("pickup", toucher);
160  Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_KEEPAWAY_PICKUP, toucher.netname);
161  Send_Notification(NOTIF_ALL_EXCEPT, toucher, MSG_CENTER, CENTER_KEEPAWAY_PICKUP, toucher.netname);
162  Send_Notification(NOTIF_ONE, toucher, MSG_CENTER, CENTER_KEEPAWAY_PICKUP_SELF);
163  sound(this.owner, CH_TRIGGER, SND_KA_PICKEDUP, VOL_BASE, ATTEN_NONE); // ATTEN_NONE (it's a sound intended to be heard anywhere)
164 
165  // scoring
166  GameRules_scoring_add(toucher, KEEPAWAY_PICKUPS, 1);
167 
168  // waypoints
169  WaypointSprite_AttachCarrier(WP_KaBallCarrier, toucher, RADARICON_FLAGCARRIER);
170  toucher.waypointsprite_attachedforcarrier.waypointsprite_visible_for_player = ka_ballcarrier_waypointsprite_visible_for_player;
171  WaypointSprite_UpdateRule(toucher.waypointsprite_attachedforcarrier, 0, SPRITERULE_DEFAULT);
172  WaypointSprite_Ping(toucher.waypointsprite_attachedforcarrier);
173  WaypointSprite_Kill(this.waypointsprite_attachedforcarrier);
174 }
ERASEABLE void IL_REMOVE(IntrusiveList this, entity it)
Remove any element, anywhere in the list.
float MOVETYPE_NONE
Definition: progsdefs.qc:246
float trace_dphitq3surfaceflags
const int SPRITERULE_DEFAULT
void GameRules_scoring_vip(entity player, bool value)
Mark a player as being &#39;important&#39; (flag carrier, ball carrier, etc)
Definition: sv_rules.qc:98
IntrusiveList g_damagedbycontents
Definition: damage.qh:155
const float ATTEN_NONE
Definition: sound.qh:27
#define GameRules_scoring_add(client, fld, value)
Definition: sv_rules.qh:78
void ka_EventLog(string mode, entity actor)
Definition: sv_keepaway.qc:43
origin
Definition: ent_cs.qc:114
float effects
Definition: csprogsdefs.qc:111
entity owner
Definition: main.qh:73
const float EF_NODRAW
Definition: csprogsdefs.qc:305
float damagedbycontents
Definition: damage.qh:48
const int CH_TRIGGER
Definition: sound.qh:12
float wait
Definition: subs.qh:39
#define NULL
Definition: post.qh:17
const float VOL_BASE
Definition: sound.qh:36
float takedamage
Definition: progsdefs.qc:147
float Q3SURFACEFLAG_NOIMPACT
#define IS_DEAD(s)
Definition: utils.qh:26
const float ATTEN_NORM
Definition: sound.qh:30
float nextthink
Definition: csprogsdefs.qc:121
void ka_TimeScoring(entity this)
Definition: sv_keepaway.qc:90
void navigation_dynamicgoal_unset(entity this)
Definition: navigation.qc:95
void ka_RespawnBall(entity this)
Definition: sv_keepaway.qc:49
int autocvar_g_keepawayball_trail_color
Definition: sv_keepaway.qc:30
setorigin(ent, v)
int autocvar_g_keepaway_ballcarrier_effects
Definition: sv_keepaway.qc:12
#define setthink(e, f)
#define sound(e, c, s, v, a)
Definition: sound.qh:52
float time
Definition: csprogsdefs.qc:16
vector velocity
Definition: csprogsdefs.qc:103
bool ka_ballcarrier_waypointsprite_visible_for_player(entity this, entity player, entity view)
Definition: sv_keepaway.qc:32
float DAMAGE_NO
Definition: progsdefs.qc:282
void set_movetype(entity this, int mt)
#define IS_PLAYER(v)
Definition: utils.qh:9
var void func_null()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MODEL()

MODEL ( KA_BALL  ,
"models/orbs/orbblue.md3"   
)

◆ MUTATOR_HOOKFUNCTION() [1/14]

MUTATOR_HOOKFUNCTION ( ka  ,
reset_map_global   
)

Definition at line 81 of file sv_keepaway.qc.

References FOREACH_CLIENT.

82 {
83  FOREACH_CLIENT(true,
84  {
85  it.timepoints_counter = 0;
86  });
87  return true;
88 }
#define FOREACH_CLIENT(cond, body)
Definition: utils.qh:49

◆ MUTATOR_HOOKFUNCTION() [2/14]

MUTATOR_HOOKFUNCTION ( ka  ,
PlayerDies   
)

Definition at line 379 of file sv_keepaway.qc.

References autocvar_g_keepaway_noncarrier_warn, autocvar_g_keepaway_score_bckill, autocvar_g_keepaway_score_killac, entity(), GameRules_scoring_add, IS_PLAYER, ka_DropEvent(), and M_ARGV.

380 {
381  entity frag_attacker = M_ARGV(1, entity);
382  entity frag_target = M_ARGV(2, entity);
383 
384  if((frag_attacker != frag_target) && (IS_PLAYER(frag_attacker)))
385  {
386  if(frag_target.ballcarried) { // add to amount of times killing carrier
387  GameRules_scoring_add(frag_attacker, KEEPAWAY_CARRIERKILLS, 1);
388  if(autocvar_g_keepaway_score_bckill) // add bckills to the score
390  }
391  else if(!frag_attacker.ballcarried)
393  Send_Notification(NOTIF_ONE_ONLY, frag_attacker, MSG_CENTER, CENTER_KEEPAWAY_WARN);
394 
395  if(frag_attacker.ballcarried) // add to amount of kills while ballcarrier
397  }
398 
399  if(frag_target.ballcarried) { ka_DropEvent(frag_target); } // a player with the ball has died, drop it
400 }
entity() spawn
#define GameRules_scoring_add(client, fld, value)
Definition: sv_rules.qh:78
int autocvar_g_keepaway_score_killac
Definition: sv_keepaway.qc:24
void ka_DropEvent(entity player)
Definition: sv_keepaway.qc:187
#define M_ARGV(x, type)
Definition: events.qh:17
bool autocvar_g_keepaway_noncarrier_warn
Definition: sv_keepaway.qc:22
int autocvar_g_keepaway_score_bckill
Definition: sv_keepaway.qc:23
#define IS_PLAYER(v)
Definition: utils.qh:9
+ Here is the call graph for this function:

◆ MUTATOR_HOOKFUNCTION() [3/14]

MUTATOR_HOOKFUNCTION ( ka  ,
GiveFragsForKill   
)

Definition at line 402 of file sv_keepaway.qc.

References M_ARGV.

403 {
404  M_ARGV(2, float) = 0; // no frags counted in keepaway
405  return true; // you deceptive little bugger ;3 This needs to be true in order for this function to even count.
406 }
#define M_ARGV(x, type)
Definition: events.qh:17

◆ MUTATOR_HOOKFUNCTION() [4/14]

MUTATOR_HOOKFUNCTION ( ka  ,
Scores_CountFragsRemaining   
)

Definition at line 408 of file sv_keepaway.qc.

References autocvar_g_keepaway_score_timepoints.

409 {
410  // announce remaining frags, but only when timed scoring is off
412 }
int autocvar_g_keepaway_score_timepoints
Definition: sv_keepaway.qc:25

◆ MUTATOR_HOOKFUNCTION() [5/14]

MUTATOR_HOOKFUNCTION ( ka  ,
PlayerPreThink   
)

Definition at line 414 of file sv_keepaway.qc.

References BITSET, entity(), M_ARGV, and NULL.

415 {
416  entity player = M_ARGV(0, entity);
417 
418  // if the player has the ball, make sure they have the item for it (Used for HUD primarily)
419  STAT(OBJECTIVE_STATUS, player) = BITSET(STAT(OBJECTIVE_STATUS, player), KA_CARRYING, player.ballcarried != NULL);
420 }
entity() spawn
#define NULL
Definition: post.qh:17
#define M_ARGV(x, type)
Definition: events.qh:17
#define BITSET(var, mask, flag)
Definition: bits.qh:11
+ Here is the call graph for this function:

◆ MUTATOR_HOOKFUNCTION() [6/14]

MUTATOR_HOOKFUNCTION ( ka  ,
PlayerUseKey   
)

Definition at line 422 of file sv_keepaway.qc.

References entity(), ka_DropEvent(), M_ARGV, and MUTATOR_RETURNVALUE.

423 {
424  entity player = M_ARGV(0, entity);
425 
426  if(MUTATOR_RETURNVALUE == 0)
427  if(player.ballcarried)
428  {
429  ka_DropEvent(player);
430  return true;
431  }
432 }
entity() spawn
void ka_DropEvent(entity player)
Definition: sv_keepaway.qc:187
#define MUTATOR_RETURNVALUE
Definition: base.qh:303
#define M_ARGV(x, type)
Definition: events.qh:17
+ Here is the call graph for this function:

◆ MUTATOR_HOOKFUNCTION() [7/14]

MUTATOR_HOOKFUNCTION ( ka  ,
Damage_Calculate   
)

Definition at line 434 of file sv_keepaway.qc.

References autocvar_g_keepaway_ballcarrier_damage, autocvar_g_keepaway_ballcarrier_force, autocvar_g_keepaway_ballcarrier_selfdamage, autocvar_g_keepaway_ballcarrier_selfforce, autocvar_g_keepaway_noncarrier_damage, autocvar_g_keepaway_noncarrier_force, autocvar_g_keepaway_noncarrier_selfdamage, autocvar_g_keepaway_noncarrier_selfforce, entity(), IS_PLAYER, M_ARGV, and vector().

435 {
436  entity frag_attacker = M_ARGV(1, entity);
437  entity frag_target = M_ARGV(2, entity);
438 
439  // as a gamemode rule, only apply scaling to player versus player combat
440  if(!IS_PLAYER(frag_attacker) || !IS_PLAYER(frag_target))
441  return;
442 
443  if(frag_attacker.ballcarried) // if the attacker is a ballcarrier
444  {
445  if(frag_target == frag_attacker) // damage done to yourself
446  {
449  }
450  else // damage done to noncarriers
451  {
454  }
455  }
456  else // if the target is a noncarrier
457  {
458  if(frag_target == frag_attacker) // damage done to yourself
459  {
462  }
463  else // damage done to other noncarriers
464  {
467  }
468  }
469 }
float autocvar_g_keepaway_ballcarrier_selfdamage
Definition: sv_keepaway.qc:16
float autocvar_g_keepaway_ballcarrier_selfforce
Definition: sv_keepaway.qc:17
float autocvar_g_keepaway_noncarrier_selfdamage
Definition: sv_keepaway.qc:20
entity() spawn
float autocvar_g_keepaway_noncarrier_force
Definition: sv_keepaway.qc:19
float autocvar_g_keepaway_ballcarrier_force
Definition: sv_keepaway.qc:14
#define M_ARGV(x, type)
Definition: events.qh:17
vector(float skel, float bonenum) _skel_get_boneabs_hidden
float autocvar_g_keepaway_noncarrier_damage
Definition: sv_keepaway.qc:18
float autocvar_g_keepaway_ballcarrier_damage
Definition: sv_keepaway.qc:13
#define IS_PLAYER(v)
Definition: utils.qh:9
float autocvar_g_keepaway_noncarrier_selfforce
Definition: sv_keepaway.qc:21
+ Here is the call graph for this function:

◆ MUTATOR_HOOKFUNCTION() [8/14]

MUTATOR_HOOKFUNCTION ( ka  ,
ClientDisconnect   
)

Definition at line 471 of file sv_keepaway.qc.

References entity(), ka_DropEvent(), and M_ARGV.

472 {
473  entity player = M_ARGV(0, entity);
474 
475  if(player.ballcarried) { ka_DropEvent(player); } // a player with the ball has left the match, drop it
476 }
entity() spawn
void ka_DropEvent(entity player)
Definition: sv_keepaway.qc:187
#define M_ARGV(x, type)
Definition: events.qh:17
+ Here is the call graph for this function:

◆ MUTATOR_HOOKFUNCTION() [9/14]

MUTATOR_HOOKFUNCTION ( ka  ,
MakePlayerObserver   
)

Definition at line 478 of file sv_keepaway.qc.

References entity(), ka_DropEvent(), and M_ARGV.

479 {
480  entity player = M_ARGV(0, entity);
481 
482  if(player.ballcarried) { ka_DropEvent(player); } // a player with the ball has left the match, drop it
483 }
entity() spawn
void ka_DropEvent(entity player)
Definition: sv_keepaway.qc:187
#define M_ARGV(x, type)
Definition: events.qh:17
+ Here is the call graph for this function:

◆ MUTATOR_HOOKFUNCTION() [10/14]

MUTATOR_HOOKFUNCTION ( ka  ,
PlayerPowerups   
)

Definition at line 485 of file sv_keepaway.qc.

References autocvar_g_keepaway_ballcarrier_effects, entity(), and M_ARGV.

486 {
487  entity player = M_ARGV(0, entity);
488 
489  // In the future this hook is supposed to allow me to do some extra stuff with waypointsprites and invisibility powerup
490  // So bare with me until I can fix a certain bug with ka_ballcarrier_waypointsprite_visible_for_player()
491 
492  player.effects &= ~autocvar_g_keepaway_ballcarrier_effects;
493 
494  if(player.ballcarried)
495  player.effects |= autocvar_g_keepaway_ballcarrier_effects;
496 }
entity() spawn
#define M_ARGV(x, type)
Definition: events.qh:17
int autocvar_g_keepaway_ballcarrier_effects
Definition: sv_keepaway.qc:12
+ Here is the call graph for this function:

◆ MUTATOR_HOOKFUNCTION() [11/14]

MUTATOR_HOOKFUNCTION ( ka  ,
PlayerPhysics_UpdateStats   
)

Definition at line 499 of file sv_keepaway.qc.

References autocvar_g_keepaway_ballcarrier_highspeed, entity(), and M_ARGV.

500 {
501  entity player = M_ARGV(0, entity);
502  // these automatically reset, no need to worry
503 
504  if(player.ballcarried)
505  STAT(MOVEVARS_HIGHSPEED, player) *= autocvar_g_keepaway_ballcarrier_highspeed;
506 }
float autocvar_g_keepaway_ballcarrier_highspeed
Definition: sv_keepaway.qc:15
entity() spawn
#define M_ARGV(x, type)
Definition: events.qh:17
+ Here is the call graph for this function:

◆ MUTATOR_HOOKFUNCTION() [12/14]

MUTATOR_HOOKFUNCTION ( ka  ,
BotShouldAttack   
)

Definition at line 508 of file sv_keepaway.qc.

References entity(), g_kaballs, IL_EACH, and M_ARGV.

509 {
510  entity bot = M_ARGV(0, entity);
511  entity targ = M_ARGV(1, entity);
512 
513  // if neither player has ball then don't attack unless the ball is on the ground
514  bool have_held_ball = false;
515  IL_EACH(g_kaballs, it.owner,
516  {
517  have_held_ball = true;
518  break;
519  });
520  if(!targ.ballcarried && !bot.ballcarried && have_held_ball)
521  return true;
522 }
#define IL_EACH(this, cond, body)
entity() spawn
#define M_ARGV(x, type)
Definition: events.qh:17
IntrusiveList g_kaballs
Definition: sv_keepaway.qh:7
+ Here is the call graph for this function:

◆ MUTATOR_HOOKFUNCTION() [13/14]

MUTATOR_HOOKFUNCTION ( ka  ,
HavocBot_ChooseRole   
)

Definition at line 524 of file sv_keepaway.qc.

References entity(), havocbot_role_ka_carrier(), havocbot_role_ka_collector(), and M_ARGV.

525 {
526  entity bot = M_ARGV(0, entity);
527 
528  if (bot.ballcarried)
529  bot.havocbot_role = havocbot_role_ka_carrier;
530  else
531  bot.havocbot_role = havocbot_role_ka_collector;
532  return true;
533 }
void havocbot_role_ka_collector(entity this)
Definition: sv_keepaway.qc:351
entity() spawn
void havocbot_role_ka_carrier(entity this)
Definition: sv_keepaway.qc:328
#define M_ARGV(x, type)
Definition: events.qh:17
+ Here is the call graph for this function:

◆ MUTATOR_HOOKFUNCTION() [14/14]

MUTATOR_HOOKFUNCTION ( ka  ,
DropSpecialItems   
)

Definition at line 535 of file sv_keepaway.qc.

References entity(), ka_DropEvent(), and M_ARGV.

536 {
537  entity frag_target = M_ARGV(0, entity);
538 
539  if(frag_target.ballcarried)
540  ka_DropEvent(frag_target);
541 }
entity() spawn
void ka_DropEvent(entity player)
Definition: sv_keepaway.qc:187
#define M_ARGV(x, type)
Definition: events.qh:17
+ Here is the call graph for this function:

Variable Documentation

◆ autocvar_g_keepaway_ballcarrier_damage

float autocvar_g_keepaway_ballcarrier_damage

Definition at line 13 of file sv_keepaway.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_keepaway_ballcarrier_effects

int autocvar_g_keepaway_ballcarrier_effects

Definition at line 12 of file sv_keepaway.qc.

Referenced by ka_PlayerReset(), ka_TouchEvent(), and MUTATOR_HOOKFUNCTION().

◆ autocvar_g_keepaway_ballcarrier_force

float autocvar_g_keepaway_ballcarrier_force

Definition at line 14 of file sv_keepaway.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_keepaway_ballcarrier_highspeed

float autocvar_g_keepaway_ballcarrier_highspeed

Definition at line 15 of file sv_keepaway.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_keepaway_ballcarrier_selfdamage

float autocvar_g_keepaway_ballcarrier_selfdamage

Definition at line 16 of file sv_keepaway.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_keepaway_ballcarrier_selfforce

float autocvar_g_keepaway_ballcarrier_selfforce

Definition at line 17 of file sv_keepaway.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_keepaway_noncarrier_damage

float autocvar_g_keepaway_noncarrier_damage

Definition at line 18 of file sv_keepaway.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_keepaway_noncarrier_force

float autocvar_g_keepaway_noncarrier_force

Definition at line 19 of file sv_keepaway.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_keepaway_noncarrier_selfdamage

float autocvar_g_keepaway_noncarrier_selfdamage

Definition at line 20 of file sv_keepaway.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_keepaway_noncarrier_selfforce

float autocvar_g_keepaway_noncarrier_selfforce

Definition at line 21 of file sv_keepaway.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_keepaway_noncarrier_warn

bool autocvar_g_keepaway_noncarrier_warn

Definition at line 22 of file sv_keepaway.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_keepaway_score_bckill

int autocvar_g_keepaway_score_bckill

Definition at line 23 of file sv_keepaway.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_keepaway_score_killac

int autocvar_g_keepaway_score_killac

Definition at line 24 of file sv_keepaway.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_keepaway_score_timeinterval

float autocvar_g_keepaway_score_timeinterval

Definition at line 26 of file sv_keepaway.qc.

Referenced by ka_TimeScoring().

◆ autocvar_g_keepaway_score_timepoints

int autocvar_g_keepaway_score_timepoints

Definition at line 25 of file sv_keepaway.qc.

Referenced by ka_TimeScoring(), and MUTATOR_HOOKFUNCTION().

◆ autocvar_g_keepawayball_damageforcescale

float autocvar_g_keepawayball_damageforcescale

Definition at line 27 of file sv_keepaway.qc.

Referenced by ka_SpawnBall().

◆ autocvar_g_keepawayball_effects

int autocvar_g_keepawayball_effects

Definition at line 28 of file sv_keepaway.qc.

Referenced by ka_RespawnBall().

◆ autocvar_g_keepawayball_respawntime

float autocvar_g_keepawayball_respawntime

Definition at line 29 of file sv_keepaway.qc.

Referenced by ka_DropEvent(), and ka_RespawnBall().

◆ autocvar_g_keepawayball_trail_color

int autocvar_g_keepawayball_trail_color

Definition at line 30 of file sv_keepaway.qc.

Referenced by ka_SpawnBall(), and ka_TouchEvent().

◆ ballcarried

entity ballcarried

Definition at line 10 of file sv_keepaway.qc.

Referenced by havocbot_role_ka_carrier(), and havocbot_role_ka_collector().

◆ pushable

bool pushable

Definition at line 224 of file sv_keepaway.qc.

◆ timepoints_counter

float timepoints_counter

Definition at line 80 of file sv_keepaway.qc.

Referenced by ka_TimeScoring().