X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fgamemodes%2Fgamemode%2Fnexball%2Fnexball.qc;h=c841079fb775016d7828964bc25c0142261f76f0;hb=991de5e6922cd3c283de56c3249624f0f1bfe767;hp=82e5ed8cf16f683a219912910d873f86426a57f2;hpb=073cc17f87486bec59ac2b6f9c26bf1155dbd7d8;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..c841079fb 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; } @@ -306,9 +306,9 @@ void football_touch(entity this, entity toucher) this.nextthink = time + autocvar_g_nexball_delay_idle; return; } - if (!IS_PLAYER(toucher)) + if (!IS_PLAYER(toucher) && !IS_VEHICLE(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);