43 float old_delay, old_team, real_team;
55 this.
model = head.mdl;
57 this.
skin = head.skin;
59 float points, wait_time;
67 wait_time = this.
wait;
70 bprint(sprintf(
"^3%s^3%s\n", head.netname,
this.message));
72 Send_Notification(NOTIF_ALL,
NULL, MSG_INFO, INFO_DOMINATION_CAPTURE_TIME, head.netname,
this.message, points, wait_time);
74 if(this.
enemy.playerid ==
this.enemy_playerid)
86 if (head.noise1 !=
"")
87 play2all(head.noise1);
92 old_delay = this.
delay;
94 this.
team = real_team;
97 this.
delay = old_delay;
109 WaypointSprite_UpdateSprites(this.
sprite, msg, WP_Null, WP_Null);
122 switch(it.goalentity.team)
124 case NUM_TEAM_1: pps_red += points/wait_time; break;
125 case NUM_TEAM_2: pps_blue += points/wait_time; break;
126 case NUM_TEAM_3: pps_yellow += points/wait_time; break;
127 case NUM_TEAM_4: pps_pink += points/wait_time; break;
133 WaypointSprite_Ping(this.
sprite);
166 if (game_stopped || this.
delay >
time ||
time < game_starttime)
182 fragamt = this.
frags;
187 if (this.
enemy.playerid ==
this.enemy_playerid)
212 while (head && head.team != toucher.team)
214 if (!head || head.netname ==
"" || head ==
this.goalentity)
221 this.
cnt = toucher.team;
232 while (head && head.netname !=
"")
237 WaypointSprite_UpdateSprites(this.
sprite, WP_DomNeut, WP_Null, WP_Null);
238 WaypointSprite_UpdateTeamRadar(this.
sprite, RADARICON_DOMPOINT,
'0 1 1');
239 WaypointSprite_Ping(this.
sprite);
242 this.
model = head.mdl;
244 this.
skin = head.skin;
246 this.
enemy = toucher;
256 while(head && head.netname !=
"")
259 objerror(
this,
"no spawnfunc_dom_team with netname \"\" found\n");
263 _setmodel(
this, head.mdl);
264 this.
skin = head.skin;
269 this.
message =
" has captured a control point";
276 float points, waittime;
284 waittime = this.
wait;
300 setsize(
this,
'-32 -32 -32',
'32 32 32');
305 WaypointSprite_SpawnFixed(WP_DomNeut, this.
origin +
'0 0 32',
this,
sprite, RADARICON_DOMPOINT);
325 ++num_control_points;
334 Send_Notification(NOTIF_ALL,
NULL, MSG_CENTER, CENTER_ROUND_OVER);
335 Send_Notification(NOTIF_ALL,
NULL, MSG_INFO, INFO_ROUND_OVER);
344 if (winner_team == -1)
349 Send_Notification(NOTIF_ALL,
NULL, MSG_CENTER,
APP_TEAM_NUM(winner_team, CENTER_ROUND_TEAM_WIN));
350 Send_Notification(NOTIF_ALL,
NULL, MSG_INFO,
APP_TEAM_NUM(winner_team, INFO_ROUND_TEAM_WIN));
376 navigation_routerating(this, it, ratingscale, 5000);
377 else if(it.goalentity.cnt == 0)
378 navigation_routerating(this, it, ratingscale, 5000);
379 else if(it.goalentity.team != this.team)
380 navigation_routerating(this, it, ratingscale, 5000);
406 string ret_string =
"dom_team";
411 if(head.netname !=
"")
433 it.player_blocked = 1;
520 precache_model(this.
model);
521 if (this.
noise !=
"")
525 _setmodel(
this, this.
model);
526 this.mdl = this.
model;
542 field(SP_DOM_TAKES,
"takes", 0);
547 float sp_domticks, sp_score;
548 sp_score = sp_domticks = 0;
555 field(SP_DOM_TICKS,
"ticks", sp_domticks);
556 field(SP_DOM_TAKES,
"takes", 0);
562 void dom_spawnteam(
string teamname,
float teamcolor,
string pointmodel,
float pointskin,
Sound capsound,
string capnarration,
string capmessage)
568 e.model = pointmodel;
571 e.noise1 =
strzone(capnarration);
572 e.message =
strzone(capmessage);
575 _setmodel(e, e.model);
577 e.dmg = e.modelindex;
589 setthink(e, spawnfunc_dom_controlpoint);
592 spawnfunc_dom_controlpoint(e);
605 dom_spawnteam(
"", 0,
"models/domination/dom_unclaimed.md3", 0, SND_Null,
"",
"");
613 LOG_TRACE(
"No \"dom_team\" entities found on this map, creating them anyway.");
const int NUM_TEAMS
Number of teams in the game.
bool autocvar_g_domination_disable_frags
int Team_GetWinnerTeam_WithOwnedItems(int min_control_points)
Returns the winner team.
int autocvar_g_domination_point_amt
#define APP_TEAM_NUM(num, prefix)
#define round_handler_IsActive()
#define GameRules_scoring(teams, spprio, stprio, fields)
#define IL_EACH(this, cond, body)
void Domination_RoundStart()
void navigation_goalrating_start(entity this)
float autocvar_g_domination_round_timelimit
void havocbot_goalrating_items(entity this, float ratingscale, vector org, float sradius)
void Domination_count_controlpoints()
void ClientConnect(entity this)
ClientConnect
void navigation_goalrating_end(entity this)
IntrusiveList g_dompoints
#define Sound_fixpath(this)
void ScoreRules_dom(int teams)
void round_handler_Spawn(bool() canRoundStart_func, bool() canRoundEnd_func, void() roundStart_func)
bool autocvar_g_domination_roundbased
float TeamScore_AddToTeam(int t, float scorefield, float score)
Adds a score to the given team.
void TeamBalance_Destroy(entity balance)
Destroy the team balance entity.
#define FOREACH_CLIENT(cond, body)
#define GameRules_scoring_add(client, fld, value)
void SUB_UseTargets(entity this, entity actor, entity trigger)
const int SFL_SORT_PRIO_PRIMARY
bool autocvar_g_domination_point_fullbright
float autocvar_g_domination_point_rate
#define round_handler_IsRoundStarted()
int autocvar_g_domination_teams_override
int Team_GetNumberOfOwnedItems(entity team_ent)
Returns the number of items owned by a team.
entity Entity_GetTeam(entity this)
Returns the team entity of the given entity.
void Team_SetNumberOfOwnedItems(entity team_ent, int number)
Sets the number of items owned by a team.
void havocbot_role_dom(entity this)
#define IS_REAL_CLIENT(v)
bool Entity_HasValidTeam(entity this)
Returns whether the given entity belongs to a valid team.
const float EF_FULLBRIGHT
float domination_roundbased
int TeamBalance_GetAllowedTeams(entity balance)
Returns the bitmask of allowed teams.
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
void dom_EventLog(string mode, float team_before, entity actor)
bool navigation_goalrating_timeout(entity this)
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"))
void dompointthink(entity this)
spawnfunc(dom_controlpoint)
void dom_spawnpoint(vector org)
int autocvar_g_domination_default_teams
MUTATOR_HOOKFUNCTION(dom, TeamBalance_CheckAllowedTeams)
#define round_handler_GetEndTime()
void GameLogEcho(string s)
entity Team_GetTeamFromIndex(int index)
Returns the global team entity at the given index.
void navigation_goalrating_timeout_set(entity this)
void dompointtouch(entity this, entity toucher)
vector(float skel, float bonenum) _skel_get_boneabs_hidden
void dompoint_captured(entity this)
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
void InitializeEntity(entity e, void(entity this) func, int order)
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
void dom_DelayedInit(entity this)
void havocbot_goalrating_controlpoints(entity this, float ratingscale, vector org, float sradius)
#define _sound(e, c, s, v, a)
float autocvar_g_domination_warmup
const float SOLID_TRIGGER
void havocbot_goalrating_waypoints(entity this, float ratingscale, vector org, float sradius)
float frame
primary framegroup animation (strength = 1 - lerpfrac - lerpfrac3 - lerpfrac4)
bool Domination_CheckWinner()
bool Domination_CheckPlayers()
#define new_pure(class)
purely logical entities (.origin doesn't work)
entity TeamBalance_CheckAllowedTeams(entity for_whom)
Checks whether the player can join teams according to global configuration and mutator settings...
void set_dom_state(entity e)
void dom_spawnteams(int teams)
void waypoint_spawnforitem(entity e)
bool autocvar_sv_eventlog
void AnimateDomPoint(entity this)
void round_handler_Init(float the_delay, float the_count, float the_round_timelimit)
#define Team_ColoredFullName(teamid)
void dom_spawnteam(string teamname, float teamcolor, string pointmodel, float pointskin, Sound capsound, string capnarration, string capmessage)
int Team_TeamToBit(int team_num)
Converts team value into bit value that is used in team bitmasks.
bool Team_IsValidTeam(int team_num)
Returns whether team value is valid.
void dom_controlpoint_setup(entity this)
#define colormapPaletteColor(c, isPants)