]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Keepaway: don't allow players to get the ball if game hasn't started yet
authorterencehill <piuntn@gmail.com>
Thu, 16 Aug 2018 11:44:10 +0000 (13:44 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 16 Aug 2018 11:47:11 +0000 (13:47 +0200)
qcsrc/common/gamemodes/gamemode/keepaway/keepaway.qc

index c8bfbf25ae8513550434de0d0f21b0144afeb79e..48ab656c093754056978d89d06d5f516efe84420 100644 (file)
@@ -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);