#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;
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);
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;