X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fw_electro.qc;h=bab82f16a643fc86f69ad863d9232948d899c268;hb=2c0e35d3ee9fe6652c9c56f29dbbf546da0043b0;hp=4b08dc7fa2d7860c4161fb5ff01a78911cd150ee;hpb=40eb151be5ea5fca60d5919c7053848a2c7ba248;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/w_electro.qc b/qcsrc/server/w_electro.qc index 4b08dc7fa..bab82f16a 100644 --- a/qcsrc/server/w_electro.qc +++ b/qcsrc/server/w_electro.qc @@ -1,5 +1,15 @@ #ifdef REGISTER_WEAPON -REGISTER_WEAPON(ELECTRO, w_electro, IT_CELLS, 5, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "electro", "electro", _("Electro")); +REGISTER_WEAPON( +/* WEP_##id */ ELECTRO, +/* function */ w_electro, +/* ammotype */ IT_CELLS, +/* impulse */ 5, +/* flags */ WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH, +/* rating */ BOT_PICKUP_RATING_MID, +/* model */ "electro", +/* shortname */ "electro", +/* fullname */ _("Electro") +); #else #ifdef SVQC .float electro_count; @@ -29,8 +39,8 @@ void W_Plasma_TriggerCombo(vector org, float rad, entity own) void W_Plasma_Explode (void) { if(other.takedamage == DAMAGE_AIM) - if(other.classname == "player") - if(IsDifferentTeam(self.realowner, other)) + if(IS_PLAYER(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); @@ -68,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; } } @@ -327,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; @@ -578,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 { @@ -587,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); } } }