]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/hook/cl_hook.qc
Fix gameplay tips appearing even if the relative mutators aren't enabled by implement...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / hook / cl_hook.qc
index 4c8b2621a44b05da3a8c502448464054e5d5547a..be88853bbf37e2e2cb312367ff86ed90becd8c45 100644 (file)
@@ -5,9 +5,12 @@ REGISTER_MUTATOR(cl_hook, true);
 
 MUTATOR_HOOKFUNCTION(cl_hook, BuildGameplayTipsString)
 {
-       string key = getcommandkey(_("off-hand hook"), "+hook");
-       M_ARGV(0, string) = strcat(M_ARGV(0, string),
-               "\n\n", sprintf(_("^3grappling hook^8 is enabled, press ^3%s^8 to use it"), key), "\n");
+       if (mut_is_active(MUT_GRAPPLING_HOOK))
+       {
+               string key = getcommandkey(_("off-hand hook"), "+hook");
+               M_ARGV(0, string) = strcat(M_ARGV(0, string),
+                       "\n\n", sprintf(_("^3grappling hook^8 is enabled, press ^3%s^8 to use it"), key), "\n");
+       }
 }
 
 #endif