Пример #1
0
        public void UpdateGhost(SActor actor)
        {
            if (actor.EndState <= Timing.sInstance.GetFrameStartTime())
            {
                actor.mActorController?.GetUnprocessedMoveList().Clear();

                actor.SetLocation(actor.TargetPos);
                actor.SetVelocity(Vector3.zero);
                actor.degree = actor.SpawnAngle;
                actor.HiddenMapObjects.Clear();
                actor.killPlayerId = 0;

                LogHelper.LogInfo($"end ghost pos {actor.TargetPos.ToString()}");
                ChangeState(actor, UpdateIdle, ActorState.Idle, 0f);
                NetworkManagerServer.sInstance.SetStateDirty(actor.GetNetworkId(), actor.WorldId, (uint)Actor.ReplicationState.Spawn);

                actor.AddSpellMySelf(core.BuffType.Invincible);
                World.Instance(actor.WorldId).GameMode.game_mode.OnTrigger(actor.WorldId, actor.GetPlayerId(), PlayPointID.PlayerReborn);
            }
        }