]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/hook/hook.qc
Fix panel show flags checks
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / hook / hook.qc
index 3dbce74f24de35fa4ee7744cdd8a946dd3c00cf6..e72134e0e708160e37aea70e3ae056de087272a6 100644 (file)
@@ -10,21 +10,23 @@ REGISTER_MUTATOR(hook, autocvar_g_grappling_hook) {
         g_grappling_hook = false;
         WEP_HOOK.ammo_factor = 1;
     }
+
+    return false;
 }
 
 MUTATOR_HOOKFUNCTION(hook, BuildMutatorsString)
 {
-    ret_string = strcat(ret_string, ":grappling_hook");
+    M_ARGV(0, string) = strcat(M_ARGV(0, string), ":grappling_hook");
 }
 
 MUTATOR_HOOKFUNCTION(hook, BuildMutatorsPrettyString)
 {
-    ret_string = strcat(ret_string, ", Hook");
+    M_ARGV(0, string) = strcat(M_ARGV(0, string), ", Hook");
 }
 
 MUTATOR_HOOKFUNCTION(hook, BuildGameplayTipsString)
 {
-    ret_string = strcat(ret_string, "\n\n^3grappling hook^8 is enabled, press 'e' to use it\n");
+    M_ARGV(0, string) = strcat(M_ARGV(0, string), "\n\n^3grappling hook^8 is enabled, press 'e' to use it\n");
 }
 
 MUTATOR_HOOKFUNCTION(hook, PlayerSpawn)
@@ -36,8 +38,9 @@ MUTATOR_HOOKFUNCTION(hook, PlayerSpawn)
 
 MUTATOR_HOOKFUNCTION(hook, FilterItem)
 {
-    SELFPARAM();
-    return self.weapon == WEP_HOOK.m_id;
+    entity item = M_ARGV(0, entity);
+
+    return item.weapon == WEP_HOOK.m_id;
 }
 
 #endif