]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/hook/hook.qc
Purify PutClientInServer and PlayerSpawn mutator hooks
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / hook / hook.qc
index 388ee81a042b22f3519eb47e0f3cffa5459b5c88..3dbce74f24de35fa4ee7744cdd8a946dd3c00cf6 100644 (file)
@@ -29,8 +29,9 @@ MUTATOR_HOOKFUNCTION(hook, BuildGameplayTipsString)
 
 MUTATOR_HOOKFUNCTION(hook, PlayerSpawn)
 {
-    SELFPARAM();
-    self.offhand = OFFHAND_HOOK;
+    entity player = M_ARGV(0, entity);
+
+    player.offhand = OFFHAND_HOOK;
 }
 
 MUTATOR_HOOKFUNCTION(hook, FilterItem)