]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/minigames/minigame/pong.qc
Merge branch 'master' into terencehill/ft_autorevive_progress
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / minigames / minigame / pong.qc
index dd072a05be1f279b3b5f9b740a38702250890a7e..407eb4e8fdfeafbaa12680abdc9655bb7862bbcd 100644 (file)
@@ -1,5 +1,5 @@
 #include "pong.qh"
-REGISTER_MINIGAME(pong, "Pong");
+REGISTER_MINIGAME(pong, _("Pong"));
 
 // minigame flags
 const int PONG_STATUS_WAIT = 0x0010; // waiting for players to join
@@ -427,8 +427,12 @@ int pong_server_event(entity minigame, string event, ...)
                                        return true;
                                case "pong_aimore":
                                {
+                                       // keep declaration here, moving it into for() reverses weapon order
+                                       // potentially compiler bug
+                                       int j;
                                        if ( minigame.minigame_flags & PONG_STATUS_WAIT )
-                                               for ( int j = 0; j < PONG_MAX_PLAYERS; j++ )
+                                               for ( j = 0; j < PONG_MAX_PLAYERS; j++ )
+                                               //for ( int j = 0; j < PONG_MAX_PLAYERS; j++ )
                                                {
                                                        if ( minigame.pong_paddles[j] == NULL )
                                                        {
@@ -610,6 +614,11 @@ int pong_client_event(entity minigame, string event, ...)
        {
                case "activate":
                        return false;
+               case "deactivate":
+               {
+                       strfree(minigame.message);
+                       return false;
+               }
                case "key_pressed":
                        switch ( ...(0,int) )
                        {
@@ -660,7 +669,7 @@ int pong_client_event(entity minigame, string event, ...)
                        {
                                if ( sf & MINIG_SF_UPDATE )
                                {
-                                       sent.message = pong_message(sent.minigame_flags);
+                                       strcpy(sent.message, pong_message(sent.minigame_flags));
                                }
                        }
                        return false;