]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/gamemode/keepaway/keepaway.qc
Keepaway: don't allow players to get the ball if game hasn't started yet
[xonotic/xonotic-data.pk3dir.git] / 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);