X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmiscfunctions.qh;h=41e725946a96cb43c1cd5febd0a04f76deb79359;hb=d2103fff45069a3eea862441558ddf536371e59d;hp=730a528b9021e3c730d0e8ce599f6be19c3233b1;hpb=5fb2f3c4e123910e6291d6337fadd61f5199f5a5;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/miscfunctions.qh b/qcsrc/server/miscfunctions.qh index 730a528b9..41e725946 100644 --- a/qcsrc/server/miscfunctions.qh +++ b/qcsrc/server/miscfunctions.qh @@ -1,5 +1,7 @@ #pragma once +#include + #include #include "mutators/events.qh" @@ -27,24 +29,21 @@ float cvar_normal(string n) #define cvar_set_normal builtin_cvar_set .vector dropped_origin; -.float nottargeted; entity eliminatedPlayers; void EliminatedPlayers_Init(float(entity) isEliminated_func); -string admin_name(); - void write_recordmarker(entity pl, float tstart, float dt); void play2all(string samp); void play2team(float t, string filename); -void GetCvars_handleFloat(entity this, string thisname, float f, .float field, string name); +void GetCvars_handleFloat(entity this, entity store, string thisname, float f, .float field, string name); -float spamsound(entity e, float chan, string samp, float vol, float _atten); +float spamsound(entity e, float chan, Sound samp, float vol, float _atten); -void GetCvars_handleString(entity this, string thisname, float f, .string field, string name); +void GetCvars_handleString(entity this, entity store, string thisname, float f, .string field, string name); void precache_all_playermodels(string pattern); @@ -75,7 +74,7 @@ void GameLogInit(); void GameLogClose(); -void GetCvars(entity this, float f); +void GetCvars(entity this, entity store, int f); string GetMapname(); @@ -188,6 +187,13 @@ float start_ammo_rockets; float start_ammo_cells; float start_ammo_plasma; float start_ammo_fuel; +/// \brief Number of random start weapons to give to players. +int random_start_weapons_count; +/// \brief Holds a list of possible random start weapons. +string autocvar_g_random_start_weapons; +/// \brief Entity that contains amount of ammo to give with random start +/// weapons. +entity random_start_ammo; float start_health; float start_armorvalue; WepSet warmup_start_weapons; @@ -216,8 +222,6 @@ void readlevelcvars() if(cvar("sv_allow_fullbright")) serverflags |= SERVERFLAG_ALLOW_FULLBRIGHT; - g_instagib = cvar("g_instagib"); - sv_clones = cvar("sv_clones"); sv_foginterval = cvar("sv_foginterval"); g_footsteps = cvar("g_footsteps"); @@ -228,6 +232,9 @@ void readlevelcvars() sv_maxidle_slots_countbots = cvar("sv_maxidle_slots_countbots"); sv_autotaunt = cvar("sv_autotaunt"); sv_taunt = cvar("sv_taunt"); + sv_ready_restart = cvar("sv_ready_restart"); + sv_ready_restart_after_countdown = cvar("sv_ready_restart_after_countdown"); + sv_ready_restart_repeatable = cvar("sv_ready_restart_repeatable"); warmup_stage = cvar("g_warmup"); warmup_limit = cvar("g_warmup_limit"); @@ -308,7 +315,7 @@ void readlevelcvars() if (!warmup_stage) game_starttime = time + cvar("g_start_delay"); - FOREACH(Weapons, it != WEP_Null, LAMBDA(it.wr_init(it))); + FOREACH(Weapons, it != WEP_Null, { it.wr_init(it); }); readplayerstartcvars(); } @@ -335,3 +342,6 @@ entity initialize_entity_first; float sound_allowed(float dest, entity e); void InitializeEntity(entity e, void(entity this) func, float order); + +IntrusiveList g_ctrace_changed; +STATIC_INIT(g_ctrace_changed) { g_ctrace_changed = IL_NEW(); }