1 void() setrope_ready_01;
\r
2 void() setrope_fire1_01;
\r
3 void() setrope_deselect_01;
\r
4 void() setrope_select_01;
\r
6 float() setrope_check =
\r
11 void(float req) w_setrope =
\r
15 else if (req == WR_FIRE1)
\r
16 weapon_prepareattack(setrope_check, setrope_check, setrope_fire1_01, cvar("g_balance_setrope_refire"));
\r
17 else if (req == WR_RAISE)
\r
18 setrope_select_01();
\r
19 else if (req == WR_UPDATECOUNTS)
\r
20 self.currentammo = 1;
\r
21 else if (req == WR_DROP)
\r
22 setrope_deselect_01();
\r
23 else if (req == WR_SETUP)
\r
24 weapon_setup(WEP_SETROPE, "w_setrope.zym", 0);
\r
25 else if (req == WR_CHECKAMMO)
\r
26 weapon_hasammo = setrope_check();
\r
37 void RopeTouch (void)
\r
39 if (other.classname != "player" || other.health < 1)
\r
41 other.ladder_time = time + 0.1;
\r
42 other.ladder_entity = self;
\r
45 void W_SetRope (void)
\r
47 local entity ropestand, oself;
\r
50 makevectors(self.v_angle);
\r
51 org = self.origin + self.view_ofs + v_forward * 15 - v_right * 5 + v_up * -12;
\r
53 ropestand = spawn ();
\r
54 ropestand.owner = self;
\r
55 ropestand.classname = "ropestand";
\r
57 ropestand.movetype = MOVETYPE_NONE;
\r
58 ropestand.solid = SOLID_BBOX;
\r
60 setmodel (ropestand, "models/ropebase.mdl");
\r
61 setsize (ropestand, '0 0 0', '0 0 0');
\r
62 setorigin (ropestand, org);
\r
69 ropestand.angles = self.angles;
\r
70 ropestand.angles_x = ropestand.angles_z = 0;
\r
72 //ropestand.touch = RopeStandTouch;
\r
73 ropestand.think = RopeExtend;
\r
74 ropestand.nextthink = time + 0.1;
\r
77 void() setrope_ready_01 = {weapon_thinkf(WFRAME_IDLE, 0.1, setrope_ready_01); self.weaponentity.state = WS_READY;};
\r
78 void() setrope_select_01 = {weapon_thinkf(-1, cvar("g_balance_weaponswitchdelay"), w_ready); weapon_boblayer1(PLAYER_WEAPONSELECTION_SPEED, '0 0 0');};
\r
79 void() setrope_deselect_01 = {weapon_thinkf(-1, cvar("g_balance_weaponswitchdelay"), w_clear); weapon_boblayer1(PLAYER_WEAPONSELECTION_SPEED, PLAYER_WEAPONSELECTION_RANGE);};
\r
80 void() setrope_fire1_01 =
\r
82 weapon_doattack(setrope_check, setrope_check, W_SetRope);
\r
83 weapon_thinkf(WFRAME_FIRE1, 0.3, setrope_ready_01);
\r