]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/miscfunctions.qh
Implement detection of items (%x) in formatmessage making use of an existing function...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / miscfunctions.qh
index c5f846b162590f19ba39031bc4a27363cf753ad9..fc1fd5bd12995afb44840d79c67c8029c0b7fd42 100644 (file)
@@ -1,8 +1,11 @@
 #pragma once
 
+#include <server/defs.qh>
+#include <server/g_world.qh>
+
 #include <common/t_items.qh>
 
-#include "mutators/events.qh"
+#include <server/mutators/_mod.qh>
 
 #include <common/constants.qh>
 #include <common/mapinfo.qh>
@@ -27,7 +30,6 @@ 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);
@@ -42,7 +44,7 @@ void GetCvars_handleFloat(entity this, entity store, string thisname, float f, .
 
 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);
 
@@ -60,6 +62,8 @@ void attach_sameorigin(entity e, entity to, string tag);
 void crosshair_trace(entity pl);
 
 void crosshair_trace_plusvisibletriggers(entity pl);
+void WarpZone_crosshair_trace_plusvisibletriggers(entity pl);
+void crosshair_trace_plusvisibletriggers__is_wz(entity pl, bool is_wz);
 
 void detach_sameorigin(entity e);
 
@@ -67,13 +71,16 @@ void follow_sameorigin(entity e, entity to);
 
 string formatmessage(entity this, string msg);
 
+/** print(), but only print if the server is not local */
+void dedicated_print(string input);
+
 void GameLogEcho(string s);
 
 void GameLogInit();
 
 void GameLogClose();
 
-void GetCvars(entity this, float f);
+void GetCvars(entity this, entity store, int f);
 
 string GetMapname();
 
@@ -167,8 +174,7 @@ float g_pickup_fuel_max;
 float g_pickup_weapons_anyway;
 float g_weaponarena;
 WepSet g_weaponarena_weapons;
-float g_weaponarena_random;
-float g_weaponarena_random_with_blaster;
+float g_weaponarena_random; // TODO
 string g_weaponarena_list;
 float g_weaponspeedfactor;
 float g_weaponratefactor;
@@ -186,6 +192,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;
@@ -208,14 +221,11 @@ void readplayerstartcvars();
 float sv_autotaunt;
 float sv_taunt;
 
-string GetGametype(); // g_world.qc
 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");
@@ -226,6 +236,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");
@@ -306,7 +319,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();
 }