X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fw_laser.qc;h=3da9e422b5c377799d9556013c41a2b2d3dfaaa8;hb=339a61a69ee23557d28102aab85c2b0cda376e3f;hp=83eb4ed0b1f2a1adf0c10321b2e9b1e6ffcaf2d3;hpb=42b501c5da481b2598db9bfc1b93b06fede3657a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/w_laser.qc b/qcsrc/server/w_laser.qc index 83eb4ed0b..3da9e422b 100644 --- a/qcsrc/server/w_laser.qc +++ b/qcsrc/server/w_laser.qc @@ -3,6 +3,7 @@ REGISTER_WEAPON(LASER, w_laser, 0, 1, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WE #else #ifdef SVQC void(float imp) W_SwitchWeapon; +void() W_LastWeapon; void W_Laser_Touch (void) { @@ -30,7 +31,7 @@ void W_Laser_Think() void W_Laser_Attack (float issecondary) { - local entity missile; + entity missile; vector s_forward; float a; float nodamage; @@ -214,8 +215,8 @@ void spawnfunc_weapon_laser (void) float w_laser(float req) { - local float r1; - local float r2; + float r1; + float r2; if (req == WR_AIM) { if(autocvar_g_balance_laser_secondary) @@ -259,7 +260,7 @@ float w_laser(float req) else { if(self.switchweapon == WEP_LASER) // don't do this if already switching - W_SwitchWeapon (self.cnt); + W_LastWeapon(); } } } @@ -290,7 +291,7 @@ float w_laser(float req) W_Reload(0, autocvar_g_balance_laser_reload_ammo, autocvar_g_balance_laser_reload_time, "weapons/reload.wav"); } return TRUE; -}; +} #endif #ifdef CSQC float w_laser(float req) @@ -301,7 +302,7 @@ float w_laser(float req) org2 = w_org + w_backoff * 6; pointparticles(particleeffectnum("laser_impact"), org2, w_backoff * 1000, 1); if(!w_issilent) - sound(self, CH_SHOTS_SINGLE, "weapons/laserimpact.wav", VOL_BASE, ATTN_NORM); + sound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTN_NORM); } else if(req == WR_PRECACHE) {