30 if(view.ballcarried &&
IS_SPEC(player))
63 Send_Effect(EFFECT_KA_BALL_RESPAWN, oldballorigin,
'0 0 0', 1);
68 WaypointSprite_Spawn(WP_KaBall, 0, 0,
this,
'0 0 64',
NULL, this.
team,
this,
waypointsprite_attachedforcarrier,
false, RADARICON_FLAGCARRIER);
81 it.float2int_decimal_fld = 0;
96#define BALL_XYSPEED 100
140 setattachment(
this,
toucher,
"");
142 setorigin(
this,
'0 0 0');
182 player.ballcarried =
NULL;
190 ball = player.ballcarried;
192 if(!ball) {
return; }
195 setattachment(ball,
NULL,
"");
197 ball.previous_owner = player;
198 ball.wait =
time + 0.5;
205 setorigin(ball, player.origin + ball.origin +
'0 0 10');
206 nudgeoutofsolid_OrFallback(ball);
207 ball.velocity =
'0 0 200' +
'0 100 0'*
crandom() +
'100 0 0'*
crandom();
220 WaypointSprite_Spawn(WP_KaBall, 0, 0, ball,
'0 0 64',
NULL, ball.team, ball,
waypointsprite_attachedforcarrier,
false, RADARICON_FLAGCARRIER);
225 if (ball.ballcarried)
227 player.ballcarried = ball.ballcarried;
228 ball.ballcarried =
NULL;
236MODEL(TKA_BALL,
"models/orbs/orbblue.md3");
255 entity e =
new(keepawayball);
260 setsize(e,
'-24 -24 -24',
'24 24 24');
305 entity ball_wp = e.waypointsprite_attachedforcarrier;
324 if (!tka_waypointsprite_visible_for_bot(this, it.owner, false))
326 ball_carried = it.owner;
330 if (!tka_waypointsprite_visible_for_bot(this, it, true))
338 else if (ball_carried)
405 bool team_has_ball =
false;
408 team_has_ball = true;
420 Send_Notification(NOTIF_ONE_ONLY, frag_attacker, MSG_CENTER, CENTER_KEEPAWAY_WARN);
448 STAT(TKA_BALLSTATUS, player) = 0;
451 if(player.ballcarried)
461 switch(it.owner.team)
477 if(player.ballcarried)
493 if (frag_attacker.ballcarried)
535 while (player.ballcarried)
543 while (player.ballcarried)
561 if(player.ballcarried)
571 bool have_held_ball =
false, team_has_ball =
false;
574 have_held_ball = true;
575 if(SAME_TEAM(bot, it.owner))
576 team_has_ball = true;
607 STAT(TKA_BALLSTATUS, client) =
STAT(TKA_BALLSTATUS, spectatee);
623 field(SP_TKA_PICKUPS,
"pickups", 0);
624 field(SP_TKA_CARRIERKILLS,
"bckills", 0);
void havocbot_goalrating_waypoints(entity this, float ratingscale, vector org, float sradius)
void navigation_goalrating_start(entity this)
void navigation_goalrating_timeout_set(entity this)
bool navigation_goalrating_timeout(entity this)
void navigation_dynamicgoal_init(entity this, bool initially_static)
void navigation_routerating(entity this, entity e, float f, float rangebias)
void navigation_dynamicgoal_set(entity this, entity dropper)
void navigation_goalrating_timeout_expire(entity this, float seconds)
void navigation_goalrating_end(entity this)
void navigation_dynamicgoal_unset(entity this)
#define MUTATOR_HOOKFUNCTION(...)
const int CBC_ORDER_EXCLUSIVE
#define MUTATOR_RETURNVALUE
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define colormapPaletteColor(c, isPants)
#define setmodel(this, m)
const int SFL_SORT_PRIO_SECONDARY
Scoring priority (NOTE: PRIMARY is used for fraglimit) NOTE: SFL_SORT_PRIO_SECONDARY value must be lo...
const int SFL_SORT_PRIO_PRIMARY
const int INITPRIO_GAMETYPE
const float SOLID_TRIGGER
float DPCONTENTS_DONOTENTER
float DPCONTENTS_PLAYERCLIP
float checkpvs(vector viewpos, entity viewee)
float trace_dphitq3surfaceflags
float Q3SURFACEFLAG_NOIMPACT
void Send_Effect(entity eff, vector eff_loc, vector eff_vel, int eff_cnt)
void GameLogEcho(string s)
bool autocvar_sv_eventlog
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
#define IL_EACH(this, cond, body)
#define MODEL(name, path)
void set_movetype(entity this, int mt)
const int MOVETYPE_BOUNCE
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
void Send_Notification(NOTIF broadcast, entity client, MSG net_type, Notification net_name,...count)
#define new_pure(class)
purely logical entities (not linked to the area grid)
#define crandom()
Returns a random number between -1.0 and 1.0.
void SpectateCopy(entity this, entity spectatee)
void PlayerUseKey(entity this)
#define IS_INDEPENDENT_PLAYER(e)
entity SelectSpawnPoint(entity this, bool anypoint)
#define sound(e, c, s, v, a)
float float2int_decimal_fld
void havocbot_goalrating_items(entity this, float ratingscale, vector org, float sradius)
void havocbot_goalrating_enemyplayers(entity this, float ratingscale, vector org, float sradius)
#define GameRules_scoring_add_team_float2int(client, fld, value, float_field, score_factor)
#define GameRules_scoring_vip(player, value)
#define GameRules_scoring_add(client, fld, value)
#define GameRules_scoring_add_team(client, fld, value)
#define GameRules_scoring(teams, spprio, stprio, fields)
int autocvar_g_tka_ballcarrier_maxballs
bool autocvar_g_tka_noncarrier_warn
float autocvar_g_tka_ballcarrier_highspeed
int autocvar_g_tkaball_trail_color
bool tka_ballcarrier_waypointsprite_visible_for_player(entity this, entity player, entity view)
void tka_EventLog(string mode, entity actor)
bool tka_waypointsprite_visible_for_bot(entity this, entity e, bool dropped)
void havocbot_goalrating_tkaball(entity this, float ratingscale, float ratingscale_sameteam, vector org)
int autocvar_g_tka_score_bckill
vector autocvar_g_tka_ballcarrier_force
void tka_RespawnBall(entity this)
int autocvar_g_tka_score_timepoints
vector autocvar_g_tka_ballcarrier_damage
int autocvar_g_tka_score_killac
float autocvar_g_tkaball_respawntime
void havocbot_role_tka_carrier(entity this)
bool autocvar_g_tka_score_team
void tka_Handler_CheckBall(entity this)
int autocvar_g_tkaball_count
void tka_BallThink_Carried(entity this)
runs (only) while a player is carrying the ball
vector autocvar_g_tka_noncarrier_force
void tka_TouchEvent(entity this, entity toucher)
float autocvar_g_tkaball_damageforcescale
void tka_DropEvent(entity player)
void tka_PlayerReset(entity player)
int autocvar_g_tkaball_effects
int autocvar_g_tkaball_tracking
vector autocvar_g_tka_noncarrier_damage
void havocbot_role_tka_collector(entity this)
int autocvar_g_tka_teams_override
entity TeamBalance_CheckAllowedTeams(entity for_whom)
Checks whether the player can join teams according to global configuration and mutator settings.
const int TKA_BALL_CARRYING
const int TKA_BALL_TAKEN_YELLOW
const int TKA_BALL_TAKEN_RED
const int TKA_BALL_DROPPED
const int TKA_BALL_TAKEN_PINK
const int TKA_BALL_TAKEN_BLUE
#define FOREACH_CLIENT(cond, body)
void WaypointSprite_Kill(entity wp)
void WaypointSprite_UpdateSprites(entity e, entity _m1, entity _m2, entity _m3)
void WaypointSprite_Ping(entity e)
entity WaypointSprite_Spawn(entity spr, float _lifetime, float maxdistance, entity ref, vector ofs, entity showto, float t, entity own,.entity ownfield, float hideable, entity icon)
entity WaypointSprite_getviewentity(entity e)
entity WaypointSprite_AttachCarrier(entity spr, entity carrier, entity icon)
void WaypointSprite_DetachCarrier(entity carrier)
void WaypointSprite_UpdateRule(entity e, float t, float r)
const int SPRITERULE_DEFAULT
entity waypointsprite_attachedforcarrier
const int SPRITERULE_TEAMPLAY
float MoveToRandomMapLocation(entity e, float goodcontents, float badcontents, float badsurfaceflags, float attempts, float maxaboveground, float minviewdistance)
void InitializeEntity(entity e, void(entity this) func, int order)