|
Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
|
|
#include "race.qh"#include <common/deathtypes/all.qh>#include <common/gametypes/_mod.qh>#include <common/gametypes/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 695 of file race.qc.
References autocvar_g_allow_checkpoints, defrag_ents, entity(), g_race_targets, IL_EACH, IS_PLAYER, IS_VEHICLE, message, normalize(), Portal_ClearAll(), race_checkpoint, race_highest_checkpoint, race_timed_checkpoint, spawnflags, SUB_UseTargets(), trace_plane_normal, and W_Porto_Fail().
Referenced by checkpoint_touch(), and checkpoint_use().
Definition at line 852 of file race.qc.
References checkpoint_passed(), entity(), EXACTTRIGGER_TOUCH, and toucher.
Referenced by spawnfunc(), and target_checkpoint_setup().
Definition at line 858 of file race.qc.
References checkpoint_passed(), and entity().
Referenced by spawnfunc(), and target_checkpoint_setup().
Definition at line 880 of file race.qc.
References defrag_waypointsprites(), entity(), LOG_WARNF, race_waypointsprite_visible_for_player(), sprite, target, and WaypointSprite_SpawnFixed().
Referenced by defrag_waypointsprites().
Definition at line 1333 of file race.qc.
References entity(), EXACTTRIGGER_TOUCH, race_ImposePenaltyTime(), race_penalty, race_penalty_reason, and toucher.
Referenced by spawnfunc().
Definition at line 1343 of file race.qc.
References entity(), race_ImposePenaltyTime(), race_penalty, and race_penalty_reason.
Referenced by spawnfunc().
Definition at line 1229 of file race.qc.
References ClientData_Touch(), CS(), entity(), MAKE_INDEPENDENT_PLAYER, NULL, race_completed, race_completing, and Send_Notification().
Referenced by MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), and race_StartCompleting().
Definition at line 134 of file race.qc.
References CS_CVAR, db_put(), entity(), ServerProgsDB, strcat(), strcpy, strzone(), and uid2name().
Referenced by MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), and MUTATOR_HOOKFUNCTION().
Definition at line 197 of file race.qc.
References race_timed_checkpoint.
Referenced by race_SendNextCheckpoint(), and race_SendTime().
Definition at line 1276 of file race.qc.
References entity(), and MAX_CHECKPOINTS.
Referenced by ClientCommand_clear_bestcptimes().
| void race_ClearRecords | ( | ) |
Definition at line 1285 of file race.qc.
References FOREACH_CLIENT, MAX_CHECKPOINTS, race_checkpoint_recordholders, race_checkpoint_records, race_checkpoint_recordspeeds, race_PreparePlayer(), and strfree.
Referenced by MUTATOR_HOOKFUNCTION(), and MUTATOR_HOOKFUNCTION().
Definition at line 677 of file race.qc.
References entity(), IS_REAL_CLIENT, msg_entity, MSG_ONE, NULL, RACE_NET_CHECKPOINT_CLEAR, WriteByte(), and WriteHeader.
Referenced by race_PreparePlayer(), and race_RetractPlayer().
Definition at line 462 of file race.qc.
References db_put(), db_remove, ftos(), GetMapname(), getrankings(), MSG_ALL, race_readTime(), race_readUID(), race_send_recordtime(), race_SendRanking(), RANKINGS_CNT, rankings_reply, record_type, ServerProgsDB, strcat(), and strcpy.
Referenced by GameCommand_delrec().
Definition at line 1365 of file race.qc.
References bound(), CS(), entity(), g_racecheckpoints, GameRules_scoring_add, IL_EACH, max(), race_completed, race_highest_checkpoint, race_timed_checkpoint, vector, and vlen().
Definition at line 1301 of file race.qc.
References entity(), g_race_qualifying, IS_REAL_CLIENT, msg_entity, MSG_ONE, RACE_NET_PENALTY_QUALIFYING, RACE_NET_PENALTY_RACE, time, TIME_ENCODE, WriteByte(), WriteHeader, WriteShort(), and WriteString().
Referenced by CheatCommand(), penalty_touch(), and penalty_use().
Definition at line 175 of file race.qc.
References race_highest_checkpoint.
Referenced by havocbot_role_cts(), havocbot_role_race(), and trigger_race_checkpoint_verify().
Definition at line 1246 of file race.qc.
References entity(), NULL, race_ClearTime(), race_place, race_respawn_checkpoint, race_respawn_spotref, and race_started.
Referenced by MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), and race_ClearRecords().
Definition at line 183 of file race.qc.
References race_highest_checkpoint.
Definition at line 129 of file race.qc.
References db_get(), ftos(), record_type, ServerProgsDB, strcat(), and uid2name().
Referenced by getrankings(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), race_SendRanking(), and race_setTime().
Definition at line 79 of file race.qc.
References race_readTime(), and RANKINGS_CNT.
Referenced by race_setTime(), and race_writeTime().
Definition at line 69 of file race.qc.
References db_get(), ftos(), record_type, ServerProgsDB, stof(), and strcat().
Referenced by getladder(), getlsmaps(), getrankings(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), race_deleteTime(), race_readPos(), race_send_recordtime(), race_SendRanking(), race_setTime(), and race_writeTime().
Definition at line 74 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 1255 of file race.qc.
References entity(), g_cts, g_race, race_checkpoint, race_ClearTime(), race_respawn_checkpoint, and race_timed_checkpoint.
Referenced by MUTATOR_HOOKFUNCTION(), and MUTATOR_HOOKFUNCTION().
Definition at line 286 of file race.qc.
References autocvar_g_cts_send_rankings_cnt, min(), RACE_NET_RANKINGS_CNT, RANKINGS_CNT, WriteByte(), and WriteHeader.
Referenced by race_SendAll().
Definition at line 260 of file race.qc.
References GetMapname(), RACE_NET_SERVER_RECORD, race_readTime(), WriteByte(), and WriteHeader.
Referenced by race_deleteTime(), race_SendAll(), and race_setTime().
Definition at line 268 of file race.qc.
References floor(), RACE_NET_SPEED_AWARD, speedaward_holder, speedaward_speed, WriteByte(), WriteHeader, and WriteString().
Referenced by race_SendAll(), and race_SpeedAwardFrame().
Definition at line 277 of file race.qc.
References floor(), RACE_NET_SPEED_AWARD_BEST, speedaward_alltimebest, speedaward_alltimebest_holder, WriteByte(), WriteHeader, and WriteString().
Referenced by race_SendAll(), and race_SpeedAwardFrame().
Definition at line 333 of file race.qc.
References autocvar_g_cts_send_rankings_cnt, db_get(), entity(), 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(), RANKINGS_CNT, record_type, ServerProgsDB, speedaward_alltimebest, speedaward_alltimebest_holder, stof(), strcat(), and uid2name().
Referenced by MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), and MUTATOR_HOOKFUNCTION().
Definition at line 209 of file race.qc.
References autocvar_g_race_cptimes_onlyself, entity(), IS_REAL_CLIENT, msg_entity, MSG_ONE, race_checkpoint_recordholders, race_checkpoint_records, race_checkpoint_recordspeeds, race_CheckpointNetworkID(), RACE_NET_CHECKPOINT_NEXT_QUALIFYING, RACE_NET_CHECKPOINT_NEXT_SPEC_QUALIFYING, time, WriteByte(), WriteCoord(), WriteHeader, and WriteString().
Referenced by SetSpectatee_status().
Definition at line 294 of file race.qc.
References GetMapname(), RACE_NET_SERVER_RANKINGS, race_readName(), race_readTime(), WriteByte(), WriteHeader, WriteShort(), and WriteString().
Referenced by race_deleteTime(), race_SendAll(), and race_setTime().
Definition at line 355 of file race.qc.
References entity(), IS_REAL_CLIENT, MSG_ALL, msg_entity, MSG_ONE, RACE_NET_SERVER_STATUS, WriteByte(), WriteHeader, WriteShort(), and WriteString().
Referenced by race_setTime().
Definition at line 486 of file race.qc.
References autocvar_fraglimit, autocvar_g_race_cptimes_onlyself, ClientData_Touch(), CS(), entity(), etof, FOREACH_CLIENT, g_bot_targets, g_race_qualifying, game_starttime, GameRules_scoring_add, GameRules_scoring_add_team, GetMapname(), IL_REMOVE(), 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_checkpoint_recordspeeds, race_CheckpointNetworkID(), race_completed, race_completing, RACE_NET_CHECKPOINT_HIT_QUALIFYING, RACE_NET_CHECKPOINT_HIT_RACE, RACE_NET_CHECKPOINT_HIT_RACE_BY_OPPONENT, race_setTime(), race_StartCompleting(), race_timed_checkpoint, Send_Notification(), strcat(), strcpy, time, TIME_ENCODE, vec2, vlen(), WriteByte(), WriteHeader, and WriteString().
| void race_setTime | ( | string | map, |
| float | t, | ||
| string | myuid, | ||
| string | mynetname, | ||
| entity | e, | ||
| bool | showmessage ) |
Definition at line 374 of file race.qc.
References CS_CVAR, entity(), GetMapname(), getrankings(), MSG_ALL, NULL, race_readName(), race_readPos(), race_readTime(), race_readUID(), race_send_recordtime(), race_SendRanking(), race_SendStatus(), race_writeTime(), RANKINGS_CNT, rankings_reply, Send_Notification(), strcpy, time, TIME_DECODE, uid2name(), and write_recordmarker().
Referenced by ctf_CaptureRecord(), and race_SendTime().
Definition at line 305 of file race.qc.
References db_put(), entity(), 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(), and MUTATOR_HOOKFUNCTION().
| void race_StartCompleting | ( | ) |
Definition at line 1240 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 866 of file race.qc.
References entity(), owner, and realowner.
Referenced by defrag_waypointsprites(), and spawnfunc().
Definition at line 91 of file race.qc.
References db_put(), ftos(), race_readPos(), race_readTime(), race_readUID(), RANKINGS_CNT, record_type, ServerProgsDB, and strcat().
Referenced by race_setTime().
| spawnfunc | ( | info_player_race | ) |
Definition at line 1264 of file race.qc.
References g_cts, g_race, race_highest_place_spawn, race_lowest_place_spawn, race_place, and race_spawns.
| spawnfunc | ( | target_checkpoint | ) |
Definition at line 1219 of file race.qc.
References target_checkpoint_setup().
| spawnfunc | ( | target_startTimer | ) |
| spawnfunc | ( | target_stopTimer | ) |
| spawnfunc | ( | trigger_race_checkpoint | ) |
Definition at line 1112 of file race.qc.
References absmax, absmin, checkpoint_touch(), checkpoint_use(), cnt, EXACTTRIGGER_INIT, g_cts, g_race, g_race_targets, g_racecheckpoints, IL_NEW, IL_PUSH(), InitializeEntity(), INITPRIO_FINDTARGET, message, message2, MOVE_NORMAL, nearestwaypointtimeout, PL_MAX_CONST, PL_MIN_CONST, race_checkpoint, race_highest_checkpoint, race_penalty, race_penalty_reason, race_timed_checkpoint, race_waypointsprite_visible_for_player(), settouch, spawn_evalfunc, spawnflags, sprite, trace_endpos, trigger_race_checkpoint_spawn_evalfunc(), trigger_race_checkpoint_verify(), use, vector, waypoint_spawnforitem_force(), and WaypointSprite_SpawnFixed().
| spawnfunc | ( | trigger_race_penalty | ) |
Definition at line 1348 of file race.qc.
References EXACTTRIGGER_INIT, penalty_touch(), penalty_use(), race_penalty, race_penalty_reason, settouch, spawnflags, and use.
Definition at line 1168 of file race.qc.
References absmax, absmin, checkpoint_touch(), checkpoint_use(), classname, defrag_ents, entity(), EXACTTRIGGER_INIT, g_cts, g_race, g_race_targets, g_racecheckpoints, IL_NEW, IL_PUSH(), InitializeEntity(), INITPRIO_FINDTARGET, message, message2, MOVE_NORMAL, nearestwaypointtimeout, org, origin, PL_MAX_CONST, PL_MIN_CONST, race_checkpoint, race_penalty_reason, race_timed_checkpoint, settouch, spawnflags, targetname, trace_endpos, trigger_race_checkpoint_verify(), use, vector, and waypoint_spawnforitem_force().
Referenced by spawnfunc(), spawnfunc(), and spawnfunc().
| vector trigger_race_checkpoint_spawn_evalfunc | ( | entity | this, |
| entity | player, | ||
| entity | spot, | ||
| vector | current ) |
Definition at line 1081 of file race.qc.
References entity(), g_race_qualifying, race_checkpoint, race_highest_place_spawn, race_lowest_place_spawn, SPAWN_PRIO_RACE_PREVIOUS_SPAWN, and vector.
Referenced by spawnfunc().
Definition at line 921 of file race.qc.
References argv(), classname, defrag_ents, defragcpexists, entity(), error, fclose(), fgets(), FILE_READ, find(), fopen(), ftos(), g_race, g_race_qualifying, g_race_targets, g_racecheckpoints, 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(), 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 entity(), ftos(), GameLogEcho(), GetGametype(), strcat(), stuffcmd, TIME_ENCODE, and TIME_ENCODED_TOSTRING.
Referenced by ctf_CaptureRecord(), and race_setTime().
| float defrag_ents |
Definition at line 172 of file race.qc.
Referenced by checkpoint_passed(), target_checkpoint_setup(), and trigger_race_checkpoint_verify().
| float defragcpexists |
Definition at line 173 of file race.qc.
Referenced by trigger_race_checkpoint_verify().
| IntrusiveList g_race_targets |
Definition at line 66 of file race.qc.
Referenced by checkpoint_passed(), spawnfunc(), target_checkpoint_setup(), and trigger_race_checkpoint_verify().
| IntrusiveList g_racecheckpoints |
Definition at line 67 of file race.qc.
Referenced by havocbot_role_cts(), havocbot_role_race(), race_GetFractionalLapCount(), spawnfunc(), target_checkpoint_setup(), and trigger_race_checkpoint_verify().
| const float MAX_CHECKPOINTS = 255 |
Definition at line 149 of file race.qc.
Referenced by race_ClearPlayerRecords(), and race_ClearRecords().
| float race_checkpoint_lastlaps[MAX_CHECKPOINTS] |
Definition at line 163 of file race.qc.
Referenced by race_SendTime().
| entity race_checkpoint_lastplayers[MAX_CHECKPOINTS] |
Definition at line 164 of file race.qc.
Referenced by race_SendTime().
| float race_checkpoint_lasttimes[MAX_CHECKPOINTS] |
Definition at line 162 of file race.qc.
Referenced by race_SendTime().
| float race_checkpoint_record[MAX_CHECKPOINTS] |
| string race_checkpoint_recordholders[MAX_CHECKPOINTS] |
Definition at line 161 of file race.qc.
Referenced by race_ClearRecords(), race_SendNextCheckpoint(), and race_SendTime().
| float race_checkpoint_records[MAX_CHECKPOINTS] |
Definition at line 159 of file race.qc.
Referenced by race_ClearRecords(), race_SendNextCheckpoint(), and race_SendTime().
| float race_checkpoint_recordspeed[MAX_CHECKPOINTS] |
| float race_checkpoint_recordspeeds[MAX_CHECKPOINTS] |
Definition at line 160 of file race.qc.
Referenced by race_ClearRecords(), race_SendNextCheckpoint(), and race_SendTime().
| float race_highest_checkpoint |
Definition at line 169 of file race.qc.
Referenced by checkpoint_passed(), race_GetFractionalLapCount(), race_NextCheckpoint(), race_PreviousCheckpoint(), spawnfunc(), and trigger_race_checkpoint_verify().
| string race_penalty_reason |
Definition at line 153 of file race.qc.
Referenced by penalty_touch(), penalty_use(), spawnfunc(), spawnfunc(), and target_checkpoint_setup().
| float race_timed_checkpoint |
Definition at line 170 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().