]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use \r as id symbol so it cannot be confused with a player name (cannot contain \r)
authorterencehill <piuntn@gmail.com>
Sun, 22 May 2011 20:04:40 +0000 (22:04 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 22 May 2011 20:04:40 +0000 (22:04 +0200)
qcsrc/client/hud.qc
qcsrc/common/constants.qh

index 15ca2b9b6f6ab39b0fac0d7f9e83ec80694c7f62..f6177753d60942e476c27e793b87db403571b4ee 100644 (file)
@@ -158,7 +158,7 @@ string strip_CPID(string s)
 }
 float get_CPID(string s)
 {
-       if(substring(s, 0, 1) != "#")
+       if(substring(s, 0, 1) != "\r")
                return 0;
        return stof(substring(s, 1, strstrofs(s, " ", 0)));
 }
index e2f2ac2a6e7ebe96fb115be9bd2178ac18ed52af..94602b69478528471037d317dd966289b3278d6d 100644 (file)
@@ -581,14 +581,14 @@ float WATERLEVEL_SUBMERGED = 3;
 float MAX_SHOT_DISTANCE = 32768;
 
 //centerprint ID list
-#define CPID_TEAMCHANGE                        "#1 "
-#define CPID_KILL                              "#2 "
-#define CPID_MINSTA_FINDAMMO   "#3 "
-#define CPID_NIX_WPNCHANGE             "#4 "
-#define CPID_DISCONNECT_IDLING "#5 "
-#define CPID_ROUND_STARTING            "#6 "
-#define CPID_GAME_STARTING             "#7 "
-#define CPID_TIMEOUT_COUNTDOWN "#8 "
+#define CPID_TEAMCHANGE                        "\r1 "
+#define CPID_KILL                              "\r2 "
+#define CPID_MINSTA_FINDAMMO   "\r3 "
+#define CPID_NIX_WPNCHANGE             "\r4 "
+#define CPID_DISCONNECT_IDLING "\r5 "
+#define CPID_ROUND_STARTING            "\r6 "
+#define CPID_GAME_STARTING             "\r7 "
+#define CPID_TIMEOUT_COUNTDOWN "\r8 "
 
 // CSQC centerprint/notify message types
 float MSG_SUICIDE = 0;