]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/miscfunctions.qh
Offhand hook: migrate to mutator system
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / miscfunctions.qh
index 12dbe3a2c795a72512c012cf9deaba5cb1dbbfe6..0c5a2644a15d9df30ef640a20d5de7710ede1fa3 100644 (file)
@@ -3,11 +3,12 @@
 
 #include "t_items.qh"
 
-#include "mutators/base.qh"
+#include "mutators/events.qh"
 #include "mutators/gamemode_race.qh"
 
 #include "../common/constants.qh"
 #include "../common/mapinfo.qh"
+#include "../common/turrets/all.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);
@@ -75,11 +74,8 @@ vector shotorg_adjust(vector vecs, float y_is_right, float visual);
 
 float DistributeEvenly_amount;
 float DistributeEvenly_totalweight;
-var void remove(entity e);
 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);
@@ -158,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))
@@ -336,7 +336,6 @@ void readlevelcvars(void)
        sv_foginterval = cvar("sv_foginterval");
        g_cloaked = cvar("g_cloaked");
        g_footsteps = cvar("g_footsteps");
-       g_grappling_hook = cvar("g_grappling_hook");
        g_jetpack = cvar("g_jetpack");
        sv_maxidle = cvar("sv_maxidle");
        sv_maxidle_spectatorsareidle = cvar("sv_maxidle_spectatorsareidle");
@@ -421,7 +420,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();
 }