From: Mattia Basaglia Date: Fri, 6 Mar 2015 07:54:32 +0000 (+0100) Subject: AI inherits player score when a player leaves X-Git-Tag: xonotic-v0.8.2~2038^2~10 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7d2d4f4e9177ef5024f9d3e1b07be6e263e46333;p=xonotic%2Fxonotic-data.pk3dir.git AI inherits player score when a player leaves --- diff --git a/qcsrc/common/minigames/minigame/pong.qc b/qcsrc/common/minigames/minigame/pong.qc index 7e785d17c..7cb37de3c 100644 --- a/qcsrc/common/minigames/minigame/pong.qc +++ b/qcsrc/common/minigames/minigame/pong.qc @@ -363,13 +363,15 @@ int pong_server_event(entity minigame, string event, ...) { entity player = ...(0,entity); entity paddle; + entity ai; int i; for ( i = 0; i < PONG_MAX_PLAYERS; i++ ) { paddle = minigame.pong_paddles[i]; if ( paddle != world && paddle.realowner == player ) { - pong_ai_spawn(paddle); + ai = pong_ai_spawn(paddle); + ai.pong_score = player.minigame_players.pong_score; break; }