mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
修复主从交互bug
This commit is contained in:
@@ -30,5 +30,11 @@ namespace Game.Logic.System
|
||||
return LVector3.Down;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [状态同步生命周期] 玩家离开服务器 不在游戏线程中执行
|
||||
/// </summary>
|
||||
public virtual void OnPlayerExitServer(int auth){}
|
||||
|
||||
|
||||
}
|
||||
}
|
@@ -1,6 +1,5 @@
|
||||
using DotRecast.Core.Collections;
|
||||
using Game.Input;
|
||||
using Game.JNGFrame.Logic.Entity;
|
||||
using Game.JNGFrame.Logic.Entity.Contexts;
|
||||
using Game.Logic.Entity.Nodes;
|
||||
using JNGame.Math;
|
||||
@@ -40,5 +39,20 @@ namespace Game.Logic.System.Logic
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
public override void OnPlayerExitServer(int auth)
|
||||
{
|
||||
base.OnPlayerExitServer(auth);
|
||||
|
||||
NodeContext.GetHostEntities().ForEach(child =>
|
||||
{
|
||||
if (child.Controller.Auth == auth)
|
||||
{
|
||||
child.DelayDestroy();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user