1 void() crylink_ready_01;
2 void() crylink_fire1_01;
3 void() crylink_deselect_01;
4 void() crylink_select_01;
8 float() crylink_check =
10 if (self.ammo_cells >= 1)
15 void(float req) w_crylink =
19 else if (req == WR_FIRE1 || req == WR_FIRE2)
20 weapon_prepareattack(crylink_check, crylink_check, crylink_fire1_01, cvar("g_balance_crylink_refire"));
21 else if (req == WR_RAISE)
23 else if (req == WR_UPDATECOUNTS)
24 self.currentammo = self.ammo_cells;
25 else if (req == WR_DROP)
26 crylink_deselect_01();
27 else if (req == WR_SETUP)
28 weapon_setup(WEP_CRYLINK, "w_crylink.zym", IT_CELLS);
29 else if (req == WR_CHECKAMMO)
30 weapon_hasammo = crylink_check();
34 void W_Crylink_Touch (void)
36 self.event_damage = SUB_Null;
37 //te_smallflash(self.origin);
38 RadiusDamage (self, self.owner, cvar("g_balance_crylink_damage"), cvar("g_balance_crylink_edgedamage"), cvar("g_balance_crylink_radius"), world, cvar("g_balance_crylink_force"), IT_CRYLINK);
39 self.touch = SUB_Null;
40 setmodel (self, "models/plasma.mdl");
41 setsize (self, '0 0 0', '0 0 0');
45 self.think = SUB_Remove;
46 //self.movetype = MOVETYPE_NONE;
47 self.effects = EF_LOWPRECISION;
48 SUB_SetFade(self, time);
52 void W_Crylink_Attack (void)
58 sound (self, CHAN_WEAPON, "weapons/crylink.wav", 1, ATTN_NORM);
59 self.ammo_cells = self.ammo_cells - 1;
60 self.punchangle_x = -2;
61 org = self.origin + self.view_ofs + v_forward * 10 + v_right * 5 + v_up * -14;
68 proj.classname = "spike";
70 proj.movetype = MOVETYPE_BOUNCE;
71 proj.solid = SOLID_BBOX;
74 setmodel (proj, "models/plasmatrail.mdl");
75 setsize (proj, '0 0 0', '0 0 0');
76 setorigin (proj, org);
79 proj.velocity = (v_forward + (counter / 2 - 1) * v_right * cvar("g_balance_crylink_spread")) * cvar("g_balance_crylink_speed");
81 proj.velocity = (v_forward + (counter / 5) * randomvec() * cvar("g_balance_crylink_spread")) * cvar("g_balance_crylink_speed");
82 proj.touch = W_Crylink_Touch;
83 proj.think = SUB_Remove;
84 proj.nextthink = time + 9;
86 proj.angles = vectoangles (proj.velocity);
88 //proj.glow_size = 20;
90 proj.effects = proj.effects | EF_FULLBRIGHT;
91 //proj.effects = proj.effects | EF_ADDITIVE;
92 proj.effects = proj.effects | EF_LOWPRECISION;
93 counter = counter + 1;
99 void() crylink_ready_01 = {weapon_thinkf(WFRAME_IDLE, 0.1, crylink_ready_01); self.weaponentity.state = WS_READY;};
100 void() crylink_select_01 = {weapon_thinkf(-1, cvar("g_balance_weaponswitchdelay"), w_ready); weapon_boblayer1(PLAYER_WEAPONSELECTION_SPEED, '0 0 0');};
101 void() crylink_deselect_01 = {weapon_thinkf(-1, cvar("g_balance_weaponswitchdelay"), w_clear); weapon_boblayer1(PLAYER_WEAPONSELECTION_SPEED, PLAYER_WEAPONSELECTION_RANGE);};
102 void() crylink_fire1_01 =
104 weapon_doattack(crylink_check, crylink_check, W_Crylink_Attack);
105 weapon_thinkf(WFRAME_FIRE1, 0.15, crylink_ready_01);