#author("2024-09-02T05:23:46+00:00","default:iseki","iseki") *** SIMの境界で,座標な不正になった場合に,強制的に ''emergencyPos'' [すなわち(128,128,128)] へ移動させられる件 [#v18a1226] - OpenSim/Region/Framework/Scenes/ScenePresence.cs - MakeRootAgent() if (pos.X < 0 || pos.X >= (int)Constants.RegionSize || pos.Y < 0 || pos.Y >= (int)Constants.RegionSize || pos.Z < 0) { m_log.WarnFormat("[SCENE PRESENCE]: MakeRootAgent() was given an illegal position of {0} for avatar {1}, {2}.", pos, Name, UUID); if (pos.X < 0) pos.X = 0; else if (pos.X >= (int)Constants.RegionSize) pos.X = (int)Constants.RegionSize - 1; if (pos.Y < 0) pos.Y = 0; else if (pos.Y >= (int)Constants.RegionSize) pos.Y = (int)Constants.RegionSize - 1; if (pos.Z < 0) pos.Z = 0; } /* if (pos.X < 0 || pos.X >= (int)Constants.RegionSize || pos.Y < 0 || pos.Y >= (int)Constants.RegionSize || pos.Z < 0) { Vector3 emergencyPos = new Vector3(((int)Constants.RegionSize * 0.5f), ((int)Constants.RegionSize * 0.5f), 128); m_log.WarnFormat( "[SCENE PRESENCE]: MakeRootAgent() was given an illegal position of {0} for avatar {1}, {2}. Substituting {3}", pos, Name, UUID, emergencyPos); pos = emergencyPos; } */ #author("2024-09-02T05:24:27+00:00","default:iseki","iseki") *** 上記の様に変更した場合,CrossToNewRegion() でエラーが出る場合があるので修正する. [#j48d41ec] - OpenSim/Region/Framework/Scenes/ScenePresence.cs - CrossToNewRegion() /// <summary> /// Moves the agent outside the region bounds /// Tells neighbor region that we're crossing to it /// If the neighbor accepts, remove the agent's viewable avatar from this scene /// set them to a child agent. /// </summary> protected void CrossToNewRegion() { // Fumi.Iseki if (m_scene==null || m_physicsActor==null) return; InTransit(); m_scene.CrossAgentToNewRegion(this, m_physicsActor.Flying); }