Xonotic
|
#include "race.qh"
#include <common/deathtypes/all.qh>
#include <common/gamemodes/_mod.qh>
#include <common/gamemodes/rules.qh>
#include <common/mapobjects/subs.qh>
#include <common/mapobjects/triggers.qh>
#include <common/mutators/mutator/waypoints/waypointsprites.qh>
#include <common/net_linked.qh>
#include <common/notifications/all.qh>
#include <common/playerstats.qh>
#include <common/state.qh>
#include <common/stats.qh>
#include <common/vehicles/sv_vehicles.qh>
#include <common/weapons/_all.qh>
#include <common/weapons/weapon/porto.qh>
#include <lib/warpzone/common.qh>
#include <lib/warpzone/util_server.qh>
#include <server/bot/api.qh>
#include <server/cheats.qh>
#include <server/client.qh>
#include <server/command/getreplies.qh>
#include <server/damage.qh>
#include <server/gamelog.qh>
#include <server/intermission.qh>
#include <server/main.qh>
#include <server/mutators/_mod.qh>
#include <server/portals.qh>
#include <server/scores.qh>
#include <server/spawnpoints.qh>
#include <server/weapons/common.qh>
#include <server/world.qh>
Go to the source code of this file.
Definition at line 664 of file race.qc.
References autocvar_g_allow_checkpoints, classname, Damage(), defrag_ents, defragcpexists, DMG_NOWEP, fclose(), FILE_WRITE, fopen(), g_race_qualifying, GetMapname(), IL_EACH, IS_PLAYER, IS_VEHICLE, message, normalize(), NULL, Portal_ClearAll(), race_checkpoint, race_highest_checkpoint, race_ImposePenaltyTime(), race_NextCheckpoint(), race_penalty, race_penalty_reason, race_SendNextCheckpoint(), race_SendTime(), race_timed_checkpoint, spawnflags, strcat(), SUB_UseTargets(), time, and trace_plane_normal.
Referenced by checkpoint_touch(), and checkpoint_use().
Definition at line 815 of file race.qc.
References checkpoint_passed(), and EXACTTRIGGER_TOUCH.
Referenced by spawnfunc(), and target_checkpoint_setup().
Definition at line 821 of file race.qc.
References checkpoint_passed().
Referenced by spawnfunc(), and target_checkpoint_setup().
Definition at line 843 of file race.qc.
References entity(), race_waypointsprite_visible_for_player(), sprite, and target.
Definition at line 1257 of file race.qc.
References EXACTTRIGGER_TOUCH, race_ImposePenaltyTime(), race_penalty, and race_penalty_reason.
Referenced by spawnfunc().
Definition at line 1267 of file race.qc.
References race_ImposePenaltyTime(), race_penalty, and race_penalty_reason.
Referenced by spawnfunc().
Definition at line 1163 of file race.qc.
References ClientData_Touch(), CS(), MAKE_INDEPENDENT_PLAYER, NULL, race_completed, and race_completing.
Referenced by MUTATOR_HOOKFUNCTION(), and race_StartCompleting().
Definition at line 143 of file race.qc.
References CS_CVAR, db_put(), ServerProgsDB, strcat(), strcpy, strzone(), and uid2name().
Referenced by MUTATOR_HOOKFUNCTION().
Definition at line 204 of file race.qc.
References race_timed_checkpoint.
Referenced by race_SendNextCheckpoint(), and race_SendTime().
void race_ClearRecords | ( | ) |
Definition at line 1210 of file race.qc.
References FOREACH_CLIENT, MAX_CHECKPOINTS, race_checkpoint_recordholders, race_checkpoint_records, race_PreparePlayer(), and strfree.
Referenced by MUTATOR_HOOKFUNCTION().
Definition at line 646 of file race.qc.
References IS_REAL_CLIENT, msg_entity, MSG_ONE, NULL, RACE_NET_CHECKPOINT_CLEAR, and WriteByte().
Referenced by race_PreparePlayer(), and race_RetractPlayer().
Definition at line 452 of file race.qc.
References db_put(), db_remove, ftos(), GetMapname(), getrankings(), MSG_ALL, race_readTime(), race_readUID(), race_send_recordtime(), race_SendRanking(), record_type, ServerProgsDB, strcat(), and strcpy.
Referenced by GameCommand_delrec().
Definition at line 1289 of file race.qc.
References bound(), CS(), entity(), GameRules_scoring_add, IL_EACH, max(), race_completed, race_highest_checkpoint, race_timed_checkpoint, vector(), and vlen().
Definition at line 1225 of file race.qc.
References g_race_qualifying, IS_REAL_CLIENT, msg_entity, MSG_ONE, RACE_NET_PENALTY_QUALIFYING, RACE_NET_PENALTY_RACE, time, TIME_ENCODE, WriteByte(), WriteShort(), and WriteString().
Referenced by CheatCommand(), checkpoint_passed(), penalty_touch(), and penalty_use().
void race_InitSpectator | ( | ) |
Definition at line 71 of file race.qc.
References g_race_qualifying, msg_entity, and race_SendNextCheckpoint().
Referenced by SetSpectatee_status().
Definition at line 182 of file race.qc.
References race_highest_checkpoint.
Referenced by checkpoint_passed(), and trigger_race_checkpoint_verify().
Definition at line 1180 of file race.qc.
References NULL, race_ClearTime(), race_place, race_respawn_checkpoint, race_respawn_spotref, and race_started.
Referenced by MUTATOR_HOOKFUNCTION(), and race_ClearRecords().
Definition at line 138 of file race.qc.
References db_get(), ftos(), record_type, ServerProgsDB, strcat(), and uid2name().
Referenced by getrankings(), MUTATOR_HOOKFUNCTION(), race_SendRanking(), and race_setTime().
Definition at line 88 of file race.qc.
References race_readTime().
Referenced by race_setTime(), and race_writeTime().
Definition at line 78 of file race.qc.
References db_get(), ftos(), record_type, ServerProgsDB, stof(), and strcat().
Referenced by getladder(), getlsmaps(), getrankings(), MUTATOR_HOOKFUNCTION(), race_deleteTime(), race_readPos(), race_send_recordtime(), race_SendRanking(), race_setTime(), and race_writeTime().
Definition at line 83 of file race.qc.
References db_get(), ftos(), record_type, ServerProgsDB, and strcat().
Referenced by getladder(), race_deleteTime(), race_setTime(), and race_writeTime().
Definition at line 1189 of file race.qc.
References g_cts, g_race, race_checkpoint, race_ClearTime(), race_respawn_checkpoint, and race_timed_checkpoint.
Referenced by MUTATOR_HOOKFUNCTION().
Definition at line 277 of file race.qc.
References autocvar_g_cts_send_rankings_cnt, min(), RACE_NET_RANKINGS_CNT, and WriteByte().
Referenced by race_SendAll().
Definition at line 251 of file race.qc.
References GetMapname(), RACE_NET_SERVER_RECORD, race_readTime(), and WriteByte().
Referenced by race_deleteTime(), race_SendAll(), and race_setTime().
Definition at line 259 of file race.qc.
References floor(), RACE_NET_SPEED_AWARD, speedaward_holder, speedaward_speed, WriteByte(), and WriteString().
Referenced by race_SendAll(), and race_SpeedAwardFrame().
Definition at line 268 of file race.qc.
References floor(), RACE_NET_SPEED_AWARD_BEST, speedaward_alltimebest, speedaward_alltimebest_holder, WriteByte(), and WriteString().
Referenced by race_SendAll(), and race_SpeedAwardFrame().
Definition at line 324 of file race.qc.
References autocvar_g_cts_send_rankings_cnt, db_get(), GetMapname(), IS_REAL_CLIENT, min(), msg_entity, MSG_ONE, race_send_rankings_cnt(), race_send_recordtime(), race_send_speedaward(), race_send_speedaward_alltimebest(), race_SendRanking(), record_type, ServerProgsDB, speedaward_alltimebest, speedaward_alltimebest_holder, stof(), strcat(), and uid2name().
Referenced by MUTATOR_HOOKFUNCTION().
Definition at line 216 of file race.qc.
References IS_REAL_CLIENT, msg_entity, MSG_ONE, race_checkpoint_recordholders, race_checkpoint_records, race_CheckpointNetworkID(), RACE_NET_CHECKPOINT_NEXT_QUALIFYING, RACE_NET_CHECKPOINT_NEXT_SPEC_QUALIFYING, time, WriteByte(), WriteCoord(), and WriteString().
Referenced by checkpoint_passed(), and race_InitSpectator().
Definition at line 285 of file race.qc.
References GetMapname(), RACE_NET_SERVER_RANKINGS, race_readName(), race_readTime(), WriteByte(), WriteShort(), and WriteString().
Referenced by race_deleteTime(), race_SendAll(), and race_setTime().
Definition at line 346 of file race.qc.
References IS_REAL_CLIENT, MSG_ALL, msg_entity, MSG_ONE, RACE_NET_SERVER_STATUS, WriteByte(), WriteShort(), and WriteString().
Referenced by race_setTime().
Definition at line 476 of file race.qc.
References ClientData_Touch(), CS(), entity(), etof(), FOREACH_CLIENT, g_race_qualifying, GameRules_scoring_add, GameRules_scoring_add_team, GetMapname(), IS_PLAYER, IS_REAL_CLIENT, IS_SPEC, MAKE_INDEPENDENT_PLAYER, msg_entity, MSG_ONE, MUTATOR_CALLHOOK, NULL, race_checkpoint_lastlaps, race_checkpoint_lastplayers, race_checkpoint_lasttimes, race_checkpoint_recordholders, race_checkpoint_records, race_CheckpointNetworkID(), race_completed, race_completing, RACE_NET_CHECKPOINT_HIT_RACE, RACE_NET_CHECKPOINT_HIT_RACE_BY_OPPONENT, race_setTime(), race_StartCompleting(), race_timed_checkpoint, strcpy, time, TIME_ENCODE, and WriteByte().
Referenced by checkpoint_passed().
void race_setTime | ( | string | map, |
float | t, | ||
string | myuid, | ||
string | mynetname, | ||
entity | e, | ||
bool | showmessage | ||
) |
Definition at line 365 of file race.qc.
References GetMapname(), getrankings(), MSG_ALL, NULL, race_readName(), race_readPos(), race_readTime(), race_readUID(), race_send_recordtime(), race_SendRanking(), race_SendStatus(), race_writeTime(), strcpy, time, TIME_DECODE, uid2name(), and write_recordmarker().
Referenced by ctf_CaptureRecord(), and race_SendTime().
Definition at line 296 of file race.qc.
References db_put(), ftos(), GetMapname(), intermission_running, IS_OBSERVER, MSG_ALL, race_send_speedaward(), race_send_speedaward_alltimebest(), record_type, ServerProgsDB, speedaward_alltimebest, speedaward_alltimebest_holder, speedaward_alltimebest_uid, speedaward_holder, speedaward_lastsent, speedaward_lastupdate, speedaward_speed, speedaward_uid, strcat(), time, vdist, and vlen().
Referenced by MUTATOR_HOOKFUNCTION().
void race_StartCompleting | ( | ) |
Definition at line 1174 of file race.qc.
References FOREACH_CLIENT, IS_DEAD, IS_PLAYER, race_AbandonRaceCheck(), and race_completing.
Referenced by InitiateSuddenDeath(), and race_SendTime().
Definition at line 829 of file race.qc.
References entity(), owner, and realowner.
Referenced by defrag_waypointsprites(), and spawnfunc().
Definition at line 100 of file race.qc.
References db_put(), ftos(), race_readPos(), race_readTime(), race_readUID(), record_type, ServerProgsDB, and strcat().
Referenced by race_setTime().
spawnfunc | ( | trigger_race_checkpoint | ) |
Definition at line 1046 of file race.qc.
References absmax, absmin, checkpoint_touch(), checkpoint_use(), cnt, EXACTTRIGGER_INIT, g_cts, g_race, IL_NEW, IL_PUSH(), InitializeEntity(), message, MOVE_NORMAL, nearestwaypointtimeout, race_checkpoint, race_highest_checkpoint, race_penalty, race_penalty_reason, race_timed_checkpoint, race_waypointsprite_visible_for_player(), spawn_evalfunc, spawnflags, sprite, trace_endpos, trigger_race_checkpoint_spawn_evalfunc(), trigger_race_checkpoint_verify(), use, vector(), and waypoint_spawnforitem_force().
spawnfunc | ( | target_checkpoint | ) |
Definition at line 1153 of file race.qc.
References target_checkpoint_setup().
spawnfunc | ( | target_startTimer | ) |
Definition at line 1160 of file race.qc.
References target_checkpoint_setup().
spawnfunc | ( | target_stopTimer | ) |
Definition at line 1161 of file race.qc.
References target_checkpoint_setup().
spawnfunc | ( | info_player_race | ) |
Definition at line 1198 of file race.qc.
References g_cts, g_race, race_highest_place_spawn, race_lowest_place_spawn, race_place, and race_spawns.
spawnfunc | ( | trigger_race_penalty | ) |
Definition at line 1272 of file race.qc.
References EXACTTRIGGER_INIT, penalty_touch(), penalty_use(), race_penalty, race_penalty_reason, spawnflags, and use.
Definition at line 1102 of file race.qc.
References absmax, absmin, checkpoint_touch(), checkpoint_use(), classname, defrag_ents, EXACTTRIGGER_INIT, g_cts, g_race, IL_NEW, IL_PUSH(), InitializeEntity(), message, MOVE_NORMAL, nearestwaypointtimeout, origin, race_checkpoint, race_penalty_reason, race_timed_checkpoint, spawnflags, targetname, trace_endpos, trigger_race_checkpoint_verify(), use, vector(), and waypoint_spawnforitem_force().
Referenced by spawnfunc().
vector trigger_race_checkpoint_spawn_evalfunc | ( | entity | this, |
entity | player, | ||
entity | spot, | ||
vector | current | ||
) |
Definition at line 1015 of file race.qc.
References g_race_qualifying, race_checkpoint, race_highest_place_spawn, race_lowest_place_spawn, and SPAWN_PRIO_RACE_PREVIOUS_SPAWN.
Referenced by spawnfunc().
Definition at line 869 of file race.qc.
References argv(), classname, defrag_ents, defragcpexists, entity(), error(), fclose(), fgets(), FILE_READ, find(), fopen(), ftos(), g_race, g_race_qualifying, GetMapname(), if(), IL_EACH, NULL, race_highest_checkpoint, race_highest_place_spawn, race_lowest_place_spawn, race_NextCheckpoint(), race_timed_checkpoint, Spawn_FilterOutBadSpots(), stof(), strcat(), targetname, and tokenize_console.
Referenced by spawnfunc(), and target_checkpoint_setup().
Definition at line 36 of file race.qc.
References db_get(), db_put(), db_remove, ServerProgsDB, and strcat().
Referenced by getladder(), race_checkAndWriteName(), race_readName(), race_SendAll(), and race_setTime().
Definition at line 57 of file race.qc.
References ftos(), GameLogEcho(), GetGametype(), strcat(), stuffcmd, TIME_ENCODE, and TIME_ENCODED_TOSTRING.
Referenced by ctf_CaptureRecord(), and race_setTime().
float defrag_ents |
Definition at line 179 of file race.qc.
Referenced by checkpoint_passed(), target_checkpoint_setup(), and trigger_race_checkpoint_verify().
float defragcpexists |
Definition at line 180 of file race.qc.
Referenced by checkpoint_passed(), and trigger_race_checkpoint_verify().
IntrusiveList g_race_targets |
IntrusiveList g_racecheckpoints |
Definition at line 69 of file race.qc.
Referenced by havocbot_role_cts(), and havocbot_role_race().
const float MAX_CHECKPOINTS = 255 |
Definition at line 158 of file race.qc.
Referenced by race_ClearRecords().
float race_checkpoint |
Definition at line 163 of file race.qc.
Referenced by checkpoint_passed(), race_RetractPlayer(), spawnfunc(), target_checkpoint_setup(), and trigger_race_checkpoint_spawn_evalfunc().
float race_checkpoint_lastlaps[MAX_CHECKPOINTS] |
Definition at line 171 of file race.qc.
Referenced by race_SendTime().
entity race_checkpoint_lastplayers[MAX_CHECKPOINTS] |
Definition at line 172 of file race.qc.
Referenced by race_SendTime().
float race_checkpoint_lasttimes[MAX_CHECKPOINTS] |
Definition at line 170 of file race.qc.
Referenced by race_SendTime().
float race_checkpoint_record[MAX_CHECKPOINTS] |
string race_checkpoint_recordholders[MAX_CHECKPOINTS] |
Definition at line 169 of file race.qc.
Referenced by race_ClearRecords(), race_SendNextCheckpoint(), and race_SendTime().
float race_checkpoint_records[MAX_CHECKPOINTS] |
Definition at line 168 of file race.qc.
Referenced by race_ClearRecords(), race_SendNextCheckpoint(), and race_SendTime().
float race_highest_checkpoint |
Definition at line 176 of file race.qc.
Referenced by checkpoint_passed(), race_GetFractionalLapCount(), race_NextCheckpoint(), race_PreviousCheckpoint(), spawnfunc(), and trigger_race_checkpoint_verify().
float race_penalty |
Definition at line 160 of file race.qc.
Referenced by checkpoint_passed(), penalty_touch(), penalty_use(), and spawnfunc().
string race_penalty_reason |
Definition at line 162 of file race.qc.
Referenced by checkpoint_passed(), penalty_touch(), penalty_use(), spawnfunc(), and target_checkpoint_setup().
float race_timed_checkpoint |
Definition at line 177 of file race.qc.
Referenced by checkpoint_passed(), race_CheckpointNetworkID(), race_GetFractionalLapCount(), race_RetractPlayer(), race_SendTime(), spawnfunc(), target_checkpoint_setup(), and trigger_race_checkpoint_verify().
entity sprite |
Definition at line 166 of file race.qc.
Referenced by defrag_waypointsprites(), and spawnfunc().