X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fw_seeker.qc;h=ba580e702ee5e6348c1e1c9ec9c227dcfbbd53d6;hb=bfd3892eeb1401e14fc7da982f8b33d77d91384a;hp=7cf6cfb73634e11be73aba7215de897f8ee7b715;hpb=4c6a45316a6527f5a5bca791e8d0e29628b712cf;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/w_seeker.qc b/qcsrc/server/w_seeker.qc index 7cf6cfb73..ba580e702 100644 --- a/qcsrc/server/w_seeker.qc +++ b/qcsrc/server/w_seeker.qc @@ -1,5 +1,15 @@ #ifdef REGISTER_WEAPON -REGISTER_WEAPON(SEEKER, w_seeker, IT_ROCKETS, 8, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "seeker", "seeker", _("T.A.G. Seeker")) +REGISTER_WEAPON( +/* WEP_##id */ SEEKER, +/* function */ w_seeker, +/* ammotype */ IT_ROCKETS, +/* impulse */ 8, +/* flags */ WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH, +/* rating */ BOT_PICKUP_RATING_MID, +/* model */ "seeker", +/* shortname */ "seeker", +/* fullname */ _("T.A.G. Seeker") +); #else #ifdef SVQC //.float proxytime; = autoswitch @@ -12,7 +22,7 @@ REGISTER_WEAPON(SEEKER, w_seeker, IT_ROCKETS, 8, WEP_FLAG_MUTATORBLOCKED | WEP_F // ============================ void Seeker_Missile_Explode () { - self.event_damage = SUB_Null; + self.event_damage = func_null; RadiusDamage (self, self.realowner, autocvar_g_balance_seeker_missile_damage, autocvar_g_balance_seeker_missile_edgedamage, autocvar_g_balance_seeker_missile_radius, world, autocvar_g_balance_seeker_missile_force, self.projectiledeathtype, other); remove (self); @@ -223,7 +233,7 @@ void Seeker_Fire_Missile(vector f_diff, entity m_target) // ============================ void Seeker_Flac_Explode () { - self.event_damage = SUB_Null; + self.event_damage = func_null; RadiusDamage (self, self.realowner, autocvar_g_balance_seeker_flac_damage, autocvar_g_balance_seeker_flac_edgedamage, autocvar_g_balance_seeker_flac_radius, world, autocvar_g_balance_seeker_flac_force, self.projectiledeathtype, other); @@ -426,8 +436,8 @@ void Seeker_Tag_Touch() te_knightspike(org2); - self.event_damage = SUB_Null; - Damage_DamageInfo(self.origin, 0, 0, 0, self.velocity, WEP_SEEKER | HITTYPE_HEADSHOT, other.species, self); + self.event_damage = func_null; + Damage_DamageInfo(self.origin, 0, 0, 0, self.velocity, WEP_SEEKER | HITTYPE_BOUNCE | HITTYPE_SECONDARY, other.species, self); if (other.takedamage == DAMAGE_AIM && other.deadflag == DEAD_NO) { @@ -495,8 +505,8 @@ void Seeker_Fire_Tag() missile.solid = SOLID_BBOX; missile.takedamage = DAMAGE_YES; - missile.event_damage = Seeker_Tag_Explode; - missile.health = autocvar_g_balance_seeker_tag_health; + missile.event_damage = Seeker_Tag_Damage; + missile.health = autocvar_g_balance_seeker_tag_health; missile.damageforcescale = autocvar_g_balance_seeker_tag_damageforcescale; setorigin (missile, w_shotorg); @@ -598,20 +608,49 @@ float w_seeker(float req) } else if (req == WR_CHECKAMMO1) { - ammo_amount = self.ammo_rockets >= autocvar_g_balance_seeker_missile_ammo; - ammo_amount += self.(weapon_load[WEP_SEEKER]) >= autocvar_g_balance_seeker_missile_ammo; + if (autocvar_g_balance_seeker_type == 1) + { + ammo_amount = self.ammo_rockets >= autocvar_g_balance_seeker_missile_ammo; + ammo_amount += self.(weapon_load[WEP_SEEKER]) >= autocvar_g_balance_seeker_missile_ammo; + } + else + { + ammo_amount = self.ammo_rockets >= autocvar_g_balance_seeker_tag_ammo; + ammo_amount += self.(weapon_load[WEP_SEEKER]) >= autocvar_g_balance_seeker_tag_ammo; + } + return ammo_amount; } else if (req == WR_CHECKAMMO2) { - ammo_amount = self.ammo_rockets >= autocvar_g_balance_seeker_tag_ammo; - ammo_amount += self.(weapon_load[WEP_SEEKER]) >= autocvar_g_balance_seeker_tag_ammo; + if (autocvar_g_balance_seeker_type == 1) + { + ammo_amount = self.ammo_rockets >= autocvar_g_balance_seeker_tag_ammo; + ammo_amount += self.(weapon_load[WEP_SEEKER]) >= autocvar_g_balance_seeker_tag_ammo; + } + else + { + ammo_amount = self.ammo_rockets >= autocvar_g_balance_seeker_flac_ammo; + ammo_amount += self.(weapon_load[WEP_SEEKER]) >= autocvar_g_balance_seeker_flac_ammo; + } + return ammo_amount; } else if (req == WR_RELOAD) { W_Reload(min(autocvar_g_balance_seeker_missile_ammo, autocvar_g_balance_seeker_tag_ammo), autocvar_g_balance_seeker_reload_ammo, autocvar_g_balance_seeker_reload_time, "weapons/reload.wav"); } + else if (req == WR_SUICIDEMESSAGE) + { + return WEAPON_SEEKER_SUICIDE; + } + else if (req == WR_KILLMESSAGE) + { + if(w_deathtype & HITTYPE_SECONDARY) + return WEAPON_SEEKER_MURDER_TAG; + else + return WEAPON_SEEKER_MURDER_SPRAY; + } return TRUE; } #endif @@ -624,21 +663,24 @@ float w_seeker(float req) org2 = w_org + w_backoff * 6; if(w_deathtype & HITTYPE_BOUNCE) { - pointparticles(particleeffectnum("hagar_explode"), org2, '0 0 0', 1); - if(!w_issilent) + if(w_deathtype & HITTYPE_SECONDARY) { - if (w_random<0.15) - sound(self, CH_SHOTS, "weapons/tagexp1.wav", 1, ATTN_NORM); - else if (w_random<0.7) - sound(self, CH_SHOTS, "weapons/tagexp2.wav", 1, ATTN_NORM); - else - sound(self, CH_SHOTS, "weapons/tagexp3.wav", 1, ATTN_NORM); + if(!w_issilent) + sound(self, CH_SHOTS, "weapons/tag_impact.wav", 1, ATTEN_NORM); + } + else + { + pointparticles(particleeffectnum("hagar_explode"), org2, '0 0 0', 1); + if(!w_issilent) + { + if (w_random<0.15) + sound(self, CH_SHOTS, "weapons/tagexp1.wav", 1, ATTEN_NORM); + else if (w_random<0.7) + sound(self, CH_SHOTS, "weapons/tagexp2.wav", 1, ATTEN_NORM); + else + sound(self, CH_SHOTS, "weapons/tagexp3.wav", 1, ATTEN_NORM); + } } - } - else if(w_deathtype & HITTYPE_HEADSHOT) - { - if(!w_issilent) - sound(self, CH_SHOTS, "weapons/tag_impact.wav", 1, ATTN_NORM); } else { @@ -646,11 +688,11 @@ float w_seeker(float req) if(!w_issilent) { if (w_random<0.15) - sound(self, CH_SHOTS, "weapons/seekerexp1.wav", 1, ATTN_NORM); + sound(self, CH_SHOTS, "weapons/seekerexp1.wav", 1, ATTEN_NORM); else if (w_random<0.7) - sound(self, CH_SHOTS, "weapons/seekerexp2.wav", 1, ATTN_NORM); + sound(self, CH_SHOTS, "weapons/seekerexp2.wav", 1, ATTEN_NORM); else - sound(self, CH_SHOTS, "weapons/seekerexp3.wav", 1, ATTN_NORM); + sound(self, CH_SHOTS, "weapons/seekerexp3.wav", 1, ATTEN_NORM); } } } @@ -664,15 +706,6 @@ float w_seeker(float req) precache_sound("weapons/tagexp3.wav"); precache_sound("weapons/tag_impact.wav"); } - else if (req == WR_SUICIDEMESSAGE) - w_deathtypestring = _("%s played with tiny seeker rockets"); - else if (req == WR_KILLMESSAGE) - { - if(w_deathtype & HITTYPE_SECONDARY) - w_deathtypestring = _("%s was tagged with a seeker by %s"); - else - w_deathtypestring = _("%s was pummeled with seeker rockets by %s"); - } return TRUE; } #endif