X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Frace.qh;h=acf35b2b0a89e09ed1a4e4634b85a50de6cb3e46;hb=c0add59c57c00b31e0db86871ad776ffacc9165e;hp=03e8a54aba2747e2f04f6f0914d7e23a2717fccb;hpb=0141e404f85cd34e2394beb4c8651566cc291063;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/race.qh b/qcsrc/server/race.qh index 03e8a54ab..acf35b2b0 100644 --- a/qcsrc/server/race.qh +++ b/qcsrc/server/race.qh @@ -1,5 +1,13 @@ -#ifndef RACE_H -#define RACE_H +#pragma once + +bool autocvar_g_allow_checkpoints; + +float race_teams; + +// scores +const float ST_RACE_LAPS = 1; + +int autocvar_g_cts_send_rankings_cnt = 15; bool g_race_qualifying; @@ -26,6 +34,8 @@ float race_completing; .entity race_respawn_spotref; // try THIS spawn in case you respawn // definitions for functions used outside race.qc +void write_recordmarker(entity pl, float tstart, float dt); + float race_PreviousCheckpoint(float f); float race_NextCheckpoint(float f); void race_AbandonRaceCheck(entity p); @@ -35,11 +45,14 @@ float race_GetFractionalLapCount(entity e); float race_readTime(string map, float pos); string race_readUID(string map, float pos); string race_readName(string map, float pos); + +void race_checkAndWriteName(entity player); void race_ClearRecords(); void race_SendNextCheckpoint(entity e, float spec); -void race_PreparePlayer(); +void race_PreparePlayer(entity this); void race_send_recordtime(float msg); -void race_send_speedaward(float msg); + +void race_setTime(string map, float t, string myuid, string mynetname, entity e, bool showmessage); float speedaward_speed; string speedaward_holder; @@ -50,11 +63,17 @@ string speedaward_alltimebest_holder; string speedaward_alltimebest_uid; void race_send_speedaward(float msg); - void race_send_speedaward_alltimebest(float msg); +void race_SpeedAwardFrame(entity player); + +void race_send_rankings_cnt(float msg); +void race_SendRanking(float pos, float prevpos, float del, float msg); +void race_SendAll(entity player, bool only_rankings); + +void race_RetractPlayer(entity this); -void race_SendRankings(float pos, float prevpos, float del, float msg); +void race_InitSpectator(); -void race_RetractPlayer(); +string uid2name(string myuid); -#endif +spawnfunc(target_checkpoint);