From: terencehill Date: Sun, 22 May 2011 20:04:40 +0000 (+0200) Subject: Use \r as id symbol so it cannot be confused with a player name (cannot contain \r) X-Git-Tag: xonotic-v0.5.0~227 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d1c440d99c1be1b116f04a39622d01d7af799086;p=xonotic%2Fxonotic-data.pk3dir.git Use \r as id symbol so it cannot be confused with a player name (cannot contain \r) --- diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 15ca2b9b6..f6177753d 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -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))); } diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index e2f2ac2a6..94602b694 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -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;