642 {
643 bool disconnectNow = true;
644
645
646
648 {
649 if (player.IsAlive())
650 {
652 {
653 Print(
"[Logout]: New player " + identity.
GetId() +
" with logout time " + logoutTime.
ToString());
654
655
656 player.StatSyncToClient();
657
658
659 g_Game.SendLogoutTime(player, logoutTime);
660
661
663
666
667
668
669
670
671
672
673 disconnectNow = false;
674 }
675 return;
676 }
677 }
678
679 if (disconnectNow)
680 {
681 Print(
"[Logout]: New player " + identity.
GetId() +
" with instant logout");
682
683
684 g_Game.SendLogoutTime(player, 0);
685
687 }
688 }
proto native Hive GetHive()
void AddNewPlayerLogout(PlayerBase player, notnull LogoutInfo info)
void PlayerDisconnected(PlayerBase player, PlayerIdentity identity, string uid)
ref map< PlayerBase, ref LogoutInfo > m_NewLogoutPlayers
ref map< PlayerBase, ref LogoutInfo > m_LogoutPlayers
proto string GetId()
unique id of player (hashed steamID, database Xbox id...) can be used in database or logs
proto void Print(void var)
Prints content of variable to console/log.
static proto string ToString(void var, bool type=false, bool name=false, bool quotes=true)
Return string representation of variable.
Param2< int, string > LogoutInfo
int time of the logout end