]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_hook.qc
Merge remote-tracking branch 'origin/zykure/teamscores'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_hook.qc
index c6644f1003be9867516d17c0db4f15d828af9da3..998f0723b63219731bfeee6b71880e36acb786fc 100644 (file)
@@ -1,5 +1,15 @@
 #ifdef REGISTER_WEAPON
-REGISTER_WEAPON(HOOK, w_hook, IT_CELLS|IT_FUEL, 0, WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH, 0, "hookgun", "hook", _("Grappling Hook"))
+REGISTER_WEAPON(
+/* WEP_##id  */ HOOK,
+/* function  */ w_hook,
+/* ammotype  */ IT_CELLS|IT_FUEL,
+/* impulse   */ 0,
+/* flags     */ WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH,
+/* rating    */ 0,
+/* model     */ "hookgun",
+/* shortname */ "hook",
+/* fullname  */ _("Grappling Hook")
+);
 #else
 #ifdef SVQC
 .float dmg;
@@ -265,6 +275,14 @@ float w_hook(float req)
        {
                self.hook_refire = time;
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               return FALSE;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               return WEAPON_HOOK_MURDER;
+       }
        return TRUE;
 }
 #endif
@@ -283,10 +301,6 @@ float w_hook(float req)
        {
                precache_sound("weapons/hookbomb_impact.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = _("%s did the impossible");
-       else if (req == WR_KILLMESSAGE)
-               w_deathtypestring = _("%s was caught in %s's hook gravity bomb");
        return TRUE;
 }
 #endif