mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
Eliminate pointless checks of SOG.RootPart != null
It's never possible for SOG to have no RootPart, except in the first few picosends of the big bang when it's pulled from region persistence or deserialized
This commit is contained in:
@@ -2767,8 +2767,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
// If either of these are null, then there was an unknown error.
|
||||
if (new_group == null)
|
||||
continue;
|
||||
if (new_group.RootPart == null)
|
||||
continue;
|
||||
|
||||
// objects rezzed with this method are die_at_edge by default.
|
||||
new_group.RootPart.SetDieAtEdge(true);
|
||||
@@ -6983,10 +6981,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
{
|
||||
// we are a child. The rotation values will be set to the one of root modified by rot, as in SL. Don't ask.
|
||||
SceneObjectPart rootPart = part.ParentGroup.RootPart;
|
||||
if (rootPart != null) // better safe than sorry
|
||||
{
|
||||
SetRot(part, rootPart.RotationOffset * Rot2Quaternion(q));
|
||||
}
|
||||
SetRot(part, rootPart.RotationOffset * Rot2Quaternion(q));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -673,8 +673,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
if (m_host.ParentGroup.RootPart != null)
|
||||
m_host.ParentGroup.RootPart.SetFloatOnWater(floatYN);
|
||||
m_host.ParentGroup.RootPart.SetFloatOnWater(floatYN);
|
||||
}
|
||||
|
||||
// Teleport functions
|
||||
|
||||
Reference in New Issue
Block a user