diff options
author | Diva Canto | 2013-08-09 08:31:30 -0700 |
---|---|---|
committer | Diva Canto | 2013-08-09 08:31:30 -0700 |
commit | 2cdcf62b48fde64d1ad11a4db46afeddff1a0770 (patch) | |
tree | 76d2f53def5e6cd05b9b9e5f3e3e1e759c29e87e /OpenSim/Region | |
parent | Go easy on enforcing session ids in position updates (diff) | |
parent | BulletSim: adjust avatar position when the avatar's size is changed. (diff) | |
download | opensim-SC_OLD-2cdcf62b48fde64d1ad11a4db46afeddff1a0770.zip opensim-SC_OLD-2cdcf62b48fde64d1ad11a4db46afeddff1a0770.tar.gz opensim-SC_OLD-2cdcf62b48fde64d1ad11a4db46afeddff1a0770.tar.bz2 opensim-SC_OLD-2cdcf62b48fde64d1ad11a4db46afeddff1a0770.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region')
10 files changed, 159 insertions, 79 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 9dcc8da..1cdd868 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -172,6 +172,13 @@ namespace OpenSim | |||
172 | if (userStatsURI != String.Empty) | 172 | if (userStatsURI != String.Empty) |
173 | MainServer.Instance.AddStreamHandler(new OpenSim.UXSimStatusHandler(this)); | 173 | MainServer.Instance.AddStreamHandler(new OpenSim.UXSimStatusHandler(this)); |
174 | 174 | ||
175 | if (managedStatsURI != String.Empty) | ||
176 | { | ||
177 | string urlBase = String.Format("/{0}/", managedStatsURI); | ||
178 | MainServer.Instance.AddHTTPHandler(urlBase, StatsManager.HandleStatsRequest); | ||
179 | m_log.InfoFormat("[OPENSIM] Enabling remote managed stats fetch. URL = {0}", urlBase); | ||
180 | } | ||
181 | |||
175 | if (m_console is RemoteConsole) | 182 | if (m_console is RemoteConsole) |
176 | { | 183 | { |
177 | if (m_consolePort == 0) | 184 | if (m_consolePort == 0) |
@@ -348,18 +355,6 @@ namespace OpenSim | |||
348 | m_console.Commands.AddCommand("Regions", false, "delete-region", | 355 | m_console.Commands.AddCommand("Regions", false, "delete-region", |
349 | "delete-region <name>", | 356 | "delete-region <name>", |
350 | "Delete a region from disk", RunCommand); | 357 | "Delete a region from disk", RunCommand); |
351 | |||
352 | m_console.Commands.AddCommand("General", false, "modules list", | ||
353 | "modules list", | ||
354 | "List modules", HandleModules); | ||
355 | |||
356 | m_console.Commands.AddCommand("General", false, "modules load", | ||
357 | "modules load <name>", | ||
358 | "Load a module", HandleModules); | ||
359 | |||
360 | m_console.Commands.AddCommand("General", false, "modules unload", | ||
361 | "modules unload <name>", | ||
362 | "Unload a module", HandleModules); | ||
363 | } | 358 | } |
364 | 359 | ||
365 | protected override void ShutdownSpecific() | 360 | protected override void ShutdownSpecific() |
@@ -557,34 +552,6 @@ namespace OpenSim | |||
557 | } | 552 | } |
558 | 553 | ||
559 | /// <summary> | 554 | /// <summary> |
560 | /// Load, Unload, and list Region modules in use | ||
561 | /// </summary> | ||
562 | /// <param name="module"></param> | ||
563 | /// <param name="cmd"></param> | ||
564 | private void HandleModules(string module, string[] cmd) | ||
565 | { | ||
566 | List<string> args = new List<string>(cmd); | ||
567 | args.RemoveAt(0); | ||
568 | string[] cmdparams = args.ToArray(); | ||
569 | |||
570 | if (cmdparams.Length > 0) | ||
571 | { | ||
572 | switch (cmdparams[0].ToLower()) | ||
573 | { | ||
574 | case "list": | ||
575 | //TODO: Convert to new region modules | ||
576 | break; | ||
577 | case "unload": | ||
578 | //TODO: Convert to new region modules | ||
579 | break; | ||
580 | case "load": | ||
581 | //TODO: Convert to new region modules | ||
582 | break; | ||
583 | } | ||
584 | } | ||
585 | } | ||
586 | |||
587 | /// <summary> | ||
588 | /// Runs commands issued by the server console from the operator | 555 | /// Runs commands issued by the server console from the operator |
589 | /// </summary> | 556 | /// </summary> |
590 | /// <param name="command">The first argument of the parameter (the command)</param> | 557 | /// <param name="command">The first argument of the parameter (the command)</param> |
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index f0c088a..b032e7f 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -75,6 +75,7 @@ namespace OpenSim | |||
75 | protected int proxyOffset = 0; | 75 | protected int proxyOffset = 0; |
76 | 76 | ||
77 | public string userStatsURI = String.Empty; | 77 | public string userStatsURI = String.Empty; |
78 | public string managedStatsURI = String.Empty; | ||
78 | 79 | ||
79 | protected bool m_autoCreateClientStack = true; | 80 | protected bool m_autoCreateClientStack = true; |
80 | 81 | ||
@@ -188,6 +189,7 @@ namespace OpenSim | |||
188 | CreatePIDFile(pidFile); | 189 | CreatePIDFile(pidFile); |
189 | 190 | ||
190 | userStatsURI = startupConfig.GetString("Stats_URI", String.Empty); | 191 | userStatsURI = startupConfig.GetString("Stats_URI", String.Empty); |
192 | managedStatsURI = startupConfig.GetString("ManagedStatsRemoteFetchURI", String.Empty); | ||
191 | } | 193 | } |
192 | 194 | ||
193 | // Load the simulation data service | 195 | // Load the simulation data service |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 8b2440a..0dbce2f 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -327,7 +327,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
327 | private PriorityQueue m_entityProps; | 327 | private PriorityQueue m_entityProps; |
328 | private Prioritizer m_prioritizer; | 328 | private Prioritizer m_prioritizer; |
329 | private bool m_disableFacelights = false; | 329 | private bool m_disableFacelights = false; |
330 | 330 | private volatile bool m_justEditedTerrain = false; | |
331 | /// <value> | 331 | /// <value> |
332 | /// List used in construction of data blocks for an object update packet. This is to stop us having to | 332 | /// List used in construction of data blocks for an object update packet. This is to stop us having to |
333 | /// continually recreate it. | 333 | /// continually recreate it. |
@@ -1239,9 +1239,32 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1239 | LLHeightFieldMoronize(map); | 1239 | LLHeightFieldMoronize(map); |
1240 | 1240 | ||
1241 | LayerDataPacket layerpack = TerrainCompressor.CreateLandPacket(heightmap, patches); | 1241 | LayerDataPacket layerpack = TerrainCompressor.CreateLandPacket(heightmap, patches); |
1242 | layerpack.Header.Reliable = true; | 1242 | |
1243 | // When a user edits the terrain, so much data is sent, the data queues up fast and presents a sub optimal editing experience. | ||
1244 | // To alleviate this issue, when the user edits the terrain, we start skipping the queues until they're done editing the terrain. | ||
1245 | // We also make them unreliable because it's extremely likely that multiple packets will be sent for a terrain patch area | ||
1246 | // invalidating previous packets for that area. | ||
1243 | 1247 | ||
1244 | OutPacket(layerpack, ThrottleOutPacketType.Land); | 1248 | // It's possible for an editing user to flood themselves with edited packets but the majority of use cases are such that only a |
1249 | // tiny percentage of users will be editing the terrain. Other, non-editing users will see the edits much slower. | ||
1250 | |||
1251 | // One last note on this topic, by the time users are going to be editing the terrain, it's extremely likely that the sim will | ||
1252 | // have rezzed already and therefore this is not likely going to cause any additional issues with lost packets, objects or terrain | ||
1253 | // patches. | ||
1254 | |||
1255 | // m_justEditedTerrain is volatile, so test once and duplicate two affected statements so we only have one cache miss. | ||
1256 | if (m_justEditedTerrain) | ||
1257 | { | ||
1258 | layerpack.Header.Reliable = false; | ||
1259 | OutPacket(layerpack, | ||
1260 | ThrottleOutPacketType.Unknown ); | ||
1261 | } | ||
1262 | else | ||
1263 | { | ||
1264 | layerpack.Header.Reliable = true; | ||
1265 | OutPacket(layerpack, | ||
1266 | ThrottleOutPacketType.Land); | ||
1267 | } | ||
1245 | } | 1268 | } |
1246 | catch (Exception e) | 1269 | catch (Exception e) |
1247 | { | 1270 | { |
@@ -6263,6 +6286,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6263 | //m_log.Info("[LAND]: LAND:" + modify.ToString()); | 6286 | //m_log.Info("[LAND]: LAND:" + modify.ToString()); |
6264 | if (modify.ParcelData.Length > 0) | 6287 | if (modify.ParcelData.Length > 0) |
6265 | { | 6288 | { |
6289 | // Note: the ModifyTerrain event handler sends out updated packets before the end of this event. Therefore, | ||
6290 | // a simple boolean value should work and perhaps queue up just a few terrain patch packets at the end of the edit. | ||
6291 | m_justEditedTerrain = true; // Prevent terrain packet (Land layer) from being queued, make it unreliable | ||
6266 | if (OnModifyTerrain != null) | 6292 | if (OnModifyTerrain != null) |
6267 | { | 6293 | { |
6268 | for (int i = 0; i < modify.ParcelData.Length; i++) | 6294 | for (int i = 0; i < modify.ParcelData.Length; i++) |
@@ -6278,6 +6304,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6278 | } | 6304 | } |
6279 | } | 6305 | } |
6280 | } | 6306 | } |
6307 | m_justEditedTerrain = false; // Queue terrain packet (Land layer) if necessary, make it reliable again | ||
6281 | } | 6308 | } |
6282 | 6309 | ||
6283 | return true; | 6310 | return true; |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 96cd6b9..01ef710 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -688,8 +688,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
688 | if (version.Equals("SIMULATION/0.2")) | 688 | if (version.Equals("SIMULATION/0.2")) |
689 | TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason); | 689 | TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason); |
690 | else | 690 | else |
691 | TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason); | 691 | TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason); |
692 | |||
693 | } | 692 | } |
694 | 693 | ||
695 | private void TransferAgent_V1(ScenePresence sp, AgentCircuitData agentCircuit, GridRegion reg, GridRegion finalDestination, | 694 | private void TransferAgent_V1(ScenePresence sp, AgentCircuitData agentCircuit, GridRegion reg, GridRegion finalDestination, |
@@ -698,7 +697,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
698 | ulong destinationHandle = finalDestination.RegionHandle; | 697 | ulong destinationHandle = finalDestination.RegionHandle; |
699 | AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode); | 698 | AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode); |
700 | 699 | ||
701 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Using TP V1"); | 700 | m_log.DebugFormat( |
701 | "[ENTITY TRANSFER MODULE]: Using TP V1 for {0} going from {1} to {2}", | ||
702 | sp.Name, Scene.Name, finalDestination.RegionName); | ||
703 | |||
702 | // Let's create an agent there if one doesn't exist yet. | 704 | // Let's create an agent there if one doesn't exist yet. |
703 | // NOTE: logout will always be false for a non-HG teleport. | 705 | // NOTE: logout will always be false for a non-HG teleport. |
704 | bool logout = false; | 706 | bool logout = false; |
@@ -956,6 +958,27 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
956 | return; | 958 | return; |
957 | } | 959 | } |
958 | 960 | ||
961 | if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Cancelling) | ||
962 | { | ||
963 | m_interRegionTeleportCancels.Value++; | ||
964 | |||
965 | m_log.DebugFormat( | ||
966 | "[ENTITY TRANSFER MODULE]: Cancelled teleport of {0} to {1} from {2} after CreateAgent on client request", | ||
967 | sp.Name, finalDestination.RegionName, sp.Scene.Name); | ||
968 | |||
969 | return; | ||
970 | } | ||
971 | else if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Aborting) | ||
972 | { | ||
973 | m_interRegionTeleportAborts.Value++; | ||
974 | |||
975 | m_log.DebugFormat( | ||
976 | "[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} after CreateAgent due to previous client close.", | ||
977 | sp.Name, finalDestination.RegionName, sp.Scene.Name); | ||
978 | |||
979 | return; | ||
980 | } | ||
981 | |||
959 | // Past this point we have to attempt clean up if the teleport fails, so update transfer state. | 982 | // Past this point we have to attempt clean up if the teleport fails, so update transfer state. |
960 | m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring); | 983 | m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring); |
961 | 984 | ||
@@ -1058,20 +1081,22 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1058 | if (!sp.DoNotCloseAfterTeleport) | 1081 | if (!sp.DoNotCloseAfterTeleport) |
1059 | { | 1082 | { |
1060 | // OK, it got this agent. Let's close everything | 1083 | // OK, it got this agent. Let's close everything |
1061 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Closing in agent {0} in region {1}", sp.Name, Scene.RegionInfo.RegionName); | 1084 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Closing in agent {0} in region {1}", sp.Name, Scene.Name); |
1062 | sp.CloseChildAgents(newRegionX, newRegionY); | 1085 | sp.CloseChildAgents(newRegionX, newRegionY); |
1063 | sp.Scene.IncomingCloseAgent(sp.UUID, false); | 1086 | sp.Scene.IncomingCloseAgent(sp.UUID, false); |
1064 | 1087 | ||
1065 | } | 1088 | } |
1066 | else | 1089 | else |
1067 | { | 1090 | { |
1068 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Not closing agent {0}, user is back in {0}", sp.Name, Scene.RegionInfo.RegionName); | 1091 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Not closing agent {0}, user is back in {0}", sp.Name, Scene.Name); |
1069 | sp.DoNotCloseAfterTeleport = false; | 1092 | sp.DoNotCloseAfterTeleport = false; |
1070 | } | 1093 | } |
1071 | } | 1094 | } |
1072 | else | 1095 | else |
1096 | { | ||
1073 | // now we have a child agent in this region. | 1097 | // now we have a child agent in this region. |
1074 | sp.Reset(); | 1098 | sp.Reset(); |
1099 | } | ||
1075 | } | 1100 | } |
1076 | 1101 | ||
1077 | /// <summary> | 1102 | /// <summary> |
diff --git a/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs b/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs index a515346..6da2222 100644 --- a/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs | |||
@@ -45,6 +45,7 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms | |||
45 | { | 45 | { |
46 | private static readonly ILog m_log = | 46 | private static readonly ILog m_log = |
47 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 47 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
48 | private static string LogHeader = "[MODULE COMMS]"; | ||
48 | 49 | ||
49 | private Dictionary<string,object> m_constants = new Dictionary<string,object>(); | 50 | private Dictionary<string,object> m_constants = new Dictionary<string,object>(); |
50 | 51 | ||
@@ -148,7 +149,7 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms | |||
148 | MethodInfo mi = GetMethodInfoFromType(target.GetType(), meth, true); | 149 | MethodInfo mi = GetMethodInfoFromType(target.GetType(), meth, true); |
149 | if (mi == null) | 150 | if (mi == null) |
150 | { | 151 | { |
151 | m_log.WarnFormat("[MODULE COMMANDS] Failed to register method {0}", meth); | 152 | m_log.WarnFormat("{0} Failed to register method {1}", LogHeader, meth); |
152 | return; | 153 | return; |
153 | } | 154 | } |
154 | 155 | ||
@@ -165,7 +166,7 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms | |||
165 | { | 166 | { |
166 | // m_log.DebugFormat("[MODULE COMMANDS] Register method {0} from type {1}", mi.Name, (target is Type) ? ((Type)target).Name : target.GetType().Name); | 167 | // m_log.DebugFormat("[MODULE COMMANDS] Register method {0} from type {1}", mi.Name, (target is Type) ? ((Type)target).Name : target.GetType().Name); |
167 | 168 | ||
168 | Type delegateType; | 169 | Type delegateType = typeof(void); |
169 | List<Type> typeArgs = mi.GetParameters() | 170 | List<Type> typeArgs = mi.GetParameters() |
170 | .Select(p => p.ParameterType) | 171 | .Select(p => p.ParameterType) |
171 | .ToList(); | 172 | .ToList(); |
@@ -176,8 +177,16 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms | |||
176 | } | 177 | } |
177 | else | 178 | else |
178 | { | 179 | { |
179 | typeArgs.Add(mi.ReturnType); | 180 | try |
180 | delegateType = Expression.GetFuncType(typeArgs.ToArray()); | 181 | { |
182 | typeArgs.Add(mi.ReturnType); | ||
183 | delegateType = Expression.GetFuncType(typeArgs.ToArray()); | ||
184 | } | ||
185 | catch (Exception e) | ||
186 | { | ||
187 | m_log.ErrorFormat("{0} Failed to create function signature. Most likely more than 5 parameters. Method={1}. Error={2}", | ||
188 | LogHeader, mi.Name, e); | ||
189 | } | ||
181 | } | 190 | } |
182 | 191 | ||
183 | Delegate fcall; | 192 | Delegate fcall; |
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs index 4d49794..173b603 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs | |||
@@ -76,6 +76,13 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
76 | " that coordinate. Corner # SW = 0, NW = 1, SE = 2, NE = 3, all corners = -1.", | 76 | " that coordinate. Corner # SW = 0, NW = 1, SE = 2, NE = 3, all corners = -1.", |
77 | consoleSetTerrainHeights); | 77 | consoleSetTerrainHeights); |
78 | 78 | ||
79 | m_module.Scene.AddCommand("Regions", m_module, "set water height", | ||
80 | "set water height <height> [<x>] [<y>]", | ||
81 | "Sets the water height in meters. If <x> and <y> are specified, it will only set it on regions with a matching coordinate. " + | ||
82 | "Specify -1 in <x> or <y> to wildcard that coordinate.", | ||
83 | consoleSetWaterHeight); | ||
84 | |||
85 | |||
79 | m_module.Scene.AddCommand( | 86 | m_module.Scene.AddCommand( |
80 | "Estates", m_module, "estate show", "estate show", "Shows all estates on the simulator.", ShowEstatesCommand); | 87 | "Estates", m_module, "estate show", "estate show", "Shows all estates on the simulator.", ShowEstatesCommand); |
81 | } | 88 | } |
@@ -121,7 +128,29 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
121 | } | 128 | } |
122 | } | 129 | } |
123 | } | 130 | } |
124 | 131 | protected void consoleSetWaterHeight(string module, string[] args) | |
132 | { | ||
133 | string heightstring = args[3]; | ||
134 | |||
135 | int x = (args.Length > 4 ? int.Parse(args[4]) : -1); | ||
136 | int y = (args.Length > 5 ? int.Parse(args[5]) : -1); | ||
137 | |||
138 | if (x == -1 || m_module.Scene.RegionInfo.RegionLocX == x) | ||
139 | { | ||
140 | if (y == -1 || m_module.Scene.RegionInfo.RegionLocY == y) | ||
141 | { | ||
142 | double selectedheight = double.Parse(heightstring); | ||
143 | |||
144 | m_log.Debug("[ESTATEMODULE]: Setting water height in " + m_module.Scene.RegionInfo.RegionName + " to " + | ||
145 | string.Format(" {0}", selectedheight)); | ||
146 | m_module.Scene.RegionInfo.RegionSettings.WaterHeight = selectedheight; | ||
147 | |||
148 | m_module.Scene.RegionInfo.RegionSettings.Save(); | ||
149 | m_module.TriggerRegionInfoChange(); | ||
150 | m_module.sendRegionHandshakeToAll(); | ||
151 | } | ||
152 | } | ||
153 | } | ||
125 | protected void consoleSetTerrainHeights(string module, string[] args) | 154 | protected void consoleSetTerrainHeights(string module, string[] args) |
126 | { | 155 | { |
127 | string num = args[3]; | 156 | string num = args[3]; |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 1633e07..b97a0f6 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -4222,36 +4222,42 @@ namespace OpenSim.Region.Framework.Scenes | |||
4222 | } | 4222 | } |
4223 | 4223 | ||
4224 | // We have to wait until the viewer contacts this region | 4224 | // We have to wait until the viewer contacts this region |
4225 | // after receiving the EnableSimulator HTTP Event Queue message. This triggers the viewer to send | 4225 | // after receiving the EnableSimulator HTTP Event Queue message (for the v1 teleport protocol) |
4226 | // or TeleportFinish (for the v2 teleport protocol). This triggers the viewer to send | ||
4226 | // a UseCircuitCode packet which in turn calls AddNewClient which finally creates the ScenePresence. | 4227 | // a UseCircuitCode packet which in turn calls AddNewClient which finally creates the ScenePresence. |
4227 | ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID); | 4228 | ScenePresence sp = WaitGetScenePresence(cAgentData.AgentID); |
4228 | 4229 | ||
4229 | if (childAgentUpdate != null) | 4230 | if (sp != null) |
4230 | { | 4231 | { |
4231 | if (cAgentData.SessionID != childAgentUpdate.ControllingClient.SessionId) | 4232 | if (cAgentData.SessionID != sp.ControllingClient.SessionId) |
4232 | { | 4233 | { |
4233 | m_log.WarnFormat("[SCENE]: Attempt to update agent {0} with invalid session id {1} (possibly from simulator in older version; tell them to update).", childAgentUpdate.UUID, cAgentData.SessionID); | 4234 | m_log.WarnFormat( |
4235 | "[SCENE]: Attempt to update agent {0} with invalid session id {1} (possibly from simulator in older version; tell them to update).", | ||
4236 | sp.UUID, cAgentData.SessionID); | ||
4237 | |||
4234 | Console.WriteLine(String.Format("[SCENE]: Attempt to update agent {0} ({1}) with invalid session id {2}", | 4238 | Console.WriteLine(String.Format("[SCENE]: Attempt to update agent {0} ({1}) with invalid session id {2}", |
4235 | childAgentUpdate.UUID, childAgentUpdate.ControllingClient.SessionId, cAgentData.SessionID)); | 4239 | sp.UUID, sp.ControllingClient.SessionId, cAgentData.SessionID)); |
4236 | } | 4240 | } |
4237 | 4241 | ||
4238 | childAgentUpdate.ChildAgentDataUpdate(cAgentData); | 4242 | sp.ChildAgentDataUpdate(cAgentData); |
4239 | 4243 | ||
4240 | int ntimes = 20; | 4244 | int ntimes = 20; |
4241 | if (cAgentData.SenderWantsToWaitForRoot) | 4245 | if (cAgentData.SenderWantsToWaitForRoot) |
4242 | { | 4246 | { |
4243 | while (childAgentUpdate.IsChildAgent && ntimes-- > 0) | 4247 | while (sp.IsChildAgent && ntimes-- > 0) |
4244 | Thread.Sleep(1000); | 4248 | Thread.Sleep(1000); |
4245 | 4249 | ||
4246 | m_log.DebugFormat( | 4250 | m_log.DebugFormat( |
4247 | "[SCENE]: Found presence {0} {1} {2} in {3} after {4} waits", | 4251 | "[SCENE]: Found presence {0} {1} {2} in {3} after {4} waits", |
4248 | childAgentUpdate.Name, childAgentUpdate.UUID, childAgentUpdate.IsChildAgent ? "child" : "root", RegionInfo.RegionName, 20 - ntimes); | 4252 | sp.Name, sp.UUID, sp.IsChildAgent ? "child" : "root", Name, 20 - ntimes); |
4249 | 4253 | ||
4250 | if (childAgentUpdate.IsChildAgent) | 4254 | if (sp.IsChildAgent) |
4251 | return false; | 4255 | return false; |
4252 | } | 4256 | } |
4257 | |||
4253 | return true; | 4258 | return true; |
4254 | } | 4259 | } |
4260 | |||
4255 | return false; | 4261 | return false; |
4256 | } | 4262 | } |
4257 | 4263 | ||
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 0ba2dab..1b8c276 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -285,9 +285,23 @@ namespace OpenSim.Region.Framework.Scenes | |||
285 | /// </summary> | 285 | /// </summary> |
286 | private Vector3 posLastSignificantMove; | 286 | private Vector3 posLastSignificantMove; |
287 | 287 | ||
288 | // For teleports and crossings callbacks | 288 | #region For teleports and crossings callbacks |
289 | string m_callbackURI; | 289 | |
290 | UUID m_originRegionID; | 290 | /// <summary> |
291 | /// In the V1 teleport protocol, the destination simulator sends ReleaseAgent to this address. | ||
292 | /// </summary> | ||
293 | private string m_callbackURI; | ||
294 | |||
295 | public UUID m_originRegionID; | ||
296 | |||
297 | /// <summary> | ||
298 | /// Used by the entity transfer module to signal when the presence should not be closed because a subsequent | ||
299 | /// teleport is reusing the connection. | ||
300 | /// </summary> | ||
301 | /// <remarks>May be refactored or move somewhere else soon.</remarks> | ||
302 | public bool DoNotCloseAfterTeleport { get; set; } | ||
303 | |||
304 | #endregion | ||
291 | 305 | ||
292 | /// <value> | 306 | /// <value> |
293 | /// Script engines present in the scene | 307 | /// Script engines present in the scene |
@@ -717,13 +731,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
717 | } | 731 | } |
718 | } | 732 | } |
719 | 733 | ||
720 | /// <summary> | ||
721 | /// Used by the entity transfer module to signal when the presence should not be closed because a subsequent | ||
722 | /// teleport is reusing the connection. | ||
723 | /// </summary> | ||
724 | /// <remarks>May be refactored or move somewhere else soon.</remarks> | ||
725 | public bool DoNotCloseAfterTeleport { get; set; } | ||
726 | |||
727 | private float m_speedModifier = 1.0f; | 734 | private float m_speedModifier = 1.0f; |
728 | 735 | ||
729 | public float SpeedModifier | 736 | public float SpeedModifier |
@@ -1325,14 +1332,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1325 | int count = 20; | 1332 | int count = 20; |
1326 | while (m_originRegionID.Equals(UUID.Zero) && count-- > 0) | 1333 | while (m_originRegionID.Equals(UUID.Zero) && count-- > 0) |
1327 | { | 1334 | { |
1328 | m_log.DebugFormat("[SCENE PRESENCE]: Agent {0} waiting for update in {1}", client.Name, Scene.RegionInfo.RegionName); | 1335 | m_log.DebugFormat("[SCENE PRESENCE]: Agent {0} waiting for update in {1}", client.Name, Scene.Name); |
1329 | Thread.Sleep(200); | 1336 | Thread.Sleep(200); |
1330 | } | 1337 | } |
1331 | 1338 | ||
1332 | if (m_originRegionID.Equals(UUID.Zero)) | 1339 | if (m_originRegionID.Equals(UUID.Zero)) |
1333 | { | 1340 | { |
1334 | // Movement into region will fail | 1341 | // Movement into region will fail |
1335 | m_log.WarnFormat("[SCENE PRESENCE]: Update agent {0} never arrived", client.Name); | 1342 | m_log.WarnFormat("[SCENE PRESENCE]: Update agent {0} never arrived in {1}", client.Name, Scene.Name); |
1336 | return false; | 1343 | return false; |
1337 | } | 1344 | } |
1338 | 1345 | ||
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs index 58a417e..9af3dce 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs | |||
@@ -96,8 +96,8 @@ public sealed class BSCharacter : BSPhysObject | |||
96 | m_moveActor = new BSActorAvatarMove(PhysScene, this, AvatarMoveActorName); | 96 | m_moveActor = new BSActorAvatarMove(PhysScene, this, AvatarMoveActorName); |
97 | PhysicalActors.Add(AvatarMoveActorName, m_moveActor); | 97 | PhysicalActors.Add(AvatarMoveActorName, m_moveActor); |
98 | 98 | ||
99 | DetailLog("{0},BSCharacter.create,call,size={1},scale={2},density={3},volume={4},mass={5}", | 99 | DetailLog("{0},BSCharacter.create,call,size={1},scale={2},density={3},volume={4},mass={5},pos={6}", |
100 | LocalID, _size, Scale, Density, _avatarVolume, RawMass); | 100 | LocalID, _size, Scale, Density, _avatarVolume, RawMass, pos); |
101 | 101 | ||
102 | // do actual creation in taint time | 102 | // do actual creation in taint time |
103 | PhysScene.TaintedObject("BSCharacter.create", delegate() | 103 | PhysScene.TaintedObject("BSCharacter.create", delegate() |
@@ -190,6 +190,10 @@ public sealed class BSCharacter : BSPhysObject | |||
190 | } | 190 | } |
191 | 191 | ||
192 | set { | 192 | set { |
193 | // This is how much the avatar size is changing. Positive means getting bigger. | ||
194 | // The avatar altitude must be adjusted for this change. | ||
195 | float heightChange = value.Z - _size.Z; | ||
196 | |||
193 | _size = value; | 197 | _size = value; |
194 | // Old versions of ScenePresence passed only the height. If width and/or depth are zero, | 198 | // Old versions of ScenePresence passed only the height. If width and/or depth are zero, |
195 | // replace with the default values. | 199 | // replace with the default values. |
@@ -207,6 +211,10 @@ public sealed class BSCharacter : BSPhysObject | |||
207 | { | 211 | { |
208 | PhysScene.PE.SetLocalScaling(PhysShape.physShapeInfo, Scale); | 212 | PhysScene.PE.SetLocalScaling(PhysShape.physShapeInfo, Scale); |
209 | UpdatePhysicalMassProperties(RawMass, true); | 213 | UpdatePhysicalMassProperties(RawMass, true); |
214 | |||
215 | // Adjust the avatar's position to account for the increase/decrease in size | ||
216 | ForcePosition = new OMV.Vector3(RawPosition.X, RawPosition.Y, RawPosition.Z + heightChange / 2f); | ||
217 | |||
210 | // Make sure this change appears as a property update event | 218 | // Make sure this change appears as a property update event |
211 | PhysScene.PE.PushUpdate(PhysBody); | 219 | PhysScene.PE.PushUpdate(PhysBody); |
212 | } | 220 | } |
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs index 4520171..fcb892a 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs | |||
@@ -570,9 +570,9 @@ public static class BSParam | |||
570 | new ParameterDefn<float>("AvatarHeightLowFudge", "A fudge factor to make small avatars stand on the ground", | 570 | new ParameterDefn<float>("AvatarHeightLowFudge", "A fudge factor to make small avatars stand on the ground", |
571 | -0.2f ), | 571 | -0.2f ), |
572 | new ParameterDefn<float>("AvatarHeightMidFudge", "A fudge distance to adjust average sized avatars to be standing on ground", | 572 | new ParameterDefn<float>("AvatarHeightMidFudge", "A fudge distance to adjust average sized avatars to be standing on ground", |
573 | 0.1f ), | 573 | 0.2f ), |
574 | new ParameterDefn<float>("AvatarHeightHighFudge", "A fudge factor to make tall avatars stand on the ground", | 574 | new ParameterDefn<float>("AvatarHeightHighFudge", "A fudge factor to make tall avatars stand on the ground", |
575 | 0.1f ), | 575 | 0.2f ), |
576 | new ParameterDefn<float>("AvatarContactProcessingThreshold", "Distance from capsule to check for collisions", | 576 | new ParameterDefn<float>("AvatarContactProcessingThreshold", "Distance from capsule to check for collisions", |
577 | 0.1f ), | 577 | 0.1f ), |
578 | new ParameterDefn<float>("AvatarBelowGroundUpCorrectionMeters", "Meters to move avatar up if it seems to be below ground", | 578 | new ParameterDefn<float>("AvatarBelowGroundUpCorrectionMeters", "Meters to move avatar up if it seems to be below ground", |