X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmutators%2Fmutator_nix.qc;h=8cf0118d4e428465befc4f810012246f5b700b15;hb=5b22584122d4354ab7819853d0fa5219d14d832e;hp=ecf07cb7875ee53582e34cd478608abe664284a1;hpb=adaa580f88d0a97498ea660d6f5cad095dc42dad;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/mutators/mutator_nix.qc b/qcsrc/server/mutators/mutator_nix.qc index ecf07cb78..8cf0118d4 100644 --- a/qcsrc/server/mutators/mutator_nix.qc +++ b/qcsrc/server/mutators/mutator_nix.qc @@ -24,7 +24,7 @@ float NIX_CanChooseWeapon(float wpn) } else { - if(wpn == WEP_BLASTER && g_nix_with_blaster) // WEAPONTODO: rename to g_nix_with_blaster + if(wpn == WEP_BLASTER.m_id && g_nix_with_blaster) // WEAPONTODO: rename to g_nix_with_blaster return false; if(e.spawnflags & WEP_FLAG_MUTATORBLOCKED) return false; @@ -44,7 +44,7 @@ void NIX_ChooseNextWeapon() } void NIX_GiveCurrentWeapon() -{ +{SELFPARAM(); float dt; if(!nix_nextweapon) @@ -177,7 +177,7 @@ MUTATOR_HOOKFUNCTION(nix_BuildMutatorsPrettyString) } MUTATOR_HOOKFUNCTION(nix_FilterItem) -{ +{SELFPARAM(); switch (self.items) { case ITEM_HealthSmall.m_itemid: @@ -202,14 +202,14 @@ MUTATOR_HOOKFUNCTION(nix_FilterItem) } MUTATOR_HOOKFUNCTION(nix_OnEntityPreSpawn) -{ +{SELFPARAM(); if(self.classname == "target_items") // items triggers cannot work in nix (as they change weapons/ammo) return 1; return 0; } MUTATOR_HOOKFUNCTION(nix_PlayerPreThink) -{ +{SELFPARAM(); if(!intermission_running) if(self.deadflag == DEAD_NO) if(IS_PLAYER(self)) @@ -218,7 +218,7 @@ MUTATOR_HOOKFUNCTION(nix_PlayerPreThink) } MUTATOR_HOOKFUNCTION(nix_PlayerSpawn) -{ +{SELFPARAM(); self.nix_lastchange_id = -1; NIX_GiveCurrentWeapon(); // overrides the weapons you got when spawning self.items |= IT_UNLIMITED_SUPERWEAPONS; @@ -232,7 +232,7 @@ MUTATOR_HOOKFUNCTION(nix_SetModname) } MUTATOR_DEFINITION(mutator_nix) -{ +{SELFPARAM(); entity e; MUTATOR_HOOK(ForbidThrowCurrentWeapon, nix_ForbidThrowCurrentWeapon, CBC_ORDER_ANY);