X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fserver%2Frace.qh;h=1e851ee3041e7fd671397c917571292b5a5ef863;hb=a9890f25ac75642f1415bbf04abf1446c14b8354;hp=bfdc9be4305b80f27265d4c526694a51cfd6ee1e;hpb=37903827937b44f174275a75d2dab5301b8ab53e;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/race.qh b/qcsrc/server/race.qh index bfdc9be43..1e851ee30 100644 --- a/qcsrc/server/race.qh +++ b/qcsrc/server/race.qh @@ -1,5 +1,18 @@ -#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; + +int g_race_qualifying; + +float speedaward_lastsent; +float speedaward_lastupdate; float race_spawns; float race_highest_place_spawn; // number of places; a place higher gets spawned at 0 @@ -10,6 +23,7 @@ float race_timelimit; .float race_place; .float race_started; .float race_completed; +.float race_laptime; float race_completing; .float race_movetime; // for reading @@ -20,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); @@ -29,4 +45,35 @@ 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); -#endif + +void race_checkAndWriteName(entity player); +void race_ClearRecords(); +void race_SendNextCheckpoint(entity e, float spec); +void race_PreparePlayer(entity this); +void race_send_recordtime(float msg); + +void race_setTime(string map, float t, string myuid, string mynetname, entity e, bool showmessage); + +float speedaward_speed; +string speedaward_holder; +string speedaward_uid; + +float speedaward_alltimebest; +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_InitSpectator(); + +string uid2name(string myuid); + +spawnfunc(target_checkpoint);