#include "constants.qh"
#include "util.qh"
#include <common/weapons/_all.qh>
+ #include <server/client.qh>
#include "../server/anticheat.qh"
- #include "../server/defs.qh"
+ #include <common/stats.qh>
#include "../server/scores.qh"
+ #include <server/world.qh>
#include "../server/weapons/accuracy.qh"
#endif
}
}
-void PlayerStats_GameReport_AddTeam(float t)
+void PlayerStats_GameReport_AddTeam(int t)
{
if(PS_GR_OUT_DB < 0) { return; }
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)
* G: game type
* O: mod name (icon request) as in server browser
* M: map name
- * I: match ID (see "matchid" in g_world.qc)
+ * I: match ID (see "matchid" in world.qc)
* S: "hostname" of the server
* C: number of "unpure" cvar changes
* U: UDP port number of the server
}
}
+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