internal static void Execute(object msg, User user) { Msg_CR_Enter enter_msg = msg as Msg_CR_Enter; if (enter_msg == null) { return; } LogSys.Log(LOG_TYPE.DEBUG, "user {0}({1},{2},{3}) enter.", user.RoleId, user.GetKey(), user.Guid, user.Name); user.UserControlState = (int)UserControlState.User; user.IsEntered = true; Room room = user.OwnRoom; if (null != room) { Scene scene = room.ActiveScene; if (null != scene) { EntityInfo userInfo = user.Info; if (null != userInfo) { if (scene.SceneState == SceneState.Running) { scene.SyncForNewUser(user); scene.StorySystem.SendMessage("user_enter_scene", userInfo.GetId(), userInfo.GetUnitId(), userInfo.GetCampId(), userInfo.GetMovementStateInfo().PositionX, userInfo.GetMovementStateInfo().PositionZ); } } } } }