X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fw_fireball.qc;h=278099c633877a2e056bc2fcbd9a72d20d773af9;hb=b0259aa7cd71ac09094e96c4986318ae476f3180;hp=d5c0b13f950fcc72542db32c4cd6a11c917ba122;hpb=83b0c96edec0a188371873bb83b15d024568bca3;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/w_fireball.qc b/qcsrc/server/w_fireball.qc index d5c0b13f9..278099c63 100644 --- a/qcsrc/server/w_fireball.qc +++ b/qcsrc/server/w_fireball.qc @@ -351,6 +351,36 @@ float w_fireball(float req) return self.ammo_fuel >= cvar("g_balance_fireball_primary_ammo"); else if (req == WR_CHECKAMMO2) return self.ammo_fuel >= cvar("g_balance_fireball_secondary_ammo"); + else if (req == WR_RESETPLAYER) + { + self.fireball_primarytime = time; + } + return TRUE; +}; +#endif +#ifdef CSQC +float w_fireball(float req) +{ + if(req == WR_IMPACTEFFECT) + { + vector org2; + if(w_deathtype & HITTYPE_SECONDARY) + { + // firemine goes out silently + } + else + { + org2 = w_org + w_backoff * 16; + pointparticles(particleeffectnum("fireball_explode"), org2, '0 0 0', 1); + if(!w_issilent) + sound(self, CHAN_PROJECTILE, "weapons/fireball_impact2.wav", VOL_BASE, ATTN_NORM * 0.25); // long range boom + } + } + else if(req == WR_PRECACHE) + { + precache_sound("weapons/fireball_impact.wav"); + precache_sound("weapons/fireball_impact2.wav"); + } else if (req == WR_SUICIDEMESSAGE) { if(w_deathtype & HITTYPE_SECONDARY) @@ -386,36 +416,6 @@ float w_fireball(float req) w_deathtypestring = "tasted #'s fireball"; } } - else if (req == WR_RESETPLAYER) - { - self.fireball_primarytime = time; - } - return TRUE; -}; -#endif -#ifdef CSQC -float w_fireball(float req) -{ - if(req == WR_IMPACTEFFECT) - { - vector org2; - if(w_deathtype & HITTYPE_SECONDARY) - { - // firemine goes out silently - } - else - { - org2 = w_org + w_backoff * 16; - pointparticles(particleeffectnum("fireball_explode"), org2, '0 0 0', 1); - if(!w_issilent) - sound(self, CHAN_PROJECTILE, "weapons/fireball_impact2.wav", VOL_BASE, ATTN_NORM * 0.25); // long range boom - } - } - else if(req == WR_PRECACHE) - { - precache_sound("weapons/fireball_impact.wav"); - precache_sound("weapons/fireball_impact2.wav"); - } return TRUE; } #endif