X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fgamemodes%2Fgamemode%2Fnexball%2Fnexball.qc;h=f9885fefd45321c42987a5ff192fa7c9faf539df;hb=9e50112561ad6f4cefe6d13bd7185f5dfd1ada4b;hp=82e5ed8cf16f683a219912910d873f86426a57f2;hpb=16bb4a51347c40ae0655bba054bc7cf201538e45;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 82e5ed8cf..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(toucher.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(toucher.health <= 0) + if(GetResource(toucher, RES_HEALTH) < 1) return; LogNB("caught", toucher); GiveBall(toucher, this);