X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fw_electro.qc;h=4b08dc7fa2d7860c4161fb5ff01a78911cd150ee;hb=8003e3fa9afd59eb6331c11168125149bff96632;hp=9b1b96e56547abaf3d4bbff42c89a41bde6c781f;hpb=0978758a17b0827248c7550927ac01d736f20b08;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/w_electro.qc b/qcsrc/server/w_electro.qc index 9b1b96e56..4b08dc7fa 100644 --- a/qcsrc/server/w_electro.qc +++ b/qcsrc/server/w_electro.qc @@ -33,9 +33,9 @@ void W_Plasma_Explode (void) if(IsDifferentTeam(self.realowner, other)) if(other.deadflag == DEAD_NO) if(IsFlying(other)) - AnnounceTo(self.realowner, "electrobitch"); + Send_Notification(NOTIF_ONE, self.realowner, MSG_ANNCE, ANNCE_ACHIEVEMENT_ELECTROBITCH); - self.event_damage = SUB_Null; + self.event_damage = func_null; self.takedamage = DAMAGE_NO; if (self.movetype == MOVETYPE_BOUNCE) { @@ -54,7 +54,7 @@ void W_Plasma_Explode_Combo (void) { W_Plasma_TriggerCombo(self.origin, autocvar_g_balance_electro_combo_comboradius, self.realowner); - self.event_damage = SUB_Null; + self.event_damage = func_null; RadiusDamage (self, self.realowner, autocvar_g_balance_electro_combo_damage, autocvar_g_balance_electro_combo_edgedamage, autocvar_g_balance_electro_combo_radius, world, autocvar_g_balance_electro_combo_force, WEP_ELECTRO | HITTYPE_BOUNCE, world); // use THIS type for a combo because primary can't bounce remove (self); } @@ -140,6 +140,7 @@ void W_Electro_Attack() proj.touch = W_Plasma_TouchExplode; setsize(proj, '0 0 -3', '0 0 -3'); proj.flags = FL_PROJECTILE; + proj.missile_flags = MIF_SPLASH; CSQCProjectile(proj, TRUE, PROJECTILE_ELECTRO_BEAM, TRUE); @@ -185,6 +186,7 @@ void W_Electro_Attack2() proj.bouncefactor = autocvar_g_balance_electro_secondary_bouncefactor; proj.bouncestop = autocvar_g_balance_electro_secondary_bouncestop; + proj.missile_flags = MIF_SPLASH | MIF_ARC; #if 0 entity p2; @@ -251,7 +253,7 @@ void lgbeam_think() return; } - if (owner_player.weaponentity.state != WS_INUSE || !lgbeam_checkammo() || owner_player.deadflag != DEAD_NO || !owner_player.BUTTON_ATCK || owner_player.freezetag_frozen) + if (owner_player.weaponentity.state != WS_INUSE || !lgbeam_checkammo() || owner_player.deadflag != DEAD_NO || !owner_player.BUTTON_ATCK || owner_player.frozen) { if(self == owner_player.lgbeam) owner_player.lgbeam = world; @@ -414,6 +416,7 @@ float w_electro(float req) { if(autocvar_g_balance_electro_reload_ammo) // forced reload { + ammo_amount = 0; if(autocvar_g_balance_electro_lightning) { if(self.clip_load > 0) @@ -434,13 +437,8 @@ float w_electro(float req) { if(autocvar_g_balance_electro_lightning) if(self.BUTTON_ATCK_prev) - { - // prolong the animtime while the gun is being fired - if(self.animstate_startframe == self.anim_shoot_x && self.animstate_numframes == self.anim_shoot_y) - weapon_thinkf(WFRAME_DONTCHANGE, autocvar_g_balance_electro_primary_animtime, w_ready); - else - weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_electro_primary_animtime, w_ready); - } + weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_electro_primary_animtime, w_ready); + if (weapon_prepareattack(0, (autocvar_g_balance_electro_lightning ? 0 : autocvar_g_balance_electro_primary_refire))) { if(autocvar_g_balance_electro_lightning) @@ -545,6 +543,27 @@ float w_electro(float req) { W_Reload(min(autocvar_g_balance_electro_primary_ammo, autocvar_g_balance_electro_secondary_ammo), autocvar_g_balance_electro_reload_ammo, autocvar_g_balance_electro_reload_time, "weapons/reload.wav"); } + else if (req == WR_SUICIDEMESSAGE) + { + if(w_deathtype & HITTYPE_SECONDARY) + return WEAPON_ELECTRO_SUICIDE_ORBS; + else + return WEAPON_ELECTRO_SUICIDE_BOLT; + } + else if (req == WR_KILLMESSAGE) + { + if(w_deathtype & HITTYPE_SECONDARY) + { + return WEAPON_ELECTRO_MURDER_ORBS; + } + else + { + if(w_deathtype & HITTYPE_BOUNCE) + return WEAPON_ELECTRO_MURDER_COMBO; + else + return WEAPON_ELECTRO_MURDER_BOLT; + } + } return TRUE; } #endif @@ -583,32 +602,6 @@ float w_electro(float req) precache_sound("weapons/electro_impact.wav"); precache_sound("weapons/electro_impact_combo.wav"); } - else if (req == WR_SUICIDEMESSAGE) - { - if(w_deathtype & HITTYPE_SECONDARY) - w_deathtypestring = _("%s could not remember where they put their electro plasma"); - else - w_deathtypestring = _("%s played with electro plasma"); - } - else if (req == WR_KILLMESSAGE) - { - if(w_deathtype & HITTYPE_SECONDARY) - { - if(w_deathtype & HITTYPE_SPLASH) // unchecked: BOUNCE - w_deathtypestring = _("%s just noticed %s's electro plasma"); - else // unchecked: BOUNCE - w_deathtypestring = _("%s got in touch with %s's electro plasma"); - } - else - { - if(w_deathtype & HITTYPE_BOUNCE) // combo - w_deathtypestring = _("%s felt the electrifying air of %s's electro combo"); - else if(w_deathtype & HITTYPE_SPLASH) - w_deathtypestring = _("%s got too close to %s's blue electro bolt"); - else - w_deathtypestring = _("%s was blasted by %s's blue electro bolt"); - } - } return TRUE; } #endif