11#define autocvar_g_race_laps_limit cvar("g_race_laps_limit")
27 bool raw_touch_check =
true;
30 LABEL(search_racecheckpoints)
33 if(it.cnt == cp || cp == -1)
38 if (raw_touch_check &&
vdist(this.
origin - it.nearestwaypoint.origin, <, 30))
41 raw_touch_check =
false;
42 goto search_racecheckpoints;
132 float dt =
M_ARGV(1,
float);
134 player.race_movetime_frac += dt;
135 float f =
floor(player.race_movetime_frac);
136 player.race_movetime_frac -= f;
137 player.race_movetime_count += f;
138 player.race_movetime = player.race_movetime_frac + player.race_movetime_count;
142 if (player.race_penalty)
143 if (
time > player.race_penalty)
144 player.race_penalty = 0;
145 if(player.race_penalty)
147 player.velocity =
'0 0 0';
149 player.disableclientprediction = 2;
163 if(wishvel.x != 0 && wishvel.y != 0 && wishvel.x != wishvel.y)
166 wishspeed =
vlen(wishvel);
167 if(wishvel.x >= 2 * wishvel.y)
171 CS(player).movement_x = wishspeed;
173 CS(player).movement_x = -wishspeed;
174 CS(player).movement_y = 0;
176 else if(wishvel.y >= 2 * wishvel.x)
179 CS(player).movement_x = 0;
181 CS(player).movement_y = wishspeed;
183 CS(player).movement_y = -wishspeed;
235 player.race_checkpoint = -1;
253 player.race_checkpoint = -1;
261 if(spawn_spot.target ==
"")
266 player.race_respawn_checkpoint = player.race_checkpoint;
267 player.race_respawn_spotref = spawn_spot;
269 player.race_place = 0;
290 int frag_deathtype =
M_ARGV(5,
int);
291 if (frag_deathtype == DEATH_KILL.m_id)
340 int record_page =
M_ARGV(0,
int);
341 string ret_string =
M_ARGV(1,
string);
343 for(
int i = record_page * 200; i <
MapInfo_count && i < record_page * 200 + 200; ++i)
357 M_ARGV(1,
string) = ret_string;
364 stuffcmd(player,
"cl_cmd settemp cl_movecliptokeyboard 2\n");
369 float checkrules_timelimit =
M_ARGV(1,
float);
370 float checkrules_fraglimit =
M_ARGV(2,
float);
372 if(checkrules_timelimit >= 0)
403 int fraglimit_override, leadlimit_override;
404 float timelimit_override, qualifying_override;
416 leadlimit_override = 0;
428 else if(want_qualifying)
436 fraglimit_override = 0;
437 leadlimit_override = 0;
438 timelimit_override = qualifying_override;
void navigation_goalrating_start(entity this)
void navigation_goalrating_timeout_set(entity this)
bool navigation_goalrating_timeout(entity this)
void navigation_routerating(entity this, entity e, float f, float rangebias)
void navigation_goalrating_end(entity this)
#define MUTATOR_HOOKFUNCTION(...)
const int CBC_ORDER_EXCLUSIVE
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
const int SFL_LOWER_IS_BETTER
Lower scores are better (e.g.
const int SFL_TIME
Display as mm:ss.s, value is stored as 10ths of a second (AND 0 is the worst possible value!...
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
#define autocvar_timelimit_override
#define autocvar_timelimit
#define autocvar_fraglimit
#define TIME_ENCODED_TOSTRING(n, compact)
const int FRAGS_PLAYER_OUT_OF_GAME
const int FRAGS_SPECTATOR
void GameLogEcho(string s)
bool autocvar_sv_eventlog
#define IL_EACH(this, cond, body)
#define PutClientInServer
bool MapInfo_Get_ByID(int i)
string MapInfo_Map_bspname
void set_movetype(entity this, int mt)
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
void Score_NicePrint(entity to)
Prints the scores to the console of a player.
entity PlayerScore_Sort(.float field, int teams, bool strict, bool nospectators)
Sorts the players and stores their place in the given field, starting with.
void GetPressedKeys(entity this)
void FixClientCvars(entity e)
float race_readTime(string map, float pos)
void race_SendAll(entity player, bool only_rankings)
void race_PreparePlayer(entity this)
void race_SpeedAwardFrame(entity player)
string race_readName(string map, float pos)
float race_NextCheckpoint(float f)
void race_checkAndWriteName(entity player)
IntrusiveList g_racecheckpoints
void race_RetractPlayer(entity this)
void race_AbandonRaceCheck(entity p)
bool autocvar_g_allow_checkpoints
ClientState CS(Client this)
float autocvar_g_race_qualifying_timelimit
float WinningCondition_QualifyingThenRace(float limit)
#define autocvar_g_race_laps_limit
void havocbot_role_race(entity this)
void race_EventLog(string mode, entity actor)
float autocvar_g_race_qualifying_timelimit_override
int autocvar_g_race_teams
float WinningCondition_Race(float fraglimit)
void GameRules_limit_score(int limit)
void GameRules_teams(bool value)
void GameRules_limit_time_qualifying(int limit)
void GameRules_limit_lead(int limit)
void GameRules_limit_time(int limit)
#define GameRules_score_enabled(value)
#define GameRules_scoring_add(client, fld, value)
#define GameRules_scoring(teams, spprio, stprio, fields)
entity TeamBalance_CheckAllowedTeams(entity for_whom)
Checks whether the player can join teams according to global configuration and mutator settings.
#define FOREACH_CLIENT(cond, body)
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
float WinningCondition_Scores(float limit, float leadlimit)
const int WINNING_STARTSUDDENDEATHOVERTIME