aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-04-21 03:42:54 +0100
committerJustin Clark-Casey (justincc)2012-04-21 03:42:54 +0100
commitae2b8f70074e4dfe2cbbd03dd543c7468fc50cc1 (patch)
tree00bcb14ed432c3ea1ad66ce9a3ea68f2467e2587 /OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
parentrefactor: Simplify ODEPrim.AddChildPrim() by returning early where appropriate. (diff)
downloadopensim-SC_OLD-ae2b8f70074e4dfe2cbbd03dd543c7468fc50cc1.zip
opensim-SC_OLD-ae2b8f70074e4dfe2cbbd03dd543c7468fc50cc1.tar.gz
opensim-SC_OLD-ae2b8f70074e4dfe2cbbd03dd543c7468fc50cc1.tar.bz2
opensim-SC_OLD-ae2b8f70074e4dfe2cbbd03dd543c7468fc50cc1.tar.xz
Comment out spurious Body != IntPtr.Zero code after disableBody(), since disableBody() sets Body == IntPtr.Zero on all code paths.
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/ODEPrim.cs')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs27
1 files changed, 18 insertions, 9 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index cbb49ac..3f88353 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -1056,7 +1056,9 @@ Console.WriteLine("ZProcessTaints for " + Name);
1056 if (childrenPrim.Contains(prim)) 1056 if (childrenPrim.Contains(prim))
1057 return; 1057 return;
1058 1058
1059//Console.WriteLine("childrenPrim.Add " + prim); 1059// m_log.DebugFormat(
1060// "[ODE PRIM]: Linking prim {0} {1} to {2} {3}", prim.Name, prim.LocalID, Name, LocalID);
1061
1060 childrenPrim.Add(prim); 1062 childrenPrim.Add(prim);
1061 1063
1062 foreach (OdePrim prm in childrenPrim) 1064 foreach (OdePrim prm in childrenPrim)
@@ -1194,12 +1196,14 @@ Console.WriteLine("ZProcessTaints for " + Name);
1194 //prm.childPrim = false; 1196 //prm.childPrim = false;
1195 } 1197 }
1196 } 1198 }
1199
1197 disableBody(); 1200 disableBody();
1198 1201
1199 if (Body != IntPtr.Zero) 1202 // Spurious - Body == IntPtr.Zero after disableBody()
1200 { 1203// if (Body != IntPtr.Zero)
1201 _parent_scene.DeactivatePrim(this); 1204// {
1202 } 1205// _parent_scene.DeactivatePrim(this);
1206// }
1203 1207
1204 lock (childrenPrim) 1208 lock (childrenPrim)
1205 { 1209 {
@@ -1213,6 +1217,9 @@ Console.WriteLine("ZProcessTaints for " + Name);
1213 1217
1214 private void ChildDelink(OdePrim odePrim) 1218 private void ChildDelink(OdePrim odePrim)
1215 { 1219 {
1220// m_log.DebugFormat(
1221// "[ODE PRIM]: Delinking prim {0} {1} from {2} {3}", odePrim.Name, odePrim.LocalID, Name, LocalID);
1222
1216 // Okay, we have a delinked child.. need to rebuild the body. 1223 // Okay, we have a delinked child.. need to rebuild the body.
1217 lock (childrenPrim) 1224 lock (childrenPrim)
1218 { 1225 {
@@ -1227,6 +1234,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
1227 //prm.childPrim = false; 1234 //prm.childPrim = false;
1228 } 1235 }
1229 } 1236 }
1237
1230 disableBody(); 1238 disableBody();
1231 1239
1232 lock (childrenPrim) 1240 lock (childrenPrim)
@@ -1235,10 +1243,11 @@ Console.WriteLine("ZProcessTaints for " + Name);
1235 childrenPrim.Remove(odePrim); 1243 childrenPrim.Remove(odePrim);
1236 } 1244 }
1237 1245
1238 if (Body != IntPtr.Zero) 1246 // Spurious - Body == IntPtr.Zero after disableBody()
1239 { 1247// if (Body != IntPtr.Zero)
1240 _parent_scene.DeactivatePrim(this); 1248// {
1241 } 1249// _parent_scene.DeactivatePrim(this);
1250// }
1242 1251
1243 lock (childrenPrim) 1252 lock (childrenPrim)
1244 { 1253 {