1 void(float imp) W_SwitchWeapon;
3 void W_Laser_Touch (void)
8 if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
14 if (other == self.owner)
17 dir = normalize (self.owner.origin - self.origin);
18 org2 = findbetterlocation (self.origin, 8);
23 self.event_damage = SUB_Null;
24 RadiusDamage (self, self.owner, cvar("g_balance_laser_damage"), cvar("g_balance_laser_edgedamage"), cvar("g_balance_laser_radius"), world, cvar("g_balance_laser_force"), IT_LASER);
25 sound (self, CHAN_BODY, "weapons/laserimpact.ogg", 1, ATTN_NORM);
30 void W_Laser_Attack (void)
34 W_SetupShot (self, '15 8 -8', FALSE, 3, "weapons/lasergun_fire.ogg");
35 //te_customflash(w_shotorg, 160, 0.2, '1 0 0');
39 missile.classname = "laserbolt";
40 missile.bot_dodge = TRUE;
41 missile.bot_dodgerating = cvar("g_balance_laser_damage");
43 missile.movetype = MOVETYPE_FLY;
44 missile.solid = SOLID_BBOX;
46 setmodel (missile, "models/laser.mdl");
47 setsize (missile, '0 0 0', '0 0 0');
48 setorigin (missile, w_shotorg);
50 missile.velocity = w_shotdir * cvar("g_balance_laser_speed");
51 missile.angles = vectoangles (missile.velocity);
52 //missile.glow_color = 250; // 244, 250
53 //missile.glow_size = 120;
54 missile.touch = W_Laser_Touch;
55 missile.think = SUB_Remove;
56 missile.nextthink = time + cvar("g_balance_laser_lifetime");
58 missile.effects = EF_NOSHADOW | EF_FULLBRIGHT | EF_FULLBRIGHT | EF_LOWPRECISION;
59 missile.flags = FL_PROJECTILE;
62 float(float req) w_laser =
65 self.button0 = bot_aim(cvar("g_balance_laser_speed"), 0, cvar("g_balance_laser_lifetime"), FALSE);
66 else if (req == WR_THINK)
69 if (weapon_prepareattack(0, cvar("g_balance_laser_refire")))
72 weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_laser_animtime"), w_ready);
75 if (client_hasweapon(self, self.cnt, TRUE, FALSE))
76 W_SwitchWeapon (self.cnt);
78 else if (req == WR_SETUP)
79 weapon_setup(WEP_LASER, "laser", 0);
80 else if (req == WR_CHECKAMMO1)
82 else if (req == WR_CHECKAMMO2)