X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fw_electro.qc;h=ea2cf8bf0560dfee7a879789377231dc82e8cd0f;hb=f6de28b8f7cc072475da92808b0a2223c112d291;hp=6634d3ae107a76546cb977a509a24531c92af94b;hpb=9d9cf783d3ac428fbbe95553c8f5c7e113d888bb;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/w_electro.qc b/qcsrc/server/w_electro.qc index 6634d3ae1..ea2cf8bf0 100644 --- a/qcsrc/server/w_electro.qc +++ b/qcsrc/server/w_electro.qc @@ -40,7 +40,7 @@ void W_Plasma_Explode (void) { if(other.takedamage == DAMAGE_AIM) if(IS_PLAYER(other)) - if(IsDifferentTeam(self.realowner, other)) + if(DIFF_TEAM(self.realowner, other)) if(other.deadflag == DEAD_NO) if(IsFlying(other)) Send_Notification(NOTIF_ONE, self.realowner, MSG_ANNCE, ANNCE_ACHIEVEMENT_ELECTROBITCH); @@ -49,12 +49,12 @@ void W_Plasma_Explode (void) self.takedamage = DAMAGE_NO; if (self.movetype == MOVETYPE_BOUNCE) { - RadiusDamage (self, self.realowner, autocvar_g_balance_electro_secondary_damage, autocvar_g_balance_electro_secondary_edgedamage, autocvar_g_balance_electro_secondary_radius, world, world, autocvar_g_balance_electro_secondary_force, self.projectiledeathtype, other); + RadiusDamage (self, self.realowner, autocvar_g_balance_electro_secondary_damage, autocvar_g_balance_electro_secondary_edgedamage, autocvar_g_balance_electro_secondary_radius, world, autocvar_g_balance_electro_secondary_force, self.projectiledeathtype, other); } else { W_Plasma_TriggerCombo(self.origin, autocvar_g_balance_electro_primary_comboradius, self.realowner); - RadiusDamage (self, self.realowner, autocvar_g_balance_electro_primary_damage, autocvar_g_balance_electro_primary_edgedamage, autocvar_g_balance_electro_primary_radius, world, world, autocvar_g_balance_electro_primary_force, self.projectiledeathtype, other); + RadiusDamage (self, self.realowner, autocvar_g_balance_electro_primary_damage, autocvar_g_balance_electro_primary_edgedamage, autocvar_g_balance_electro_primary_radius, world, autocvar_g_balance_electro_primary_force, self.projectiledeathtype, other); } remove (self); @@ -65,8 +65,7 @@ void W_Plasma_Explode_Combo (void) W_Plasma_TriggerCombo(self.origin, autocvar_g_balance_electro_combo_comboradius, self.realowner); 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, world, autocvar_g_balance_electro_combo_force, WEP_ELECTRO | HITTYPE_BOUNCE, world); // use THIS type for a combo because primary can't bounce - + 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); } @@ -79,7 +78,7 @@ void W_Plasma_Touch (void) W_Plasma_Explode (); } else { //UpdateCSQCProjectile(self); - spamsound (self, CH_SHOTS, "weapons/electro_bounce.wav", VOL_BASE, ATTN_NORM); + spamsound (self, CH_SHOTS, "weapons/electro_bounce.wav", VOL_BASE, ATTEN_NORM); self.projectiledeathtype |= HITTYPE_BOUNCE; } } @@ -97,10 +96,10 @@ void W_Plasma_Damage (entity inflictor, entity attacker, float damage, float dea // note: combos are usually triggered by W_Plasma_TriggerCombo, not damage float is_combo = (inflictor.classname == "plasma_chain" || inflictor.classname == "plasma_prim"); - + if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, (is_combo ? 1 : -1))) - return; // g_projectiles_damage says to halt - + return; // g_projectiles_damage says to halt + self.health = self.health - damage; if (self.health <= 0) { @@ -264,7 +263,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; @@ -280,7 +279,7 @@ void lgbeam_think() dt = frametime; // if this weapon is reloadable, decrease its load. Else decrease the player's ammo - if not(owner_player.items & IT_UNLIMITED_WEAPON_AMMO) + if (!(owner_player.items & IT_UNLIMITED_WEAPON_AMMO)) { if(autocvar_g_balance_electro_primary_ammo) { @@ -338,7 +337,7 @@ void W_Electro_Attack3 (void) { // only play fire sound if 0.5 sec has passed since player let go the fire button if(time - self.prevlgfire > 0.5) - sound (self, CH_WEAPON_A, "weapons/lgbeam_fire.wav", VOL_BASE, ATTN_NORM); + sound (self, CH_WEAPON_A, "weapons/lgbeam_fire.wav", VOL_BASE, ATTEN_NORM); entity beam, oldself; @@ -589,7 +588,7 @@ float w_electro(float req) { pointparticles(particleeffectnum("electro_ballexplode"), org2, '0 0 0', 1); if(!w_issilent) - sound(self, CH_SHOTS, "weapons/electro_impact.wav", VOL_BASE, ATTN_NORM); + sound(self, CH_SHOTS, "weapons/electro_impact.wav", VOL_BASE, ATTEN_NORM); } else { @@ -598,13 +597,13 @@ float w_electro(float req) // this is sent as "primary (w_deathtype & HITTYPE_BOUNCE)" to distinguish it from (w_deathtype & HITTYPE_SECONDARY) bounced balls pointparticles(particleeffectnum("electro_combo"), org2, '0 0 0', 1); if(!w_issilent) - sound(self, CH_SHOTS, "weapons/electro_impact_combo.wav", VOL_BASE, ATTN_NORM); + sound(self, CH_SHOTS, "weapons/electro_impact_combo.wav", VOL_BASE, ATTEN_NORM); } else { pointparticles(particleeffectnum("electro_impact"), org2, '0 0 0', 1); if(!w_issilent) - sound(self, CH_SHOTS, "weapons/electro_impact.wav", VOL_BASE, ATTN_NORM); + sound(self, CH_SHOTS, "weapons/electro_impact.wav", VOL_BASE, ATTEN_NORM); } } }