629 {
630 bool disconnectNow = true;
631
632
633
635 {
636 if (player.IsAlive())
637 {
639 {
640 Print(
"[Logout]: New player " + identity.
GetId() +
" with logout time " + logoutTime.ToString());
641
642
643 player.StatSyncToClient();
644
645
646 g_Game.SendLogoutTime(player, logoutTime);
647
648
650
653
654
655
656
657
658
659
660 disconnectNow = false;
661 }
662 return;
663 }
664 }
665
666 if (disconnectNow)
667 {
668 Print(
"[Logout]: New player " + identity.
GetId() +
" with instant logout");
669
670
671 g_Game.SendLogoutTime(player, 0);
672
674 }
675 }
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.
Param2< int, string > LogoutInfo
int time of the logout end