diff options
author | Robert Adams | 2013-08-20 13:09:40 -0700 |
---|---|---|
committer | Robert Adams | 2013-09-11 09:12:05 -0700 |
commit | d09c35f5063114880aecb94a938bfc49f5af5f7d (patch) | |
tree | 8af9cf90bdbde7b63bb49844d550d36529cadd46 /OpenSim/Region/OptionalModules | |
parent | BulletSim: add ID parameter to TaintedObject calls so logging will include Lo... (diff) | |
download | opensim-SC_OLD-d09c35f5063114880aecb94a938bfc49f5af5f7d.zip opensim-SC_OLD-d09c35f5063114880aecb94a938bfc49f5af5f7d.tar.gz opensim-SC_OLD-d09c35f5063114880aecb94a938bfc49f5af5f7d.tar.bz2 opensim-SC_OLD-d09c35f5063114880aecb94a938bfc49f5af5f7d.tar.xz |
BulletSim: pass both root and child BSPhysObjects to Extension function. Update routines to use the new parameters list from above change.
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rwxr-xr-x | OpenSim/Region/OptionalModules/Scripting/ExtendedPhysics/ExtendedPhysics.cs | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/ExtendedPhysics/ExtendedPhysics.cs b/OpenSim/Region/OptionalModules/Scripting/ExtendedPhysics/ExtendedPhysics.cs index 90cf15a..10e13b9 100755 --- a/OpenSim/Region/OptionalModules/Scripting/ExtendedPhysics/ExtendedPhysics.cs +++ b/OpenSim/Region/OptionalModules/Scripting/ExtendedPhysics/ExtendedPhysics.cs | |||
@@ -220,7 +220,8 @@ public class ExtendedPhysics : INonSharedRegionModule | |||
220 | containingGroup.UpdateGroupPosition(containingGroup.AbsolutePosition); | 220 | containingGroup.UpdateGroupPosition(containingGroup.AbsolutePosition); |
221 | containingGroup.UpdateGroupRotationR(containingGroup.GroupRotation); | 221 | containingGroup.UpdateGroupRotationR(containingGroup.GroupRotation); |
222 | 222 | ||
223 | ret = MakeIntError(rootPhysActor.Extension(PhysFunctSetLinksetType, linksetType)); | 223 | object[] parms2 = { rootPhysActor, null, linksetType }; |
224 | ret = MakeIntError(rootPhysActor.Extension(PhysFunctSetLinksetType, parms2)); | ||
224 | Thread.Sleep(150); // longer than one heartbeat tick | 225 | Thread.Sleep(150); // longer than one heartbeat tick |
225 | 226 | ||
226 | containingGroup.ScriptSetPhysicsStatus(true); | 227 | containingGroup.ScriptSetPhysicsStatus(true); |
@@ -229,7 +230,8 @@ public class ExtendedPhysics : INonSharedRegionModule | |||
229 | { | 230 | { |
230 | // Non-physical linksets don't have a physical instantiation so there is no state to | 231 | // Non-physical linksets don't have a physical instantiation so there is no state to |
231 | // worry about being updated. | 232 | // worry about being updated. |
232 | ret = MakeIntError(rootPhysActor.Extension(PhysFunctSetLinksetType, linksetType)); | 233 | object[] parms2 = { rootPhysActor, null, linksetType }; |
234 | ret = MakeIntError(rootPhysActor.Extension(PhysFunctSetLinksetType, parms2)); | ||
233 | } | 235 | } |
234 | } | 236 | } |
235 | else | 237 | else |
@@ -271,7 +273,8 @@ public class ExtendedPhysics : INonSharedRegionModule | |||
271 | PhysicsActor rootPhysActor = rootPart.PhysActor; | 273 | PhysicsActor rootPhysActor = rootPart.PhysActor; |
272 | if (rootPhysActor != null) | 274 | if (rootPhysActor != null) |
273 | { | 275 | { |
274 | ret = MakeIntError(rootPhysActor.Extension(PhysFunctGetLinksetType)); | 276 | object[] parms2 = { rootPhysActor, null }; |
277 | ret = MakeIntError(rootPhysActor.Extension(PhysFunctGetLinksetType, parms2)); | ||
275 | } | 278 | } |
276 | else | 279 | else |
277 | { | 280 | { |
@@ -315,8 +318,8 @@ public class ExtendedPhysics : INonSharedRegionModule | |||
315 | 318 | ||
316 | if (GetRootAndChildPhysActors(hostID, linkNum, out rootPhysActor, out childPhysActor)) | 319 | if (GetRootAndChildPhysActors(hostID, linkNum, out rootPhysActor, out childPhysActor)) |
317 | { | 320 | { |
318 | object[] parms = { childPhysActor, typeCode }; | 321 | object[] parms2 = { rootPhysActor, childPhysActor, typeCode }; |
319 | ret = MakeIntError(rootPhysActor.Extension(PhysFunctChangeLinkType, parms)); | 322 | ret = MakeIntError(rootPhysActor.Extension(PhysFunctChangeLinkType, parms2)); |
320 | } | 323 | } |
321 | 324 | ||
322 | return ret; | 325 | return ret; |
@@ -334,8 +337,8 @@ public class ExtendedPhysics : INonSharedRegionModule | |||
334 | 337 | ||
335 | if (GetRootAndChildPhysActors(hostID, linkNum, out rootPhysActor, out childPhysActor)) | 338 | if (GetRootAndChildPhysActors(hostID, linkNum, out rootPhysActor, out childPhysActor)) |
336 | { | 339 | { |
337 | object[] parms = { childPhysActor }; | 340 | object[] parms2 = { rootPhysActor, childPhysActor }; |
338 | ret = MakeIntError(rootPhysActor.Extension(PhysFunctGetLinkType, parms)); | 341 | ret = MakeIntError(rootPhysActor.Extension(PhysFunctGetLinkType, parms2)); |
339 | } | 342 | } |
340 | 343 | ||
341 | return ret; | 344 | return ret; |
@@ -354,8 +357,8 @@ public class ExtendedPhysics : INonSharedRegionModule | |||
354 | 357 | ||
355 | if (GetRootAndChildPhysActors(hostID, linkNum, out rootPhysActor, out childPhysActor)) | 358 | if (GetRootAndChildPhysActors(hostID, linkNum, out rootPhysActor, out childPhysActor)) |
356 | { | 359 | { |
357 | object[] parms = { childPhysActor , PHYS_LINK_TYPE_FIXED }; | 360 | object[] parms2 = { rootPhysActor, childPhysActor , PHYS_LINK_TYPE_FIXED }; |
358 | ret = MakeIntError(rootPhysActor.Extension(PhysFunctChangeLinkType, parms)); | 361 | ret = MakeIntError(rootPhysActor.Extension(PhysFunctChangeLinkType, parms2)); |
359 | } | 362 | } |
360 | 363 | ||
361 | return ret; | 364 | return ret; |
@@ -412,7 +415,7 @@ public class ExtendedPhysics : INonSharedRegionModule | |||
412 | 415 | ||
413 | if (GetRootAndChildPhysActors(hostID, linkNum, out rootPhysActor, out childPhysActor)) | 416 | if (GetRootAndChildPhysActors(hostID, linkNum, out rootPhysActor, out childPhysActor)) |
414 | { | 417 | { |
415 | object[] parms2 = AddToBeginningOfArray(childPhysActor, parms); | 418 | object[] parms2 = AddToBeginningOfArray(rootPhysActor, childPhysActor, parms); |
416 | ret = MakeIntError(rootPhysActor.Extension(PhysFunctChangeLinkParams, parms2)); | 419 | ret = MakeIntError(rootPhysActor.Extension(PhysFunctChangeLinkParams, parms2)); |
417 | } | 420 | } |
418 | 421 | ||
@@ -518,11 +521,12 @@ public class ExtendedPhysics : INonSharedRegionModule | |||
518 | } | 521 | } |
519 | 522 | ||
520 | // Return an array of objects with the passed object as the first object of a new array | 523 | // Return an array of objects with the passed object as the first object of a new array |
521 | private object[] AddToBeginningOfArray(object firstOne, object[] prevArray) | 524 | private object[] AddToBeginningOfArray(object firstOne, object secondOne, object[] prevArray) |
522 | { | 525 | { |
523 | object[] newArray = new object[1 + prevArray.Length]; | 526 | object[] newArray = new object[2 + prevArray.Length]; |
524 | newArray[0] = firstOne; | 527 | newArray[0] = firstOne; |
525 | prevArray.CopyTo(newArray, 1); | 528 | newArray[1] = secondOne; |
529 | prevArray.CopyTo(newArray, 2); | ||
526 | return newArray; | 530 | return newArray; |
527 | } | 531 | } |
528 | 532 | ||