]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/gamemode/nexball/nexball.qc
Purify PutClientInServer and PlayerSpawn mutator hooks
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / nexball / nexball.qc
index 6c6bcac9e2553002097769b9fb7ea116d1e6b012..57539be68fe834f80c528f61d6083bb6077996bd 100644 (file)
@@ -1014,15 +1014,16 @@ MUTATOR_HOOKFUNCTION(nb, SpectateCopy)
 
 MUTATOR_HOOKFUNCTION(nb, PlayerSpawn)
 {
-       SELFPARAM();
-       this.metertime = 0;
+       entity player = M_ARGV(0, entity);
+
+       player.metertime = 0;
        .entity weaponentity = weaponentities[0];
-       this.(weaponentity).weapons = '0 0 0';
+       player.(weaponentity).weapons = '0 0 0';
 
        if (nexball_mode & NBM_BASKETBALL)
-               this.weapons |= WEPSET(NEXBALL);
+               player.weapons |= WEPSET(NEXBALL);
        else
-               this.weapons = '0 0 0';
+               player.weapons = '0 0 0';
 
        return false;
 }