X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fw_hook.qc;h=334e434c8afa9526774aab288d2ad2dfcbfa6dd5;hb=27e3e9aee11d5ae177233a8f79ddb494cf00fe95;hp=7b4eba094df0d558318942fbb8879947102f6097;hpb=e47fe4a1e465ca76d53c6756973896fd57bc4f82;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/w_hook.qc b/qcsrc/server/w_hook.qc index 7b4eba094..334e434c8 100644 --- a/qcsrc/server/w_hook.qc +++ b/qcsrc/server/w_hook.qc @@ -1,6 +1,7 @@ #ifdef REGISTER_WEAPON REGISTER_WEAPON(HOOK, w_hook, IT_CELLS|IT_FUEL, 0, WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH, 0, "hookgun", "hook", "Grappling Hook"); #else +#ifdef SVQC .float dmg; .float dmg_edge; .float dmg_radius; @@ -92,6 +93,8 @@ void W_Hook_Attack2() gren.flags = FL_PROJECTILE; CSQCProjectile(gren, TRUE, PROJECTILE_HOOKBOMB, TRUE); + + other = gren; MUTATOR_CALLHOOK(EditProjectile); } void spawnfunc_weapon_hook (void) @@ -238,10 +241,6 @@ float w_hook(float req) { return self.ammo_cells >= cvar("g_balance_hook_secondary_ammo"); } - else if (req == WR_SUICIDEMESSAGE) - w_deathtypestring = "did the impossible"; - else if (req == WR_KILLMESSAGE) - w_deathtypestring = "has run into #'s gravity bomb"; else if (req == WR_RESETPLAYER) { self.hook_refire = time; @@ -249,3 +248,26 @@ float w_hook(float req) return TRUE; }; #endif +#ifdef CSQC +float w_hook(float req) +{ + if(req == WR_IMPACTEFFECT) + { + vector org2; + org2 = w_org + w_backoff * 2; + pointparticles(particleeffectnum("hookbomb_explode"), org2, '0 0 0', 1); + if(!w_issilent) + sound(self, CHAN_PROJECTILE, "weapons/hookbomb_impact.wav", VOL_BASE, ATTN_NORM); + } + else if(req == WR_PRECACHE) + { + 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 has run into %s's gravity bomb"; + return TRUE; +} +#endif +#endif