]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_hook.qc
Merge branch 'master' into Mario/vehicles
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_hook.qc
index b5cb030d077b21c5b8a39ec8f0f5121d8f3f6032..1d7de64997c857de448490e82083d196e9e18990 100644 (file)
@@ -1,21 +1,20 @@
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
-       #include "../dpdefs/progsdefs.qh"
-    #include "../dpdefs/dpextensions.qh"
-    #include "../warpzonelib/common.qh"
-    #include "../warpzonelib/server.qh"
-    #include "../common/constants.qh"
-    #include "../common/util.qh"
-    #include "../common/weapons/weapons.qh"
-    #include "autocvars.qh"
-    #include "constants.qh"
-    #include "defs.qh"
-    #include "../common/vehicles/sv_vehicles.qh"
-    #include "command/common.qh"
-    #include "g_hook.qh"
-    #include "round_handler.qh"
-#endif
+#include "g_hook.qh"
+#include "_all.qh"
+
+#include "weapons/common.qh"
+#include "weapons/weaponsystem.qh"
+#include "weapons/selection.qh"
+#include "weapons/tracing.qh"
+#include "cl_player.qh"
+#include "t_teleporters.qh"
+#include "command/common.qh"
+#include "round_handler.qh"
+#include "../common/vehicles/sv_vehicles.qh"
+#include "../common/constants.qh"
+#include "../common/util.qh"
+#include "../common/weapons/all.qh"
+#include "../warpzonelib/common.qh"
+#include "../warpzonelib/server.qh"
 
 /*============================================
 
@@ -105,7 +104,7 @@ void GrapplingHook_Stop()
 }
 
 .vector hook_start, hook_end;
-float GrapplingHookSend(entity to, float sf)
+float GrapplingHookSend(entity to, int sf)
 {
        WriteByte(MSG_ENTITY, ENT_CLIENT_HOOK);
        sf = sf & 0x7F;
@@ -133,7 +132,7 @@ float GrapplingHookSend(entity to, float sf)
 
 void GrapplingHookThink()
 {
-       float spd, dist, minlength, pullspeed, ropestretch, ropeairfriction, rubberforce, newlength, rubberforce_overstretch, s;
+       float spd, dist, minlength, pullspeed, ropestretch, ropeairfriction, rubberforce, newlength, rubberforce_overstretch;
        vector dir, org, end, v0, dv, v, myorg, vs;
        if(self.realowner.hook != self) // how did that happen?
        {
@@ -150,7 +149,7 @@ void GrapplingHookThink()
 
        self.nextthink = time;
 
-       s = self.realowner.cvar_cl_gunalign;
+       int s = self.realowner.cvar_cl_gunalign;
        if(s != 1 && s != 2 && s != 4)
                s = 3; // default value
        --s;
@@ -289,7 +288,7 @@ void GrapplingHookTouch (void)
        //self.realowner.disableclientprediction = true;
 }
 
-void GrapplingHook_Damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void GrapplingHook_Damage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(self.health <= 0)
                return;
@@ -315,7 +314,6 @@ void FireGrapplingHook (void)
 {
        entity missile;
        vector org;
-       float s;
        vector vs;
 
        if(forbidWeaponUse(self)) return;
@@ -323,7 +321,7 @@ void FireGrapplingHook (void)
 
        makevectors(self.v_angle);
 
-       s = self.cvar_cl_gunalign;
+       int s = self.cvar_cl_gunalign;
        if(s != 1 && s != 2 && s != 4)
                s = 3; // default value
        --s;