4 /* spawnfunc */ ATTRIB(Hook, m_canonical_spawnfunc, string, "weapon_hook");
5 /* ammotype */ ATTRIB(Hook, ammo_type, int, RESOURCE_FUEL);
6 /* impulse */ ATTRIB(Hook, impulse, int, 0);
7 /* flags */ ATTRIB(Hook, spawnflags, int, WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
8 /* rating */ ATTRIB(Hook, bot_pickupbasevalue, float, 0);
9 /* color */ ATTRIB(Hook, wpcolor, vector, '0 0.5 0');
10 /* modelname */ ATTRIB(Hook, mdl, string, "hookgun");
12 /* model */ ATTRIB(Hook, m_model, Model, MDL_HOOK_ITEM);
14 /* crosshair */ ATTRIB(Hook, w_crosshair, string, "gfx/crosshairhook");
15 /* crosshair */ ATTRIB(Hook, w_crosshair_size, float, 0.5);
16 /* wepimg */ ATTRIB(Hook, model2, string, "weaponhook");
17 /* refname */ ATTRIB(Hook, netname, string, "hook");
18 /* wepname */ ATTRIB(Hook, m_name, string, _("Grappling Hook"));
19 ATTRIB(Hook, ammo_factor, float, 1);
21 #define X(BEGIN, P, END, class, prefix) \
23 P(class, prefix, ammo, float, PRI) \
24 P(class, prefix, animtime, float, BOTH) \
25 P(class, prefix, damageforcescale, float, SEC) \
26 P(class, prefix, damage, float, SEC) \
27 P(class, prefix, duration, float, SEC) \
28 P(class, prefix, edgedamage, float, SEC) \
29 P(class, prefix, force, float, SEC) \
30 P(class, prefix, gravity, float, SEC) \
31 P(class, prefix, health, float, SEC) \
32 P(class, prefix, hooked_ammo, float, PRI) \
33 P(class, prefix, hooked_time_free, float, PRI) \
34 P(class, prefix, hooked_time_max, float, PRI) \
35 P(class, prefix, lifetime, float, SEC) \
36 P(class, prefix, power, float, SEC) \
37 P(class, prefix, radius, float, SEC) \
38 P(class, prefix, refire, float, BOTH) \
39 P(class, prefix, speed, float, SEC) \
40 P(class, prefix, switchdelay_drop, float, NONE) \
41 P(class, prefix, switchdelay_raise, float, NONE) \
42 P(class, prefix, weaponreplace, string, NONE) \
43 P(class, prefix, weaponstartoverride, float, NONE) \
44 P(class, prefix, weaponstart, float, NONE) \
45 P(class, prefix, weaponthrowable, float, NONE) \
47 W_PROPS(X, Hook, hook)
51 REGISTER_WEAPON(HOOK, hook, NEW(Hook));
53 SPAWNFUNC_WEAPON(weapon_hook, WEP_HOOK)
55 CLASS(OffhandHook, OffhandWeapon)
57 METHOD(OffhandHook, offhand_think, void(OffhandHook this, entity actor, bool key_pressed))
59 Weapon wep = WEP_HOOK;
60 .entity weaponentity = weaponentities[1];
61 wep.wr_think(wep, actor, weaponentity, key_pressed ? 1 : 0);
65 OffhandHook OFFHAND_HOOK; STATIC_INIT(OFFHAND_HOOK) { OFFHAND_HOOK = NEW(OffhandHook); }
77 .float hook_time_hooked;
78 .float hook_time_fueldecrease;