From 5dd4279dd4652895bf93a9f5a0f80cc2658feb08 Mon Sep 17 00:00:00 2001 From: GenZmeY Date: Fri, 2 Sep 2022 15:23:34 +0300 Subject: [PATCH] fix player repinfo destroy --- CVC/Classes/CVC.uc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/CVC/Classes/CVC.uc b/CVC/Classes/CVC.uc index d2190b9..808a5e9 100644 --- a/CVC/Classes/CVC.uc +++ b/CVC/Classes/CVC.uc @@ -326,14 +326,20 @@ public function NotifyLogin(Controller C) { `Log_Trace(); - CreateRepInfo(C); + if (!CreateRepInfo(C)) + { + `Log_Error("Can't create RepInfo for:" @ C); + } } public function NotifyLogout(Controller C) { `Log_Trace(); - DestroyRepInfo(C); + if (!DestroyRepInfo(C)) + { + `Log_Error("Can't destroy RepInfo of:" @ C); + } } public function bool CreateRepInfo(Controller C) @@ -369,8 +375,8 @@ public function bool DestroyRepInfo(Controller C) { if (RepInfo.Owner == C) { - RepInfo.SafeDestroy(); RepInfos.RemoveItem(RepInfo); + RepInfo.SafeDestroy(); return true; } }