From: terencehill Date: Thu, 16 Aug 2018 11:44:10 +0000 (+0200) Subject: Keepaway: don't allow players to get the ball if game hasn't started yet X-Git-Tag: xonotic-v0.8.5~1926 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=34ca142d110195e191bbcdd4ccec986d66414f66;p=xonotic%2Fxonotic-data.pk3dir.git Keepaway: don't allow players to get the ball if game hasn't started yet --- diff --git a/qcsrc/common/gamemodes/gamemode/keepaway/keepaway.qc b/qcsrc/common/gamemodes/gamemode/keepaway/keepaway.qc index c8bfbf25a..48ab656c0 100644 --- a/qcsrc/common/gamemodes/gamemode/keepaway/keepaway.qc +++ b/qcsrc/common/gamemodes/gamemode/keepaway/keepaway.qc @@ -89,8 +89,9 @@ void ka_TimeScoring(entity this) void ka_TouchEvent(entity this, entity toucher) // runs any time that the ball comes in contact with something { - if(game_stopped) return; - if(!this) return; + if (!this || game_stopped || time < game_starttime) + return; + if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT) { // The ball fell off the map, respawn it since players can't get to it ka_RespawnBall(this);