X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fw_hagar.qc;h=d5b2592e2ed34fe1ea9f8e003fc04764ccc8e649;hb=da1e17b0c055f095795b17f4784e175f5f0e2d23;hp=638e18bcc261f5f718de326eb40647d3640f8e6a;hpb=e47fe4a1e465ca76d53c6756973896fd57bc4f82;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/w_hagar.qc b/qcsrc/server/w_hagar.qc index 638e18bcc..d5b2592e2 100644 --- a/qcsrc/server/w_hagar.qc +++ b/qcsrc/server/w_hagar.qc @@ -1,6 +1,7 @@ #ifdef REGISTER_WEAPON REGISTER_WEAPON(HAGAR, w_hagar, IT_ROCKETS, 8, WEP_FLAG_NORMAL | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "hagar", "hagar", "Hagar"); #else +#ifdef SVQC // NO bounce protection, as bounces are limited! void W_Hagar_Explode (void) { @@ -45,7 +46,7 @@ void W_Hagar_Attack (void) if not(self.items & IT_UNLIMITED_WEAPON_AMMO) self.ammo_rockets = self.ammo_rockets - cvar("g_balance_hagar_primary_ammo"); - W_SetupShot (self, FALSE, 2, "weapons/hagar_fire.wav", cvar("g_balance_hagar_primary_damage")); + W_SetupShot (self, FALSE, 2, "weapons/hagar_fire.wav", CHAN_WEAPON, cvar("g_balance_hagar_primary_damage")); pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); @@ -70,6 +71,8 @@ void W_Hagar_Attack (void) missile.flags = FL_PROJECTILE; CSQCProjectile(missile, TRUE, PROJECTILE_HAGAR, TRUE); + + other = missile; MUTATOR_CALLHOOK(EditProjectile); } void W_Hagar_Attack2 (void) @@ -78,8 +81,7 @@ void W_Hagar_Attack2 (void) if not(self.items & IT_UNLIMITED_WEAPON_AMMO) self.ammo_rockets = self.ammo_rockets - cvar("g_balance_hagar_secondary_ammo"); - W_SetupShot (self, FALSE, 2, "weapons/hagar_fire.wav", cvar("g_balance_hagar_secondary_damage")); - //W_SetupShot (self, FALSE, 2, "weapons/hagar_fire.wav"); // TODO: move model a little to the right + W_SetupShot (self, FALSE, 2, "weapons/hagar_fire.wav", CHAN_WEAPON, cvar("g_balance_hagar_secondary_damage")); pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); @@ -105,6 +107,8 @@ void W_Hagar_Attack2 (void) missile.flags = FL_PROJECTILE; CSQCProjectile(missile, TRUE, PROJECTILE_HAGAR_BOUNCING, TRUE); + + other = missile; MUTATOR_CALLHOOK(EditProjectile); } void spawnfunc_weapon_hagar (void) @@ -150,15 +154,43 @@ float w_hagar(float req) return self.ammo_rockets >= cvar("g_balance_hagar_primary_ammo"); else if (req == WR_CHECKAMMO2) return self.ammo_rockets >= cvar("g_balance_hagar_secondary_ammo"); + return TRUE; +}; +#endif +#ifdef CSQC +float w_hagar(float req) +{ + if(req == WR_IMPACTEFFECT) + { + vector org2; + org2 = w_org + w_backoff * 6; + pointparticles(particleeffectnum("hagar_explode"), org2, '0 0 0', 1); + if(!w_issilent) + { + if (w_random<0.15) + sound(self, CHAN_PROJECTILE, "weapons/hagexp1.wav", VOL_BASE, ATTN_NORM); + else if (w_random<0.7) + sound(self, CHAN_PROJECTILE, "weapons/hagexp2.wav", VOL_BASE, ATTN_NORM); + else + sound(self, CHAN_PROJECTILE, "weapons/hagexp3.wav", VOL_BASE, ATTN_NORM); + } + } + else if(req == WR_PRECACHE) + { + precache_sound("weapons/hagexp1.wav"); + precache_sound("weapons/hagexp2.wav"); + precache_sound("weapons/hagexp3.wav"); + } else if (req == WR_SUICIDEMESSAGE) - w_deathtypestring = "played with tiny rockets"; + w_deathtypestring = "%s played with tiny rockets"; else if (req == WR_KILLMESSAGE) { if(w_deathtype & HITTYPE_BOUNCE) // must be secondary; unchecked: SPLASH - w_deathtypestring = "hoped #'s missiles wouldn't bounce"; + w_deathtypestring = "%s hoped %s's missiles wouldn't bounce"; else // unchecked: SPLASH, SECONDARY - w_deathtypestring = "was pummeled by"; + w_deathtypestring = "%s was pummeled by %s"; } return TRUE; -}; +} +#endif #endif