]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/miscfunctions.qh
Deprecate weapon_func
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / miscfunctions.qh
index 860eadcaa29f85852777eecc68150266581187df..9d939738975ba15fa42b2ddc700ff4917e96dd5b 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "../common/constants.qh"
 #include "../common/mapinfo.qh"
+#include "../common/turrets/turrets.qh"
 
 #ifdef RELEASE
 #define cvar_string_normal builtin_cvar_string
@@ -48,8 +49,6 @@ void modeleffect_spawn(string m, float s, float f, vector o, vector v, vector an
 
 void shockwave_spawn(string m, vector org, float sz, float t1, float t2);
 
-vector randompos(vector m1, vector m2);
-
 void play2team(float t, string filename);
 
 void GetCvars_handleFloat(string thisname, float f, .float field, string name);
@@ -77,8 +76,6 @@ float DistributeEvenly_amount;
 float DistributeEvenly_totalweight;
 void objerror(string s);
 void droptofloor();
-void() spawnfunc_info_player_deathmatch; // needed for the other spawnpoints
-void() spawnpoint_use;
 void() SUB_Remove;
 
 void attach_sameorigin(entity e, entity to, string tag);
@@ -157,6 +154,10 @@ const string STR_OBSERVER = "observer";
 #define IS_REAL_CLIENT(v)              (clienttype(v) == CLIENTTYPE_REAL)
 #define IS_NOT_A_CLIENT(v)             (clienttype(v) == CLIENTTYPE_NOTACLIENT)
 
+#define IS_MONSTER(v)                  (v.flags & FL_MONSTER)
+#define IS_VEHICLE(v)                  (v.vehicle_flags & VHF_ISVEHICLE)
+#define IS_TURRET(v)                   (v.turret_flags & TUR_FLAG_ISTURRET)
+
 #define FOR_EACH_CLIENTSLOT(v) for(v = world; (v = nextent(v)) && (num_for_edict(v) <= maxclients); )
 #define FOR_EACH_CLIENT(v) FOR_EACH_CLIENTSLOT(v) if(IS_CLIENT(v))
 #define FOR_EACH_REALCLIENT(v) FOR_EACH_CLIENT(v) if(IS_REAL_CLIENT(v))
@@ -420,7 +421,7 @@ void readlevelcvars(void)
                game_starttime = time + cvar("g_start_delay");
 
        for(int i = WEP_FIRST; i <= WEP_LAST; ++i)
-               WEP_ACTION(i, WR_INIT);
+               _WEP_ACTION(i, WR_INIT);
 
        readplayerstartcvars();
 }