]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/main.qc
Merge branch 'master' into martin-t/globals
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / main.qc
index 6cee9dfcbc4112cdea55e728862c72ab8e333741..04cafebbd3a341786d40a29acc313c9b321620c0 100644 (file)
@@ -308,7 +308,7 @@ bool SetTeam(entity o, int Team)
 
 void Playerchecker_Think(entity this)
 {
-    int i;
+       int i;
        entity e;
        for(i = 0; i < maxclients; ++i)
        {
@@ -1121,17 +1121,15 @@ NET_HANDLE(TE_CSQC_RACE, bool isNew)
                        break;
 
                case RACE_NET_PENALTY_RACE:
-                       race_penaltyeventtime = time;
-                       race_penaltytime = ReadShort();
-                       //race_penaltyaccumulator += race_penaltytime;
-                       strcpy(race_penaltyreason, ReadString());
-                       break;
-
                case RACE_NET_PENALTY_QUALIFYING:
                        race_penaltyeventtime = time;
                        race_penaltytime = ReadShort();
-                       race_penaltyaccumulator += race_penaltytime;
-                       strcpy(race_penaltyreason, ReadString());
+                       string reason = ReadString();
+                       if (reason == "missing a checkpoint")
+                               reason = _("missing a checkpoint");
+                       strcpy(race_penaltyreason, reason);
+                       if (b == RACE_NET_PENALTY_QUALIFYING)
+                               race_penaltyaccumulator += race_penaltytime;
                        break;
 
                case RACE_NET_SERVER_RECORD:
@@ -1152,12 +1150,12 @@ NET_HANDLE(TE_CSQC_RACE, bool isNew)
                        break;
                case RACE_NET_SERVER_RANKINGS:
                        float prevpos, del;
-            int pos = ReadShort();
+                       int pos = ReadShort();
                        prevpos = ReadShort();
                        del = ReadShort();
 
                        // move other rankings out of the way
-            int i;
+                       int i;
                        if (prevpos) {
                                int m = min(prevpos, RANKINGS_DISPLAY_CNT);
                                for (i=m-1; i>pos-1; --i) {
@@ -1261,6 +1259,8 @@ string _getcommandkey(string cmd_name, string command, bool forcename)
                                if(!joy_active && substring(key, 0, 3) == "JOY")
                                        continue;
 
+                               key = translate_key(key);
+
                                if (keys == "")
                                        keys = key;
                                else