From: Samual Lenks Date: Mon, 25 Nov 2013 02:02:55 +0000 (-0500) Subject: Add cvar for playerinfo uri X-Git-Tag: xonotic-v0.8.0~139^2~1^2~114 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d0c9e999cfa51432a3d59715ea0d93608d7b52c3;p=xonotic%2Fxonotic-data.pk3dir.git Add cvar for playerinfo uri --- diff --git a/qcsrc/common/playerstats.qc b/qcsrc/common/playerstats.qc index 4f4a76cd1..2edda5b64 100644 --- a/qcsrc/common/playerstats.qc +++ b/qcsrc/common/playerstats.qc @@ -639,7 +639,7 @@ void PlayerInfo_Basic(entity p) return; string uri; - uri = playerinfo_uri; // FIXME + uri = autocvar_g_playerinfo_uri; if(uri != "" && p.crypto_idfp != "") { uri = strcat(uri, "/elo/", uri_escape(p.crypto_idfp)); @@ -658,7 +658,7 @@ void PlayerInfo_Details() return; string uri; - uri = playerinfo_uri; // FIXME + uri = autocvar_g_playerinfo_uri; // FIXME if(uri != "" && crypto_getmyidstatus(0) > 0) { uri = strcat(uri, "/player/", uri_escape(crypto_getmyidfp(0))); @@ -679,7 +679,7 @@ void PlayerInfo_Details() return; string uri; - uri = playerinfo_uri; // FIXME + uri = autocvar_g_playerinfo_uri; // FIXME if(uri != "" && crypto_getmyidstatus(0) > 0) { entity p = spawn(); diff --git a/qcsrc/common/playerstats.qh b/qcsrc/common/playerstats.qh index bf3d4f2d7..32a3a5580 100644 --- a/qcsrc/common/playerstats.qh +++ b/qcsrc/common/playerstats.qh @@ -56,6 +56,8 @@ void PlayerStats_AddGlobalInfo(entity p); // call this at the end of the match void PlayerStats_EndMatch(float finished); +string autocvar_g_playerstats_uri; + #endif //SVQC @@ -64,18 +66,21 @@ void PlayerStats_EndMatch(float finished); //// WIP -zykure ///////////////////////////////////////////////////// -const string playerinfo_uri = "http://localhost:6543"; // FIXME +//const string playerinfo_uri = "http://localhost:6543"; // FIXME string PlayerInfo_GetItem(entity e, string item_id); string PlayerInfo_GetItemLocal(string item_id); void PlayerInfo_Init(); #ifdef SVQC +string autocvar_g_playerinfo_uri; void PlayerInfo_Basic(entity p); #endif #ifdef MENUQC +string autocvar_g_playerinfo_uri; void PlayerInfo_Details(); #endif #ifdef CSQC + //void PlayerInfo_Details(); #endif diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 19187a39d..8a308d2d5 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -937,7 +937,6 @@ float autocvar_g_pickup_shells_max; float autocvar_g_player_alpha; float autocvar_g_player_brightness; float autocvar_g_playerclip_collisions; -string autocvar_g_playerstats_uri; float autocvar_g_powerups; float autocvar_g_projectiles_damage; float autocvar_g_projectiles_keep_owner;