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))
40 cp = race_NextCheckpoint(cp);
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;
212 s = GameRules_scoring_add(it, RACE_FASTEST, 0);
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;
369 stuffcmd(player,
"cl_cmd settemp cl_movecliptokeyboard 2\n");
374 float checkrules_timelimit =
M_ARGV(1,
float);
375 float checkrules_fraglimit =
M_ARGV(2,
float);
377 if(checkrules_timelimit >= 0)
403 radar_showenemies =
true;
408 int fraglimit_override, leadlimit_override;
409 float timelimit_override, qualifying_override;
421 leadlimit_override = 0;
422 timelimit_override = autocvar_timelimit_override;
433 else if(want_qualifying)
437 race_fraglimit = (fraglimit_override >= 0) ? fraglimit_override : autocvar_fraglimit;
438 race_leadlimit = (leadlimit_override >= 0) ? leadlimit_override : autocvar_leadlimit;
439 race_timelimit = (timelimit_override >= 0) ? timelimit_override : autocvar_timelimit;
440 qualifying_override = (qualifying_override >= 0) ? qualifying_override : autocvar_g_race_qualifying_timelimit;
441 fraglimit_override = 0;
442 leadlimit_override = 0;
443 timelimit_override = qualifying_override;
void race_SendAll(entity player, bool only_rankings)
#define GameRules_scoring(teams, spprio, stprio, fields)
#define IL_EACH(this, cond, body)
void navigation_goalrating_start(entity this)
const int CBC_ORDER_EXCLUSIVE
float autocvar_g_race_qualifying_timelimit_override
void ClientConnect(entity this)
ClientConnect
void navigation_goalrating_end(entity this)
void Score_NicePrint(entity to)
Prints the scores to the console of a player.
void ClientKill(entity this)
const int SFL_SORT_PRIO_SECONDARY
Scoring priority (NOTE: PRIMARY is used for fraglimit)
ClientState CS(Client this)
#define FOREACH_CLIENT(cond, body)
#define autocvar_g_race_laps_limit
#define GameRules_scoring_add(client, fld, value)
void GameRules_limit_score(int limit)
void race_checkAndWriteName(entity player)
const int WINNING_STARTSUDDENDEATHOVERTIME
const int SFL_SORT_PRIO_PRIMARY
bool MapInfo_Get_ByID(int i)
void GameRules_score_enabled(bool value)
Disabling score disables the "score" column on the scoreboard.
#define TIME_ENCODED_TOSTRING(n)
void GameRules_limit_time_qualifying(int limit)
const int SFL_LOWER_IS_BETTER
Lower scores are better (e.g.
void navigation_routerating(entity this, entity e, float f, float rangebias)
void GameRules_limit_time(int limit)
void GameRules_teams(bool value)
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"))
int autocvar_g_race_teams
void GetPressedKeys(entity this)
IntrusiveList g_racecheckpoints
bool autocvar_g_allow_checkpoints
float race_readTime(string map, float pos)
void race_SpeedAwardFrame(entity player)
void race_PreparePlayer(entity this)
float WinningCondition_QualifyingThenRace(float limit)
void GameLogEcho(string s)
void race_EventLog(string mode, entity actor)
void navigation_goalrating_timeout_set(entity this)
entity PlayerScore_Sort(.float field, int teams, bool strict, bool nospectators)
Sorts the players and stores their place in the given field, starting with.
vector(float skel, float bonenum) _skel_get_boneabs_hidden
void havocbot_role_race(entity this)
const int FRAGS_PLAYER_OUT_OF_GAME
string race_readName(string map, float pos)
string MapInfo_Map_bspname
float autocvar_g_race_qualifying_timelimit
void GameRules_limit_lead(int limit)
const int FRAGS_SPECTATOR
float WinningCondition_Scores(float limit, float leadlimit)
MUTATOR_HOOKFUNCTION(rc, ClientKill)
void race_RetractPlayer(entity this)
float WinningCondition_Race(float fraglimit)
entity TeamBalance_CheckAllowedTeams(entity for_whom)
Checks whether the player can join teams according to global configuration and mutator settings...
bool autocvar_sv_eventlog
const int SFL_TIME
Display as mm:ss.s, value is stored as 10ths of a second (AND 0 is the worst possible value!) ...
void set_movetype(entity this, int mt)
void FixClientCvars(entity e)
void race_AbandonRaceCheck(entity p)