X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fgamemodes%2Fgamemode%2Fnexball%2Fnexball.qc;h=f9885fefd45321c42987a5ff192fa7c9faf539df;hb=9e50112561ad6f4cefe6d13bd7185f5dfd1ada4b;hp=487012aa50902e7a834fdd708a7c0e45bb2928cc;hpb=5453f53da1df88742c11c71e4dc5b9c3e3d24c62;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc index 487012aa5..f9885fefd 100644 --- a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc +++ b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc @@ -7,7 +7,7 @@ REGISTER_MUTATOR(cl_nb, true); MUTATOR_HOOKFUNCTION(cl_nb, WantEventchase) { - if(autocvar_cl_eventchase_nexball && gametype == MAPINFO_TYPE_NEXBALL && !(WepSet_GetFromStat() & WEPSET(NEXBALL))) + if(autocvar_cl_eventchase_nexball && ISGAMETYPE(NEXBALL) && !(WepSet_GetFromStat() & WEPSET(NEXBALL))) return true; return false; } @@ -308,7 +308,7 @@ void football_touch(entity this, entity toucher) } if (!IS_PLAYER(toucher)) return; - if(GetResourceAmount(toucher, RESOURCE_HEALTH) < 1) + if(GetResource(toucher, RES_HEALTH) < 1) return; if(!this.cnt) this.nextthink = time + autocvar_g_nexball_delay_idle; @@ -348,7 +348,7 @@ void basketball_touch(entity this, entity toucher) } if(!this.cnt && IS_PLAYER(toucher) && !STAT(FROZEN, toucher) && !IS_DEAD(toucher) && (toucher != this.nb_dropper || time > this.nb_droptime + autocvar_g_nexball_delay_collect)) { - if(GetResourceAmount(toucher, RESOURCE_HEALTH) < 1) + if(GetResource(toucher, RES_HEALTH) < 1) return; LogNB("caught", toucher); GiveBall(toucher, this); @@ -635,7 +635,7 @@ void SpawnGoal(entity this) EXACTTRIGGER_INIT; - if(this.team != GOAL_OUT && Team_TeamToNumber(this.team) != -1) + if(this.team != GOAL_OUT && Team_IsValidTeam(this.team)) { entity wp = WaypointSprite_SpawnFixed(WP_NbGoal, (this.absmin + this.absmax) * 0.5, this, sprite, RADARICON_NONE); wp.colormod = ((this.team) ? Team_ColorRGB(this.team) : '1 0.5 0'); @@ -920,7 +920,7 @@ MUTATOR_HOOKFUNCTION(nb, ItemTouch) return MUT_ITEMTOUCH_CONTINUE; } -MUTATOR_HOOKFUNCTION(nb, CheckAllowedTeams) +MUTATOR_HOOKFUNCTION(nb, TeamBalance_CheckAllowedTeams) { M_ARGV(1, string) = "nexball_team"; return true;