]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/minigames/minigame/pp.qc
Merge branch 'master' into Mario/qc_camstuff
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / minigames / minigame / pp.qc
index 1dc640ce5b25908d1272a0dc5ac919c346cb209b..e8aed878aab9c31ce663bd453747d996e1a191a2 100644 (file)
@@ -439,11 +439,10 @@ string pp_turn_to_string(int turnflags)
 
        if ( turnflags & PP_TURN_WIN )
        {
+               // translator-friendly messages composed of 2 existing messages
                if ( (turnflags&PP_TURN_TEAM) != minigame_self.team )
-                       //return _("You lost the game!\nSelect \"^1Next Match^7\" on the menu for a rematch!");
-                       return _("You lost the game!");
-               //return _("You win!\nSelect \"^1Next Match^7\" on the menu to start a new match!");
-               return _("You win!");
+                       return strcat(_("You lost the game!"), "\n", _("Select \"^1Next Match^7\" on the menu for a rematch!"));
+               return strcat(_("You win!"), "\n", _("Select \"^1Next Match^7\" on the menu to start a new match!"));
        }
 
        if ( turnflags & PP_TURN_NEXT )
@@ -487,7 +486,12 @@ int pp_client_event(entity minigame, string event, ...)
                case "activate":
                {
                        pp_set_curr_pos("");
-                       minigame.message = pp_turn_to_string(minigame.minigame_flags);
+                       strcpy(minigame.message, pp_turn_to_string(minigame.minigame_flags));
+                       return false;
+               }
+               case "deactivate":
+               {
+                       strfree(minigame.message);
                        return false;
                }
                case "key_pressed":
@@ -562,7 +566,7 @@ int pp_client_event(entity minigame, string event, ...)
                        {
                                if ( sf & MINIG_SF_UPDATE )
                                {
-                                       sent.message = pp_turn_to_string(sent.minigame_flags);
+                                       strcpy(sent.message, pp_turn_to_string(sent.minigame_flags));
                                        if ( sent.minigame_flags & minigame_self.team )
                                                minigame_prompt();
                                        sent.pp_team1_score = ReadByte();