From: Mario Date: Sat, 15 Jul 2017 21:03:25 +0000 (+1000) Subject: Port version_nagtime to ClientState X-Git-Tag: xonotic-v0.8.5~2613 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8b3cb2953a831a927654131f29a8fa2098039a8e;p=xonotic%2Fxonotic-data.pk3dir.git Port version_nagtime to ClientState --- diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 128ef3dd6..d891ac1d0 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -1125,8 +1125,8 @@ void ClientConnect(entity this) #ifdef WATERMARK Send_Notification(NOTIF_ONE_ONLY, this, MSG_INFO, INFO_WATERMARK, WATERMARK); #endif - this.version_nagtime = time + 10 + random() * 10; TRANSMUTE(Client, this); + CS(this).version_nagtime = time + 10 + random() * 10; // identify the right forced team if (autocvar_g_campaign) @@ -2485,8 +2485,8 @@ void PlayerPreThink (entity this) } // version nagging - if (this.version_nagtime && this.cvar_g_xonoticversion && time > this.version_nagtime) { - this.version_nagtime = 0; + if (CS(this).version_nagtime && this.cvar_g_xonoticversion && time > CS(this).version_nagtime) { + CS(this).version_nagtime = 0; if (strstrofs(this.cvar_g_xonoticversion, "git", 0) >= 0 || strstrofs(this.cvar_g_xonoticversion, "autobuild", 0) >= 0) { // git client } else if (strstrofs(autocvar_g_xonoticversion, "git", 0) >= 0 || strstrofs(autocvar_g_xonoticversion, "autobuild", 0) >= 0) { diff --git a/qcsrc/server/client.qh b/qcsrc/server/client.qh index 03ff47757..924346553 100644 --- a/qcsrc/server/client.qh +++ b/qcsrc/server/client.qh @@ -83,6 +83,7 @@ CLASS(Client, Object) ATTRIB(Client, motd_actived_time, float, this.motd_actived_time); ATTRIB(Client, jointime, float, this.jointime); ATTRIB(Client, spectatortime, float, this.spectatortime); + ATTRIB(Client, version_nagtime, float, this.version_nagtime); METHOD(Client, m_unwind, bool(Client this)); diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index 6d1c7e317..9c14d9ccb 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -179,8 +179,6 @@ float default_weapon_alpha; .float cvar_cl_allow_uidtracking; .string stored_netname; -.float version_nagtime; - string gamemode_name; float startitem_failed;