X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fw_laser.qc;h=0a0704638c63aeebf2171f70cfaa2ae75f09f79b;hb=29b8ca3d2b3f1417baaa2c830f628cc0b9ee0022;hp=69dcb17aa5c292d4328b539668c8dac674f76935;hpb=94579b4c440f739c1203ea5e546d3fcadb884c51;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/w_laser.qc b/qcsrc/server/w_laser.qc index 69dcb17aa..0a0704638 100644 --- a/qcsrc/server/w_laser.qc +++ b/qcsrc/server/w_laser.qc @@ -1,5 +1,15 @@ #ifdef REGISTER_WEAPON -REGISTER_WEAPON(LASER, w_laser, 0, 1, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH, 0, "laser", "laser", _("Laser")) +REGISTER_WEAPON( +/* WEP_##id */ LASER, +/* function */ w_laser, +/* ammotype */ 0, +/* impulse */ 1, +/* flags */ WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH, +/* rating */ 0, +/* model */ "laser", +/* shortname */ "laser", +/* fullname */ _("Laser") +); #else #ifdef SVQC void(float imp) W_SwitchWeapon; @@ -34,19 +44,11 @@ void W_Laser_Attack (float issecondary) entity missile; vector s_forward; float a; - float nodamage; - - if(issecondary == 2) // minstanex shot - nodamage = g_minstagib; - else - nodamage = FALSE; a = autocvar_g_balance_laser_primary_shotangle; s_forward = v_forward * cos(a * DEG2RAD) + v_up * sin(a * DEG2RAD); - if(nodamage) - W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", CH_WEAPON_B, 0); - else if(issecondary == 1) + if(issecondary == 1) W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", CH_WEAPON_B, autocvar_g_balance_laser_secondary_damage); else W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", CH_WEAPON_B, autocvar_g_balance_laser_primary_damage); @@ -56,11 +58,8 @@ void W_Laser_Attack (float issecondary) missile.owner = missile.realowner = self; missile.classname = "laserbolt"; missile.dmg = 0; - if(!nodamage) - { - missile.bot_dodge = TRUE; - missile.bot_dodgerating = autocvar_g_balance_laser_primary_damage; - } + missile.bot_dodge = TRUE; + missile.bot_dodgerating = autocvar_g_balance_laser_primary_damage; PROJECTILE_MAKETRIGGER(missile); missile.projectiledeathtype = WEP_LASER; @@ -75,7 +74,7 @@ void W_Laser_Attack (float issecondary) missile.touch = W_Laser_Touch; missile.flags = FL_PROJECTILE; - missile.missile_flags = MIF_SPLASH; + missile.missile_flags = MIF_SPLASH; missile.think = W_Laser_Think; missile.nextthink = time + autocvar_g_balance_laser_primary_delay; @@ -179,7 +178,7 @@ void W_Laser_Attack2 () // only play fire sound if 0.5 sec has passed since player let go the fire button if(time - self.prevgauntletfire > 0.5) { - sound (self, CH_WEAPON_A, "weapons/gauntlet_fire.wav", VOL_BASE, ATTN_NORM); + sound (self, CH_WEAPON_A, "weapons/gauntlet_fire.wav", VOL_BASE, ATTEN_NORM); } entity beam, oldself; @@ -311,7 +310,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, "weapons/laserimpact.wav", VOL_BASE, ATTN_NORM); + sound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTEN_NORM); } else if(req == WR_PRECACHE) {