diff options
author | Melanie | 2012-02-18 22:21:10 +0000 |
---|---|---|
committer | Melanie | 2012-02-18 22:21:10 +0000 |
commit | 985526b662f47404404281a3ef4a35afa607bfbf (patch) | |
tree | cbda3c3003b6f456498f0ee3ec6edfc10b5fd64a /OpenSim/Region | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-985526b662f47404404281a3ef4a35afa607bfbf.zip opensim-SC_OLD-985526b662f47404404281a3ef4a35afa607bfbf.tar.gz opensim-SC_OLD-985526b662f47404404281a3ef4a35afa607bfbf.tar.bz2 opensim-SC_OLD-985526b662f47404404281a3ef4a35afa607bfbf.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
Diffstat (limited to 'OpenSim/Region')
15 files changed, 379 insertions, 64 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 3139112..a79b387 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |||
@@ -903,47 +903,64 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
903 | 903 | ||
904 | private void HandleUseCircuitCode(object o) | 904 | private void HandleUseCircuitCode(object o) |
905 | { | 905 | { |
906 | // DateTime startTime = DateTime.Now; | 906 | IPEndPoint remoteEndPoint = null; |
907 | object[] array = (object[])o; | 907 | IClientAPI client = null; |
908 | UDPPacketBuffer buffer = (UDPPacketBuffer)array[0]; | ||
909 | UseCircuitCodePacket uccp = (UseCircuitCodePacket)array[1]; | ||
910 | |||
911 | m_log.DebugFormat("[LLUDPSERVER]: Handling UseCircuitCode request from {0}", buffer.RemoteEndPoint); | ||
912 | |||
913 | IPEndPoint remoteEndPoint = (IPEndPoint)buffer.RemoteEndPoint; | ||
914 | 908 | ||
915 | AuthenticateResponse sessionInfo; | 909 | try |
916 | if (IsClientAuthorized(uccp, out sessionInfo)) | ||
917 | { | 910 | { |
918 | // Begin the process of adding the client to the simulator | 911 | // DateTime startTime = DateTime.Now; |
919 | IClientAPI client | 912 | object[] array = (object[])o; |
920 | = AddClient( | 913 | UDPPacketBuffer buffer = (UDPPacketBuffer)array[0]; |
921 | uccp.CircuitCode.Code, | 914 | UseCircuitCodePacket uccp = (UseCircuitCodePacket)array[1]; |
922 | uccp.CircuitCode.ID, | 915 | |
923 | uccp.CircuitCode.SessionID, | 916 | m_log.DebugFormat("[LLUDPSERVER]: Handling UseCircuitCode request from {0}", buffer.RemoteEndPoint); |
924 | remoteEndPoint, | 917 | |
925 | sessionInfo); | 918 | remoteEndPoint = (IPEndPoint)buffer.RemoteEndPoint; |
926 | 919 | ||
927 | // Send ack straight away to let the viewer know that the connection is active. | 920 | AuthenticateResponse sessionInfo; |
928 | // The client will be null if it already exists (e.g. if on a region crossing the client sends a use | 921 | if (IsClientAuthorized(uccp, out sessionInfo)) |
929 | // circuit code to the existing child agent. This is not particularly obvious. | 922 | { |
930 | SendAckImmediate(remoteEndPoint, uccp.Header.Sequence); | 923 | // Begin the process of adding the client to the simulator |
931 | 924 | client | |
932 | // We only want to send initial data to new clients, not ones which are being converted from child to root. | 925 | = AddClient( |
933 | if (client != null) | 926 | uccp.CircuitCode.Code, |
934 | client.SceneAgent.SendInitialDataToMe(); | 927 | uccp.CircuitCode.ID, |
928 | uccp.CircuitCode.SessionID, | ||
929 | remoteEndPoint, | ||
930 | sessionInfo); | ||
931 | |||
932 | // Send ack straight away to let the viewer know that the connection is active. | ||
933 | // The client will be null if it already exists (e.g. if on a region crossing the client sends a use | ||
934 | // circuit code to the existing child agent. This is not particularly obvious. | ||
935 | SendAckImmediate(remoteEndPoint, uccp.Header.Sequence); | ||
936 | |||
937 | // We only want to send initial data to new clients, not ones which are being converted from child to root. | ||
938 | if (client != null) | ||
939 | client.SceneAgent.SendInitialDataToMe(); | ||
940 | } | ||
941 | else | ||
942 | { | ||
943 | // Don't create clients for unauthorized requesters. | ||
944 | m_log.WarnFormat( | ||
945 | "[LLUDPSERVER]: Connection request for client {0} connecting with unnotified circuit code {1} from {2}", | ||
946 | uccp.CircuitCode.ID, uccp.CircuitCode.Code, remoteEndPoint); | ||
947 | } | ||
948 | |||
949 | // m_log.DebugFormat( | ||
950 | // "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms", | ||
951 | // buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds); | ||
952 | |||
935 | } | 953 | } |
936 | else | 954 | catch (Exception e) |
937 | { | 955 | { |
938 | // Don't create clients for unauthorized requesters. | 956 | m_log.ErrorFormat( |
939 | m_log.WarnFormat( | 957 | "[LLUDPSERVER]: UseCircuitCode handling from endpoint {0}, client {1} {2} failed. Exception {3}{4}", |
940 | "[LLUDPSERVER]: Connection request for client {0} connecting with unnotified circuit code {1} from {2}", | 958 | remoteEndPoint != null ? remoteEndPoint.ToString() : "n/a", |
941 | uccp.CircuitCode.ID, uccp.CircuitCode.Code, remoteEndPoint); | 959 | client != null ? client.Name : "unknown", |
960 | client != null ? client.AgentId.ToString() : "unknown", | ||
961 | e.Message, | ||
962 | e.StackTrace); | ||
942 | } | 963 | } |
943 | |||
944 | // m_log.DebugFormat( | ||
945 | // "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms", | ||
946 | // buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds); | ||
947 | } | 964 | } |
948 | 965 | ||
949 | /// <summary> | 966 | /// <summary> |
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index c7f4c20..b0cee03 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -496,6 +496,10 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
496 | SetAppearanceAssets(sp.UUID, sp.Appearance); | 496 | SetAppearanceAssets(sp.UUID, sp.Appearance); |
497 | 497 | ||
498 | m_scene.AvatarService.SetAppearance(agentid, sp.Appearance); | 498 | m_scene.AvatarService.SetAppearance(agentid, sp.Appearance); |
499 | |||
500 | // Trigger this here because it's the final step in the set/queue/save process for appearance setting. | ||
501 | // Everything has been updated and stored. Ensures bakes have been persisted (if option is set to persist bakes). | ||
502 | m_scene.EventManager.TriggerAvatarAppearanceChanged(sp); | ||
499 | } | 503 | } |
500 | 504 | ||
501 | private void SetAppearanceAssets(UUID userID, AvatarAppearance appearance) | 505 | private void SetAppearanceAssets(UUID userID, AvatarAppearance appearance) |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 82a035b..6c4c63f 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -565,9 +565,14 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
565 | // "[INVENTORY ACCESS MODULE]: Target of {0} in CreateItemForObject() is {1} {2}", | 565 | // "[INVENTORY ACCESS MODULE]: Target of {0} in CreateItemForObject() is {1} {2}", |
566 | // action, remoteClient.Name, userID); | 566 | // action, remoteClient.Name, userID); |
567 | } | 567 | } |
568 | else if (so.RootPart.OwnerID == so.RootPart.GroupID) | ||
569 | { | ||
570 | // Group owned objects go to the last owner before the object was transferred. | ||
571 | userID = so.RootPart.LastOwnerID; | ||
572 | } | ||
568 | else | 573 | else |
569 | { | 574 | { |
570 | // All returns / deletes go to the object owner | 575 | // Other returns / deletes go to the object owner |
571 | // | 576 | // |
572 | userID = so.RootPart.OwnerID; | 577 | userID = so.RootPart.OwnerID; |
573 | 578 | ||
diff --git a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs index d5b585a..d1d2020 100644 --- a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs +++ b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs | |||
@@ -148,6 +148,113 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests | |||
148 | <OtherParts /> | 148 | <OtherParts /> |
149 | </SceneObjectGroup>"; | 149 | </SceneObjectGroup>"; |
150 | 150 | ||
151 | private string badFloatsXml = @" | ||
152 | <SceneObjectGroup> | ||
153 | <RootPart> | ||
154 | <SceneObjectPart xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema""> | ||
155 | <AllowedDrop>false</AllowedDrop> | ||
156 | <CreatorID><Guid>a6dacf01-4636-4bb9-8a97-30609438af9d</Guid></CreatorID> | ||
157 | <FolderID><Guid>e6a5a05e-e8cc-4816-8701-04165e335790</Guid></FolderID> | ||
158 | <InventorySerial>1</InventorySerial> | ||
159 | <TaskInventory /> | ||
160 | <ObjectFlags>0</ObjectFlags> | ||
161 | <UUID><Guid>e6a5a05e-e8cc-4816-8701-04165e335790</Guid></UUID> | ||
162 | <LocalId>2698615125</LocalId> | ||
163 | <Name>NaughtyPrim</Name> | ||
164 | <Material>0</Material> | ||
165 | <PassTouches>false</PassTouches> | ||
166 | <RegionHandle>1099511628032000</RegionHandle> | ||
167 | <ScriptAccessPin>0</ScriptAccessPin> | ||
168 | <GroupPosition><X>147.23</X><Y>92.698</Y><Z>22.78084</Z></GroupPosition> | ||
169 | <OffsetPosition><X>0</X><Y>0</Y><Z>0</Z></OffsetPosition> | ||
170 | <RotationOffset><X>-4.371139E-08</X><Y>-1</Y><Z>-4.371139E-08</Z><W>0</W></RotationOffset> | ||
171 | <Velocity><X>0</X><Y>0</Y><Z>0</Z></Velocity> | ||
172 | <RotationalVelocity><X>0</X><Y>0</Y><Z>0</Z></RotationalVelocity> | ||
173 | <AngularVelocity><X>0</X><Y>0</Y><Z>0</Z></AngularVelocity> | ||
174 | <Acceleration><X>0</X><Y>0</Y><Z>0</Z></Acceleration> | ||
175 | <Description /> | ||
176 | <Color /> | ||
177 | <Text /> | ||
178 | <SitName /> | ||
179 | <TouchName /> | ||
180 | <LinkNum>0</LinkNum> | ||
181 | <ClickAction>0</ClickAction> | ||
182 | <Shape> | ||
183 | <ProfileCurve>1</ProfileCurve> | ||
184 | <TextureEntry>AAAAAAAAERGZmQAAAAAABQCVlZUAAAAAQEAAAABAQAAAAAAAAAAAAAAAAAAAAA==</TextureEntry> | ||
185 | <ExtraParams>AA==</ExtraParams> | ||
186 | <PathBegin>0</PathBegin> | ||
187 | <PathCurve>16</PathCurve> | ||
188 | <PathEnd>0</PathEnd> | ||
189 | <PathRadiusOffset>0</PathRadiusOffset> | ||
190 | <PathRevolutions>0</PathRevolutions> | ||
191 | <PathScaleX>100</PathScaleX> | ||
192 | <PathScaleY>100</PathScaleY> | ||
193 | <PathShearX>0</PathShearX> | ||
194 | <PathShearY>0</PathShearY> | ||
195 | <PathSkew>0</PathSkew> | ||
196 | <PathTaperX>0</PathTaperX> | ||
197 | <PathTaperY>0</PathTaperY> | ||
198 | <PathTwist>0</PathTwist> | ||
199 | <PathTwistBegin>0</PathTwistBegin> | ||
200 | <PCode>9</PCode> | ||
201 | <ProfileBegin>0</ProfileBegin> | ||
202 | <ProfileEnd>0</ProfileEnd> | ||
203 | <ProfileHollow>0</ProfileHollow> | ||
204 | <Scale><X>10</X><Y>10</Y><Z>0.5</Z></Scale> | ||
205 | <State>0</State> | ||
206 | <ProfileShape>Square</ProfileShape> | ||
207 | <HollowShape>Same</HollowShape> | ||
208 | <SculptTexture><Guid>00000000-0000-0000-0000-000000000000</Guid></SculptTexture> | ||
209 | <SculptType>0</SculptType><SculptData /> | ||
210 | <FlexiSoftness>0</FlexiSoftness> | ||
211 | <FlexiTension>0,5</FlexiTension> | ||
212 | <FlexiDrag>yo mamma</FlexiDrag> | ||
213 | <FlexiGravity>0</FlexiGravity> | ||
214 | <FlexiWind>0</FlexiWind> | ||
215 | <FlexiForceX>0</FlexiForceX> | ||
216 | <FlexiForceY>0</FlexiForceY> | ||
217 | <FlexiForceZ>0</FlexiForceZ> | ||
218 | <LightColorR>0</LightColorR> | ||
219 | <LightColorG>0</LightColorG> | ||
220 | <LightColorB>0</LightColorB> | ||
221 | <LightColorA>1</LightColorA> | ||
222 | <LightRadius>0</LightRadius> | ||
223 | <LightCutoff>0</LightCutoff> | ||
224 | <LightFalloff>0</LightFalloff> | ||
225 | <LightIntensity>1</LightIntensity> | ||
226 | <FlexiEntry>false</FlexiEntry> | ||
227 | <LightEntry>false</LightEntry> | ||
228 | <SculptEntry>false</SculptEntry> | ||
229 | </Shape> | ||
230 | <Scale><X>10</X><Y>10</Y><Z>0.5</Z></Scale> | ||
231 | <UpdateFlag>0</UpdateFlag> | ||
232 | <SitTargetOrientation><X>0</X><Y>0</Y><Z>0</Z><W>1</W></SitTargetOrientation> | ||
233 | <SitTargetPosition><X>0</X><Y>0</Y><Z>0</Z></SitTargetPosition> | ||
234 | <SitTargetPositionLL><X>0</X><Y>0</Y><Z>0</Z></SitTargetPositionLL> | ||
235 | <SitTargetOrientationLL><X>0</X><Y>0</Y><Z>0</Z><W>1</W></SitTargetOrientationLL> | ||
236 | <ParentID>0</ParentID> | ||
237 | <CreationDate>1211330445</CreationDate> | ||
238 | <Category>0</Category> | ||
239 | <SalePrice>0</SalePrice> | ||
240 | <ObjectSaleType>0</ObjectSaleType> | ||
241 | <OwnershipCost>0</OwnershipCost> | ||
242 | <GroupID><Guid>00000000-0000-0000-0000-000000000000</Guid></GroupID> | ||
243 | <OwnerID><Guid>a6dacf01-4636-4bb9-8a97-30609438af9d</Guid></OwnerID> | ||
244 | <LastOwnerID><Guid>a6dacf01-4636-4bb9-8a97-30609438af9d</Guid></LastOwnerID> | ||
245 | <BaseMask>2147483647</BaseMask> | ||
246 | <OwnerMask>2147483647</OwnerMask> | ||
247 | <GroupMask>0</GroupMask> | ||
248 | <EveryoneMask>0</EveryoneMask> | ||
249 | <NextOwnerMask>2147483647</NextOwnerMask> | ||
250 | <Flags>None</Flags> | ||
251 | <CollisionSound><Guid>00000000-0000-0000-0000-000000000000</Guid></CollisionSound> | ||
252 | <CollisionSoundVolume>0</CollisionSoundVolume> | ||
253 | </SceneObjectPart> | ||
254 | </RootPart> | ||
255 | <OtherParts /> | ||
256 | </SceneObjectGroup>"; | ||
257 | |||
151 | private string xml2 = @" | 258 | private string xml2 = @" |
152 | <SceneObjectGroup> | 259 | <SceneObjectGroup> |
153 | <SceneObjectPart xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema""> | 260 | <SceneObjectPart xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema""> |
@@ -257,6 +364,32 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests | |||
257 | } | 364 | } |
258 | 365 | ||
259 | [Test] | 366 | [Test] |
367 | public void TestDeserializeBadFloatsXml() | ||
368 | { | ||
369 | TestHelpers.InMethod(); | ||
370 | // log4net.Config.XmlConfigurator.Configure(); | ||
371 | |||
372 | SceneObjectGroup so = SceneObjectSerializer.FromOriginalXmlFormat(badFloatsXml); | ||
373 | SceneObjectPart rootPart = so.RootPart; | ||
374 | |||
375 | Assert.That(rootPart.UUID, Is.EqualTo(new UUID("e6a5a05e-e8cc-4816-8701-04165e335790"))); | ||
376 | Assert.That(rootPart.CreatorID, Is.EqualTo(new UUID("a6dacf01-4636-4bb9-8a97-30609438af9d"))); | ||
377 | Assert.That(rootPart.Name, Is.EqualTo("NaughtyPrim")); | ||
378 | |||
379 | // This terminates the deserialization earlier if couldn't be parsed. | ||
380 | // TODO: Need to address this | ||
381 | Assert.That(rootPart.GroupPosition.X, Is.EqualTo(147.23f)); | ||
382 | |||
383 | Assert.That(rootPart.Shape.PathCurve, Is.EqualTo(16)); | ||
384 | |||
385 | // Defaults for bad parses | ||
386 | Assert.That(rootPart.Shape.FlexiTension, Is.EqualTo(0)); | ||
387 | Assert.That(rootPart.Shape.FlexiDrag, Is.EqualTo(0)); | ||
388 | |||
389 | // TODO: Check other properties | ||
390 | } | ||
391 | |||
392 | [Test] | ||
260 | public void TestSerializeXml() | 393 | public void TestSerializeXml() |
261 | { | 394 | { |
262 | TestHelpers.InMethod(); | 395 | TestHelpers.InMethod(); |
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 57db4d6..9fcd5fe 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -177,6 +177,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
177 | public delegate void AvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID); | 177 | public delegate void AvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID); |
178 | public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel; | 178 | public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel; |
179 | 179 | ||
180 | public delegate void AvatarAppearanceChange(ScenePresence avatar); | ||
181 | public event AvatarAppearanceChange OnAvatarAppearanceChange; | ||
182 | |||
180 | public event Action<ScenePresence> OnSignificantClientMovement; | 183 | public event Action<ScenePresence> OnSignificantClientMovement; |
181 | 184 | ||
182 | public delegate void IncomingInstantMessage(GridInstantMessage message); | 185 | public delegate void IncomingInstantMessage(GridInstantMessage message); |
@@ -188,10 +191,62 @@ namespace OpenSim.Region.Framework.Scenes | |||
188 | 191 | ||
189 | public event ClientClosed OnClientClosed; | 192 | public event ClientClosed OnClientClosed; |
190 | 193 | ||
194 | // Fired when a script is created | ||
195 | // The indication that a new script exists in this region. | ||
196 | public delegate void NewScript(UUID clientID, SceneObjectPart part, UUID itemID); | ||
197 | public event NewScript OnNewScript; | ||
198 | public virtual void TriggerNewScript(UUID clientID, SceneObjectPart part, UUID itemID) | ||
199 | { | ||
200 | NewScript handlerNewScript = OnNewScript; | ||
201 | if (handlerNewScript != null) | ||
202 | { | ||
203 | foreach (NewScript d in handlerNewScript.GetInvocationList()) | ||
204 | { | ||
205 | try | ||
206 | { | ||
207 | d(clientID, part, itemID); | ||
208 | } | ||
209 | catch (Exception e) | ||
210 | { | ||
211 | m_log.ErrorFormat( | ||
212 | "[EVENT MANAGER]: Delegate for TriggerNewScript failed - continuing. {0} {1}", | ||
213 | e.Message, e.StackTrace); | ||
214 | } | ||
215 | } | ||
216 | } | ||
217 | } | ||
218 | |||
219 | //TriggerUpdateScript: triggered after Scene receives client's upload of updated script and stores it as asset | ||
220 | // An indication that the script has changed. | ||
221 | public delegate void UpdateScript(UUID clientID, UUID itemId, UUID primId, bool isScriptRunning, UUID newAssetID); | ||
222 | public event UpdateScript OnUpdateScript; | ||
223 | public virtual void TriggerUpdateScript(UUID clientId, UUID itemId, UUID primId, bool isScriptRunning, UUID newAssetID) | ||
224 | { | ||
225 | UpdateScript handlerUpdateScript = OnUpdateScript; | ||
226 | if (handlerUpdateScript != null) | ||
227 | { | ||
228 | foreach (UpdateScript d in handlerUpdateScript.GetInvocationList()) | ||
229 | { | ||
230 | try | ||
231 | { | ||
232 | d(clientId, itemId, primId, isScriptRunning, newAssetID); | ||
233 | } | ||
234 | catch (Exception e) | ||
235 | { | ||
236 | m_log.ErrorFormat( | ||
237 | "[EVENT MANAGER]: Delegate for TriggerUpdateScript failed - continuing. {0} {1}", | ||
238 | e.Message, e.StackTrace); | ||
239 | } | ||
240 | } | ||
241 | } | ||
242 | } | ||
243 | |||
191 | /// <summary> | 244 | /// <summary> |
192 | /// This is fired when a scene object property that a script might be interested in (such as color, scale or | 245 | /// ScriptChangedEvent is fired when a scene object property that a script might be interested |
193 | /// inventory) changes. Only enough information is sent for the LSL changed event | 246 | /// in (such as color, scale or inventory) changes. Only enough information sent is for the LSL changed event. |
194 | /// (see http://lslwiki.net/lslwiki/wakka.php?wakka=changed) | 247 | /// This is not an indication that the script has changed (see OnUpdateScript for that). |
248 | /// This event is sent to a script to tell it that some property changed on | ||
249 | /// the object the script is in. See http://lslwiki.net/lslwiki/wakka.php?wakka=changed . | ||
195 | /// </summary> | 250 | /// </summary> |
196 | public event ScriptChangedEvent OnScriptChangedEvent; | 251 | public event ScriptChangedEvent OnScriptChangedEvent; |
197 | public delegate void ScriptChangedEvent(uint localID, uint change); | 252 | public delegate void ScriptChangedEvent(uint localID, uint change); |
@@ -1262,6 +1317,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
1262 | } | 1317 | } |
1263 | } | 1318 | } |
1264 | 1319 | ||
1320 | public void TriggerAvatarAppearanceChanged(ScenePresence avatar) | ||
1321 | { | ||
1322 | AvatarAppearanceChange handler = OnAvatarAppearanceChange; | ||
1323 | if (handler != null) | ||
1324 | { | ||
1325 | foreach (AvatarAppearanceChange d in handler.GetInvocationList()) | ||
1326 | { | ||
1327 | try | ||
1328 | { | ||
1329 | d(avatar); | ||
1330 | } | ||
1331 | catch (Exception e) | ||
1332 | { | ||
1333 | m_log.ErrorFormat( | ||
1334 | "[EVENT MANAGER]: Delegate for TriggerAvatarAppearanceChanged failed - continuing. {0} {1}", | ||
1335 | e.Message, e.StackTrace); | ||
1336 | } | ||
1337 | } | ||
1338 | } | ||
1339 | } | ||
1340 | |||
1265 | public void TriggerIncomingInstantMessage(GridInstantMessage message) | 1341 | public void TriggerIncomingInstantMessage(GridInstantMessage message) |
1266 | { | 1342 | { |
1267 | IncomingInstantMessage handlerIncomingInstantMessage = OnIncomingInstantMessage; | 1343 | IncomingInstantMessage handlerIncomingInstantMessage = OnIncomingInstantMessage; |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index fff39fb..e7a3b42 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -265,6 +265,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
265 | // | 265 | // |
266 | errors = part.Inventory.CreateScriptInstanceEr(item.ItemID, 0, false, DefaultScriptEngine, 0); | 266 | errors = part.Inventory.CreateScriptInstanceEr(item.ItemID, 0, false, DefaultScriptEngine, 0); |
267 | } | 267 | } |
268 | |||
269 | // Tell anyone managing scripts that a script has been reloaded/changed | ||
270 | EventManager.TriggerUpdateScript(remoteClient.AgentId, itemId, primId, isScriptRunning, item.AssetID); | ||
271 | |||
268 | part.ParentGroup.ResumeScripts(); | 272 | part.ParentGroup.ResumeScripts(); |
269 | return errors; | 273 | return errors; |
270 | } | 274 | } |
@@ -1643,9 +1647,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1643 | // have state in inventory | 1647 | // have state in inventory |
1644 | part.Inventory.CreateScriptInstance(copyID, 0, false, DefaultScriptEngine, 0); | 1648 | part.Inventory.CreateScriptInstance(copyID, 0, false, DefaultScriptEngine, 0); |
1645 | 1649 | ||
1650 | // tell anyone watching that there is a new script in town | ||
1651 | EventManager.TriggerNewScript(agentID, part, copyID); | ||
1652 | |||
1646 | // m_log.InfoFormat("[PRIMINVENTORY]: " + | 1653 | // m_log.InfoFormat("[PRIMINVENTORY]: " + |
1647 | // "Rezzed script {0} into prim local ID {1} for user {2}", | 1654 | // "Rezzed script {0} into prim local ID {1} for user {2}", |
1648 | // item.inventoryName, localID, remoteClient.Name); | 1655 | // item.inventoryName, localID, remoteClient.Name); |
1656 | |||
1649 | part.ParentGroup.ResumeScripts(); | 1657 | part.ParentGroup.ResumeScripts(); |
1650 | 1658 | ||
1651 | return part; | 1659 | return part; |
@@ -1726,6 +1734,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
1726 | 1734 | ||
1727 | part.Inventory.AddInventoryItem(taskItem, false); | 1735 | part.Inventory.AddInventoryItem(taskItem, false); |
1728 | part.Inventory.CreateScriptInstance(taskItem, 0, false, DefaultScriptEngine, 0); | 1736 | part.Inventory.CreateScriptInstance(taskItem, 0, false, DefaultScriptEngine, 0); |
1737 | |||
1738 | // tell anyone managing scripts that a new script exists | ||
1739 | EventManager.TriggerNewScript(agentID, part, taskItem.ItemID); | ||
1740 | |||
1729 | part.ParentGroup.ResumeScripts(); | 1741 | part.ParentGroup.ResumeScripts(); |
1730 | 1742 | ||
1731 | return part; | 1743 | return part; |
@@ -1954,7 +1966,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1954 | permissionToTake = true; | 1966 | permissionToTake = true; |
1955 | permissionToDelete = true; | 1967 | permissionToDelete = true; |
1956 | 1968 | ||
1957 | AddReturn(grp.OwnerID, grp.Name, grp.AbsolutePosition, "parcel owner return"); | 1969 | AddReturn(grp.OwnerID == grp.GroupID ? grp.LastOwnerID : grp.OwnerID, grp.Name, grp.AbsolutePosition, "parcel owner return"); |
1958 | } | 1970 | } |
1959 | } | 1971 | } |
1960 | else // Auto return passes through here with null agent | 1972 | else // Auto return passes through here with null agent |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index bbdf35d..7b1ef40 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3397,6 +3397,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3397 | { | 3397 | { |
3398 | bool vialogin = ((teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0 || | 3398 | bool vialogin = ((teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0 || |
3399 | (teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0); | 3399 | (teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0); |
3400 | bool viahome = ((teleportFlags & (uint)Constants.TeleportFlags.ViaHome) != 0); | ||
3401 | bool godlike = ((teleportFlags & (uint)Constants.TeleportFlags.Godlike) != 0); | ||
3402 | |||
3400 | reason = String.Empty; | 3403 | reason = String.Empty; |
3401 | 3404 | ||
3402 | //Teleport flags: | 3405 | //Teleport flags: |
@@ -3571,6 +3574,29 @@ namespace OpenSim.Region.Framework.Scenes | |||
3571 | agent.startpos.Z = 720; | 3574 | agent.startpos.Z = 720; |
3572 | } | 3575 | } |
3573 | } | 3576 | } |
3577 | |||
3578 | // Honor Estate teleport routing via Telehubs excluding ViaHome and GodLike TeleportFlags | ||
3579 | if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && | ||
3580 | RegionInfo.EstateSettings.AllowDirectTeleport == false && | ||
3581 | !viahome && !godlike) | ||
3582 | { | ||
3583 | SceneObjectGroup telehub = GetSceneObjectGroup(RegionInfo.RegionSettings.TelehubObject); | ||
3584 | // Can have multiple SpawnPoints | ||
3585 | List<SpawnPoint> spawnpoints = RegionInfo.RegionSettings.SpawnPoints(); | ||
3586 | if ( spawnpoints.Count > 1) | ||
3587 | { | ||
3588 | // We have multiple SpawnPoints, Route the agent to a random one | ||
3589 | agent.startpos = spawnpoints[Util.RandomClass.Next(spawnpoints.Count)].GetLocation(telehub.AbsolutePosition, telehub.GroupRotation); | ||
3590 | } | ||
3591 | else | ||
3592 | { | ||
3593 | // We have a single SpawnPoint and will route the agent to it | ||
3594 | agent.startpos = spawnpoints[0].GetLocation(telehub.AbsolutePosition, telehub.GroupRotation); | ||
3595 | } | ||
3596 | |||
3597 | return true; | ||
3598 | } | ||
3599 | |||
3574 | // Honor parcel landing type and position. | 3600 | // Honor parcel landing type and position. |
3575 | /* | 3601 | /* |
3576 | ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); | 3602 | ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 5405358..5a7f124 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -1678,7 +1678,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1678 | 1678 | ||
1679 | if (group != null) | 1679 | if (group != null) |
1680 | { | 1680 | { |
1681 | if (m_parentScene.Permissions.CanEditObject(group.UUID,agentID)) | 1681 | if (m_parentScene.Permissions.CanEditObject(group.UUID, agentID)) |
1682 | { | 1682 | { |
1683 | group.UpdateExtraParam(primLocalID, type, inUse, data); | 1683 | group.UpdateExtraParam(primLocalID, type, inUse, data); |
1684 | } | 1684 | } |
@@ -1695,7 +1695,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1695 | SceneObjectGroup group = GetGroupByPrim(primLocalID); | 1695 | SceneObjectGroup group = GetGroupByPrim(primLocalID); |
1696 | if (group != null) | 1696 | if (group != null) |
1697 | { | 1697 | { |
1698 | if (m_parentScene.Permissions.CanEditObject(group.GetPartsFullID(primLocalID), agentID)) | 1698 | if (m_parentScene.Permissions.CanEditObject(group.UUID, agentID)) |
1699 | { | 1699 | { |
1700 | ObjectShapePacket.ObjectDataBlock shapeData = new ObjectShapePacket.ObjectDataBlock(); | 1700 | ObjectShapePacket.ObjectDataBlock shapeData = new ObjectShapePacket.ObjectDataBlock(); |
1701 | shapeData.ObjectLocalID = shapeBlock.ObjectLocalID; | 1701 | shapeData.ObjectLocalID = shapeBlock.ObjectLocalID; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index a4ca0fb..0d14b83 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1754,7 +1754,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1754 | m_log.DebugFormat( | 1754 | m_log.DebugFormat( |
1755 | "[SCENE OBJECT GROUP]: Returning object {0} due to parcel autoreturn", | 1755 | "[SCENE OBJECT GROUP]: Returning object {0} due to parcel autoreturn", |
1756 | RootPart.UUID); | 1756 | RootPart.UUID); |
1757 | m_scene.AddReturn(OwnerID, Name, AbsolutePosition, "parcel autoreturn"); | 1757 | m_scene.AddReturn(OwnerID == GroupID ? LastOwnerID : OwnerID, Name, AbsolutePosition, "parcel autoreturn"); |
1758 | m_scene.DeRezObjects(null, new List<uint>() { RootPart.LocalId }, UUID.Zero, | 1758 | m_scene.DeRezObjects(null, new List<uint>() { RootPart.LocalId }, UUID.Zero, |
1759 | DeRezAction.Return, UUID.Zero); | 1759 | DeRezAction.Return, UUID.Zero); |
1760 | 1760 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 4b80e37..19cb9fb 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -29,6 +29,7 @@ using System; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Drawing; | 30 | using System.Drawing; |
31 | using System.IO; | 31 | using System.IO; |
32 | using System.Linq; | ||
32 | using System.Reflection; | 33 | using System.Reflection; |
33 | using System.Xml; | 34 | using System.Xml; |
34 | using log4net; | 35 | using log4net; |
@@ -573,13 +574,15 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
573 | 574 | ||
574 | private static void ProcessShape(SceneObjectPart obj, XmlTextReader reader) | 575 | private static void ProcessShape(SceneObjectPart obj, XmlTextReader reader) |
575 | { | 576 | { |
576 | bool errors = false; | 577 | List<string> errorNodeNames; |
577 | obj.Shape = ReadShape(reader, "Shape", out errors); | 578 | obj.Shape = ReadShape(reader, "Shape", out errorNodeNames); |
578 | 579 | ||
579 | if (errors) | 580 | if (errorNodeNames != null) |
581 | { | ||
580 | m_log.DebugFormat( | 582 | m_log.DebugFormat( |
581 | "[SceneObjectSerializer]: Parsing PrimitiveBaseShape for object part {0} {1} encountered errors. Please see earlier log entries.", | 583 | "[SceneObjectSerializer]: Parsing PrimitiveBaseShape for object part {0} {1} encountered errors in properties {2}.", |
582 | obj.Name, obj.UUID); | 584 | obj.Name, obj.UUID, string.Join(", ", errorNodeNames.ToArray())); |
585 | } | ||
583 | } | 586 | } |
584 | 587 | ||
585 | private static void ProcessScale(SceneObjectPart obj, XmlTextReader reader) | 588 | private static void ProcessScale(SceneObjectPart obj, XmlTextReader reader) |
@@ -1529,31 +1532,44 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1529 | /// </summary> | 1532 | /// </summary> |
1530 | /// <param name="reader"></param> | 1533 | /// <param name="reader"></param> |
1531 | /// <param name="name">The name of the xml element containing the shape</param> | 1534 | /// <param name="name">The name of the xml element containing the shape</param> |
1532 | /// <param name="errors">true if any errors were encountered during parsing, false otherwise</param> | 1535 | /// <param name="errors">a list containing the failing node names. If no failures then null.</param> |
1533 | /// <returns>The shape parsed</returns> | 1536 | /// <returns>The shape parsed</returns> |
1534 | public static PrimitiveBaseShape ReadShape(XmlTextReader reader, string name, out bool errors) | 1537 | public static PrimitiveBaseShape ReadShape(XmlTextReader reader, string name, out List<string> errorNodeNames) |
1535 | { | 1538 | { |
1536 | errors = false; | 1539 | List<string> internalErrorNodeNames = null; |
1537 | 1540 | ||
1538 | PrimitiveBaseShape shape = new PrimitiveBaseShape(); | 1541 | PrimitiveBaseShape shape = new PrimitiveBaseShape(); |
1539 | 1542 | ||
1543 | if (reader.IsEmptyElement) | ||
1544 | { | ||
1545 | reader.Read(); | ||
1546 | errorNodeNames = null; | ||
1547 | return shape; | ||
1548 | } | ||
1549 | |||
1540 | reader.ReadStartElement(name, String.Empty); // Shape | 1550 | reader.ReadStartElement(name, String.Empty); // Shape |
1541 | 1551 | ||
1542 | errors = ExternalRepresentationUtils.ExecuteReadProcessors( | 1552 | ExternalRepresentationUtils.ExecuteReadProcessors( |
1543 | shape, | 1553 | shape, |
1544 | m_ShapeXmlProcessors, | 1554 | m_ShapeXmlProcessors, |
1545 | reader, | 1555 | reader, |
1546 | (o, nodeName, e) | 1556 | (o, nodeName, e) |
1547 | => | 1557 | => |
1548 | { | 1558 | { |
1549 | m_log.DebugFormat( | 1559 | // m_log.DebugFormat( |
1550 | "[SceneObjectSerializer]: Exception while parsing Shape property {0}: {1}{2}", | 1560 | // "[SceneObjectSerializer]: Exception while parsing Shape property {0}: {1}{2}", |
1551 | nodeName, e.Message, e.StackTrace); | 1561 | // nodeName, e.Message, e.StackTrace); |
1562 | if (internalErrorNodeNames == null) | ||
1563 | internalErrorNodeNames = new List<string>(); | ||
1564 | |||
1565 | internalErrorNodeNames.Add(nodeName); | ||
1552 | } | 1566 | } |
1553 | ); | 1567 | ); |
1554 | 1568 | ||
1555 | reader.ReadEndElement(); // Shape | 1569 | reader.ReadEndElement(); // Shape |
1556 | 1570 | ||
1571 | errorNodeNames = internalErrorNodeNames; | ||
1572 | |||
1557 | return shape; | 1573 | return shape; |
1558 | } | 1574 | } |
1559 | 1575 | ||
diff --git a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs index d2810be..d0142a4 100644 --- a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs | |||
@@ -230,8 +230,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady | |||
230 | 230 | ||
231 | m_scene.EventManager.OnEmptyScriptCompileQueue -= OnEmptyScriptCompileQueue; | 231 | m_scene.EventManager.OnEmptyScriptCompileQueue -= OnEmptyScriptCompileQueue; |
232 | 232 | ||
233 | m_log.InfoFormat("[RegionReady]: Logins enabled for {0}, Oar {1}", | 233 | // m_log.InfoFormat("[RegionReady]: Logins enabled for {0}, Oar {1}", |
234 | m_scene.RegionInfo.RegionName, m_oarFileLoading.ToString()); | 234 | // m_scene.RegionInfo.RegionName, m_oarFileLoading.ToString()); |
235 | |||
236 | m_log.InfoFormat("[RegionReady]: Logins enabled for {0}", m_scene.RegionInfo.RegionName); | ||
235 | 237 | ||
236 | if ( m_uri != string.Empty ) | 238 | if ( m_uri != string.Empty ) |
237 | { | 239 | { |
diff --git a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs index 3763696..8587a2b 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs | |||
@@ -30,7 +30,8 @@ using System.Collections.Generic; | |||
30 | using System.IO; | 30 | using System.IO; |
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using Nini.Config; | 32 | using Nini.Config; |
33 | using log4net; | 33 | using log4net; |
34 | using OpenSim.Framework; | ||
34 | 35 | ||
35 | namespace OpenSim.Region.Physics.Manager | 36 | namespace OpenSim.Region.Physics.Manager |
36 | { | 37 | { |
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index f15e81b..6f6ed7f 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |||
@@ -313,7 +313,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
313 | private bool GenerateCoordsAndFacesFromPrimMeshData( | 313 | private bool GenerateCoordsAndFacesFromPrimMeshData( |
314 | string primName, PrimitiveBaseShape primShape, Vector3 size, out List<Coord> coords, out List<Face> faces) | 314 | string primName, PrimitiveBaseShape primShape, Vector3 size, out List<Coord> coords, out List<Face> faces) |
315 | { | 315 | { |
316 | m_log.DebugFormat("[MESH]: experimental mesh proxy generation for {0}", primName); | 316 | // m_log.DebugFormat("[MESH]: experimental mesh proxy generation for {0}", primName); |
317 | 317 | ||
318 | coords = new List<Coord>(); | 318 | coords = new List<Coord>(); |
319 | faces = new List<Face>(); | 319 | faces = new List<Face>(); |
@@ -321,7 +321,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
321 | 321 | ||
322 | if (primShape.SculptData.Length <= 0) | 322 | if (primShape.SculptData.Length <= 0) |
323 | { | 323 | { |
324 | m_log.Error("[MESH]: asset data is zero length"); | 324 | m_log.ErrorFormat("[MESH]: asset data for {0} is zero length", primName); |
325 | return false; | 325 | return false; |
326 | } | 326 | } |
327 | 327 | ||
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 716161a..e8bb476 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | |||
@@ -46,7 +46,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
46 | /// </summary> | 46 | /// </summary> |
47 | public class OdePlugin : IPhysicsPlugin | 47 | public class OdePlugin : IPhysicsPlugin |
48 | { | 48 | { |
49 | //private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 49 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
50 | 50 | ||
51 | private OdeScene m_scene; | 51 | private OdeScene m_scene; |
52 | 52 | ||
@@ -59,13 +59,36 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
59 | { | 59 | { |
60 | if (m_scene == null) | 60 | if (m_scene == null) |
61 | { | 61 | { |
62 | // We do this so that OpenSimulator on Windows loads the correct native ODE library depending on whether | ||
63 | // it's running as a 32-bit process or a 64-bit one. By invoking LoadLibary here, later DLLImports | ||
64 | // will find it already loaded later on. | ||
65 | // | ||
66 | // This isn't necessary for other platforms (e.g. Mac OSX and Linux) since the DLL used can be | ||
67 | // controlled in Ode.NET.dll.config | ||
68 | if (Util.IsWindows()) | ||
69 | { | ||
70 | string nativeLibraryPath; | ||
71 | |||
72 | if (Util.Is64BitProcess()) | ||
73 | nativeLibraryPath = "lib64/ode.dll"; | ||
74 | else | ||
75 | nativeLibraryPath = "lib32/ode.dll"; | ||
76 | |||
77 | m_log.DebugFormat("[ODE PLUGIN]: Loading native Windows ODE library at {0}", nativeLibraryPath); | ||
78 | |||
79 | if (Util.LoadLibrary(nativeLibraryPath) == IntPtr.Zero) | ||
80 | m_log.ErrorFormat( | ||
81 | "[ODE PLUGIN]: Couldn't find native Windows ODE library at {0}", nativeLibraryPath); | ||
82 | } | ||
83 | |||
62 | // Initializing ODE only when a scene is created allows alternative ODE plugins to co-habit (according to | 84 | // Initializing ODE only when a scene is created allows alternative ODE plugins to co-habit (according to |
63 | // http://opensimulator.org/mantis/view.php?id=2750). | 85 | // http://opensimulator.org/mantis/view.php?id=2750). |
64 | d.InitODE(); | 86 | d.InitODE(); |
65 | 87 | ||
66 | m_scene = new OdeScene(sceneIdentifier); | 88 | m_scene = new OdeScene(sceneIdentifier); |
67 | } | 89 | } |
68 | return (m_scene); | 90 | |
91 | return m_scene; | ||
69 | } | 92 | } |
70 | 93 | ||
71 | public string GetName() | 94 | public string GetName() |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 331cffd..2424130 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -2634,7 +2634,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2634 | UUID npcID = new UUID(npc.m_string); | 2634 | UUID npcID = new UUID(npc.m_string); |
2635 | 2635 | ||
2636 | if (module.CheckPermissions(npcID, m_host.OwnerID)) | 2636 | if (module.CheckPermissions(npcID, m_host.OwnerID)) |
2637 | AvatarPlayAnimation(npcID.ToString(), animation); | 2637 | AvatarStopAnimation(npcID.ToString(), animation); |
2638 | } | 2638 | } |
2639 | } | 2639 | } |
2640 | 2640 | ||