fix : 맵 이동시 유저 진입 동기화버그 수정
This commit is contained in:
@@ -67,9 +67,10 @@ public class Channel
|
||||
public void RemoveUser(int userId)
|
||||
{
|
||||
// 현재 맵에서도 제거
|
||||
if (connectUsers.TryGetValue(userId, out Player? player))
|
||||
if (connectUsers.TryGetValue(userId, out Player? player) &&
|
||||
maps.TryGetValue(player.CurrentMapId, out AMap? currentMap))
|
||||
{
|
||||
maps[player.CurrentMapId].RemoveUser(userId);
|
||||
currentMap.RemoveUser(userId);
|
||||
}
|
||||
|
||||
connectUsers.Remove(userId);
|
||||
|
||||
Reference in New Issue
Block a user