}
}
-void PlayerStats_GameReport_AddTeam(float t)
+void PlayerStats_GameReport_AddTeam(int t)
{
if(PS_GR_OUT_DB < 0) { return; }
if(latency)
PlayerStats_GameReport_Event_Player(p, PLAYERSTATS_AVGLATENCY, latency);
}
+
+ db_put(PS_GR_OUT_DB, sprintf("%s:_ranked", p.playerstats_id), ftos(CS(p).cvar_cl_allow_uidranking));
}
- strunzone(p.playerstats_id);
- p.playerstats_id = string_null;
+ strfree(p.playerstats_id);
}
-void PlayerStats_GameReport(float finished)
+void PlayerStats_GameReport(bool finished)
{
if(PS_GR_OUT_DB < 0) { return; }
}
// this... is a hack, a temporary one until we get a proper duel gametype
+// TODO: remove duel hack after servers have migrated to the proper duel gametype!
string PlayerStats_GetGametype()
{
if(IS_GAMETYPE(DEATHMATCH) && autocvar_g_maxplayers == 2)
url_fputs(fh, sprintf("t %s\n", tt));
}
+ // elo ranking enabled
+ nn = db_get(PS_GR_OUT_DB, sprintf("%s:_ranked", p));
+ if(nn != "") { url_fputs(fh, sprintf("r %s\n", nn)); }
+
// output player events
for(e = PS_GR_OUT_EVL; (en = db_get(PS_GR_OUT_DB, sprintf("*:%s", e))) != ""; e = en)
{
}
}
+SHUTDOWN(PlayerStats_PlayerBasic_Shutdown)
+{
+ if(PS_B_IN_DB >= 0)
+ {
+ db_close(PS_B_IN_DB);
+ PS_B_IN_DB = -1;
+ }
+
+ if(PS_GR_OUT_DB >= 0)
+ {
+ db_close(PS_GR_OUT_DB);
+ PS_GR_OUT_DB = -1;
+ }
+}
+
void PlayerStats_PlayerBasic_CheckUpdate(entity joiningplayer)
{
// determine whether we should retrieve playerbasic information again