aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server
diff options
context:
space:
mode:
authorMelanie2012-02-23 01:40:30 +0000
committerMelanie2012-02-23 01:40:30 +0000
commit1dfc9902649bfb4f02340644a0589fe139a3322a (patch)
tree631a932e9317c50d96c7dbaa91ffc675421a9b48 /OpenSim/Server
parentRestore the taskItem null check that I accidentally blatted in 5397a6d (diff)
downloadopensim-SC_OLD-1dfc9902649bfb4f02340644a0589fe139a3322a.zip
opensim-SC_OLD-1dfc9902649bfb4f02340644a0589fe139a3322a.tar.gz
opensim-SC_OLD-1dfc9902649bfb4f02340644a0589fe139a3322a.tar.bz2
opensim-SC_OLD-1dfc9902649bfb4f02340644a0589fe139a3322a.tar.xz
Add a position parameter to region crossing of objects. This avoids the
potential bad update that places an object at the opposite side of the origin sim for a moment before actually crossing it. Especially important in grids like OSG where lag between sims is high.
Diffstat (limited to 'OpenSim/Server')
-rw-r--r--OpenSim/Server/Handlers/Simulation/ObjectHandlers.cs10
1 files changed, 7 insertions, 3 deletions
diff --git a/OpenSim/Server/Handlers/Simulation/ObjectHandlers.cs b/OpenSim/Server/Handlers/Simulation/ObjectHandlers.cs
index 984b843..f0d8f69 100644
--- a/OpenSim/Server/Handlers/Simulation/ObjectHandlers.cs
+++ b/OpenSim/Server/Handlers/Simulation/ObjectHandlers.cs
@@ -136,6 +136,8 @@ namespace OpenSim.Server.Handlers.Simulation
136 int x = 0, y = 0; 136 int x = 0, y = 0;
137 UUID uuid = UUID.Zero; 137 UUID uuid = UUID.Zero;
138 string regionname = string.Empty; 138 string regionname = string.Empty;
139 Vector3 newPosition = Vector3.Zero;
140
139 if (args.ContainsKey("destination_x") && args["destination_x"] != null) 141 if (args.ContainsKey("destination_x") && args["destination_x"] != null)
140 Int32.TryParse(args["destination_x"].AsString(), out x); 142 Int32.TryParse(args["destination_x"].AsString(), out x);
141 if (args.ContainsKey("destination_y") && args["destination_y"] != null) 143 if (args.ContainsKey("destination_y") && args["destination_y"] != null)
@@ -144,6 +146,8 @@ namespace OpenSim.Server.Handlers.Simulation
144 UUID.TryParse(args["destination_uuid"].AsString(), out uuid); 146 UUID.TryParse(args["destination_uuid"].AsString(), out uuid);
145 if (args.ContainsKey("destination_name") && args["destination_name"] != null) 147 if (args.ContainsKey("destination_name") && args["destination_name"] != null)
146 regionname = args["destination_name"].ToString(); 148 regionname = args["destination_name"].ToString();
149 if (args.ContainsKey("new_position") && args["new_position"] != null)
150 Vector3.TryParse(args["new_position"], out newPosition);
147 151
148 GridRegion destination = new GridRegion(); 152 GridRegion destination = new GridRegion();
149 destination.RegionID = uuid; 153 destination.RegionID = uuid;
@@ -199,7 +203,7 @@ namespace OpenSim.Server.Handlers.Simulation
199 try 203 try
200 { 204 {
201 // This is the meaning of POST object 205 // This is the meaning of POST object
202 result = CreateObject(destination, sog); 206 result = CreateObject(destination, newPosition, sog);
203 } 207 }
204 catch (Exception e) 208 catch (Exception e)
205 { 209 {
@@ -211,9 +215,9 @@ namespace OpenSim.Server.Handlers.Simulation
211 } 215 }
212 216
213 // subclasses can override this 217 // subclasses can override this
214 protected virtual bool CreateObject(GridRegion destination, ISceneObject sog) 218 protected virtual bool CreateObject(GridRegion destination, Vector3 newPosition, ISceneObject sog)
215 { 219 {
216 return m_SimulationService.CreateObject(destination, sog, false); 220 return m_SimulationService.CreateObject(destination, newPosition, sog, false);
217 } 221 }
218 222
219 protected virtual void DoObjectPut(Hashtable request, Hashtable responsedata, UUID regionID) 223 protected virtual void DoObjectPut(Hashtable request, Hashtable responsedata, UUID regionID)