3 AUTOCVAR(g_grappling_hook, bool, false, _("let players spawn with the grappling hook which allows them to pull themselves up"));
5 REGISTER_MUTATOR(hook, autocvar_g_grappling_hook) {
7 g_grappling_hook = true;
8 WEP_HOOK.ammo_factor = 0;
10 MUTATOR_ONROLLBACK_OR_REMOVE {
11 g_grappling_hook = false;
12 WEP_HOOK.ammo_factor = 1;
18 MUTATOR_HOOKFUNCTION(hook, BuildMutatorsString)
20 M_ARGV(0, string) = strcat(M_ARGV(0, string), ":grappling_hook");
23 MUTATOR_HOOKFUNCTION(hook, BuildMutatorsPrettyString)
25 M_ARGV(0, string) = strcat(M_ARGV(0, string), ", Hook");
28 MUTATOR_HOOKFUNCTION(hook, BuildGameplayTipsString)
30 M_ARGV(0, string) = strcat(M_ARGV(0, string), "\n\n^3grappling hook^8 is enabled, press 'e' to use it\n");
33 MUTATOR_HOOKFUNCTION(hook, PlayerSpawn)
35 entity player = M_ARGV(0, entity);
37 player.offhand = OFFHAND_HOOK;
40 MUTATOR_HOOKFUNCTION(hook, FilterItem)
42 entity item = M_ARGV(0, entity);
44 return item.weapon == WEP_HOOK.m_id;