]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Port jointime to ClientState
authorMario <mario@smbclan.net>
Sat, 15 Jul 2017 20:36:17 +0000 (06:36 +1000)
committerMario <mario@smbclan.net>
Sat, 15 Jul 2017 20:36:17 +0000 (06:36 +1000)
qcsrc/server/client.qc
qcsrc/server/client.qh
qcsrc/server/command/common.qc
qcsrc/server/g_world.qc
qcsrc/server/mutators/mutator/gamemode_ca.qc

index 009d12995f9f7f222268df454b7faa9b9091831d..aa19f060e4298ad2c239fd0da3179964796c01a5 100644 (file)
@@ -1230,7 +1230,7 @@ void ClientConnect(entity this)
                Send_Notification(NOTIF_ONE_ONLY, this, MSG_INFO, INFO_SPECTATE_WARNING, autocvar_g_maxplayers_spectator_blocktime);
        }
 
-       this.jointime = time;
+       CS(this).jointime = time;
        this.allowed_timeouts = autocvar_sv_timeout_number;
 
        if (IS_REAL_CLIENT(this))
index 0780a4a6e5cdd0b27d960f0ed7ec11d8ceb04f8f..510a6e271380553b8668bb35c2de8d161eaae6fc 100644 (file)
@@ -81,6 +81,7 @@ CLASS(Client, Object)
     ATTRIB(Client, teamkill_soundsource, entity, this.teamkill_soundsource);
     ATTRIB(Client, usekeypressed, bool, this.usekeypressed);
     ATTRIB(Client, motd_actived_time, float, this.motd_actived_time);
+    ATTRIB(Client, jointime, float, this.jointime);
 
     METHOD(Client, m_unwind, bool(Client this));
 
index 984505ec1c56d54d880d1c580f0df68fde9b313b..936858ce46158ffb232b8974e2a25fb6aa1d3829 100644 (file)
@@ -808,7 +808,7 @@ void CommonCommand_who(float request, entity caller, float argc)
                                        it.netname,
                                        CS(it).ping,
                                        CS(it).ping_packetloss,
-                                       process_time(1, time - it.jointime),
+                                       process_time(1, time - CS(it).jointime),
                                        tmp_netaddress,
                                        tmp_crypto_idfp));
 
index a58a3de109a95f77053df51070792963c5060d1b..2f732956c568a778dcb0200c74bf36504ad0ab7f 100644 (file)
@@ -1459,7 +1459,7 @@ void DumpStats(float final)
 
        FOREACH_CLIENT(IS_REAL_CLIENT(it) || (IS_BOT_CLIENT(it) && autocvar_sv_logscores_bots), LAMBDA(
                s = strcat(":player:see-labels:", GetPlayerScoreString(it, 0), ":");
-               s = strcat(s, ftos(rint(time - it.jointime)), ":");
+               s = strcat(s, ftos(rint(time - CS(it).jointime)), ":");
                if(IS_PLAYER(it) || MUTATOR_CALLHOOK(GetPlayerStatus, it))
                        s = strcat(s, ftos(it.team), ":");
                else
index 8ef0a859e2927030c64a32d73fe52665c72c908f..6fe4e74e3740534559f1a99e94e15d7899d7ea9e 100644 (file)
@@ -188,7 +188,7 @@ MUTATOR_HOOKFUNCTION(ca, PutClientInServer)
        if (!allowed_to_spawn && IS_PLAYER(player)) // this is true even when player is trying to join
        {
                TRANSMUTE(Observer, player);
-               if (player.jointime != time && !player.caplayer) // not when connecting
+               if (CS(player).jointime != time && !player.caplayer) // not when connecting
                {
                        player.caplayer = 0.5;
                        Send_Notification(NOTIF_ONE_ONLY, player, MSG_INFO, INFO_CA_JOIN_LATE);