X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fserver%2Fw_nex.qc;h=919e27e5ae81b96022f65deeb5ffd6d6b9439178;hb=31bf64ba7821ebb5c0aba8a154472810074ed11e;hp=9d66f407ef8bbb401c2fd4c77f0c1fd2ae52cf42;hpb=e53a7fa61810047536f1e2b2da0a7d0bc5c8c8a0;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/w_nex.qc b/qcsrc/server/w_nex.qc index 9d66f407e..919e27e5a 100644 --- a/qcsrc/server/w_nex.qc +++ b/qcsrc/server/w_nex.qc @@ -1,5 +1,15 @@ #ifdef REGISTER_WEAPON -REGISTER_WEAPON(NEX, w_nex, IT_CELLS, 7, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN, BOT_PICKUP_RATING_HIGH, "nex", "nex", _("Nex")) +REGISTER_WEAPON( +/* WEP_##id */ NEX, +/* function */ w_nex, +/* ammotype */ IT_CELLS, +/* impulse */ 7, +/* flags */ WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN, +/* rating */ BOT_PICKUP_RATING_HIGH, +/* model */ "nex", +/* shortname */ "nex", +/* fullname */ _("Nex") +); #else #ifdef SVQC @@ -59,14 +69,14 @@ void W_Nex_Attack (float issecondary) W_SetupShot (self, TRUE, 5, "weapons/nexfire.wav", CH_WEAPON_A, mydmg); if(charge > autocvar_g_balance_nex_charge_animlimit && autocvar_g_balance_nex_charge_animlimit) // if the Nex is overcharged, we play an extra sound { - sound (self, CH_WEAPON_B, "weapons/nexcharge.wav", VOL_BASE * (charge - 0.5 * autocvar_g_balance_nex_charge_animlimit) / (1 - 0.5 * autocvar_g_balance_nex_charge_animlimit), ATTN_NORM); + sound (self, CH_WEAPON_B, "weapons/nexcharge.wav", VOL_BASE * (charge - 0.5 * autocvar_g_balance_nex_charge_animlimit) / (1 - 0.5 * autocvar_g_balance_nex_charge_animlimit), ATTEN_NORM); } yoda = 0; FireRailgunBullet (w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, WEP_NEX); if(yoda && flying) - AnnounceTo(self, "yoda"); + Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA); //beam and muzzle flash done on client SendCSQCNexBeamParticle(charge); @@ -146,7 +156,7 @@ float w_nex(float req) if(self.BUTTON_ATCK2) // only eat ammo when the button is pressed { dt = min(dt, (1 - self.nex_charge) / autocvar_g_balance_nex_secondary_charge_rate); - if not(self.items & IT_UNLIMITED_WEAPON_AMMO) + if (!(self.items & IT_UNLIMITED_WEAPON_AMMO)) { // if this weapon is reloadable, decrease its load. Else decrease the player's ammo if(autocvar_g_balance_nex_reload_ammo) @@ -221,7 +231,7 @@ float w_nex(float req) { // don't allow charging if we don't have enough ammo ammo_amount = self.ammo_cells >= autocvar_g_balance_nex_secondary_ammo; - ammo_amount += self.(weapon_load[WEP_NEX]) >= autocvar_g_balance_nex_secondary_ammo; + ammo_amount += self.(weapon_load[WEP_NEX]) >= autocvar_g_balance_nex_secondary_ammo; return ammo_amount; } else @@ -253,7 +263,7 @@ float w_nex(float req) org2 = w_org + w_backoff * 6; pointparticles(particleeffectnum("nex_impact"), org2, '0 0 0', 1); if(!w_issilent) - sound(self, CH_SHOTS, "weapons/neximpact.wav", VOL_BASE, ATTN_NORM); + sound(self, CH_SHOTS, "weapons/neximpact.wav", VOL_BASE, ATTEN_NORM); } else if(req == WR_PRECACHE) {