]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/w_hook.qc
Use explicit IMPLEMENTATION guard
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / w_hook.qc
index 5d52dabaebba0ccc6e15f078de7a71cbb9ce0493..d833f8d17928f2beaaffcb531d183e884f95af4a 100644 (file)
@@ -1,4 +1,4 @@
-#ifdef REGISTER_WEAPON
+#ifndef IMPLEMENTATION
 REGISTER_WEAPON(
 /* WEP_##id  */ HOOK,
 /* function  */ W_Hook,
@@ -55,7 +55,8 @@ HOOK_SETTINGS(WEP_ADD_CVAR, WEP_ADD_PROP)
 .float hook_time_hooked;
 .float hook_time_fueldecrease;
 #endif
-#else
+#endif
+#ifdef IMPLEMENTATION
 #ifdef SVQC
 
 void spawnfunc_weapon_hook(void)
@@ -108,7 +109,7 @@ void W_Hook_Explode2(void)
        self.movetype = MOVETYPE_NONE;
 }
 
-void W_Hook_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void W_Hook_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(self.health <= 0)
                return;
@@ -173,7 +174,7 @@ void W_Hook_Attack2(void)
        other = gren; MUTATOR_CALLHOOK(EditProjectile);
 }
 
-float W_Hook(float req)
+bool W_Hook(int req)
 {
        float hooked_time_max, hooked_fuel;
 
@@ -336,7 +337,7 @@ float W_Hook(float req)
 }
 #endif
 #ifdef CSQC
-float W_Hook(float req)
+bool W_Hook(int req)
 {
        switch(req)
        {