Formatting cleanup.

0.6.0-stable
Jeff Ames 2008-05-12 01:23:03 +00:00
parent 71f074839c
commit 2382342c65
6 changed files with 66 additions and 91 deletions

View File

@ -914,7 +914,7 @@ namespace OpenSim.Framework
void SendSunPos(LLVector3 sunPos, LLVector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition); void SendSunPos(LLVector3 sunPos, LLVector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition);
void SendViewerTime(int phase); void SendViewerTime(int phase);
LLUUID GetDefaultAnimation(string name); LLUUID GetDefaultAnimation(string name);
void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, string flAbout, void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, string flAbout,
uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, LLUUID partnerID); uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, LLUUID partnerID);

View File

@ -3103,9 +3103,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(scriptQuestion, ThrottleOutPacketType.Task); OutPacket(scriptQuestion, ThrottleOutPacketType.Task);
} }
private void InitDefaultAnimations() private void InitDefaultAnimations()
{ {
} }
public LLUUID GetDefaultAnimation(string name) public LLUUID GetDefaultAnimation(string name)
{ {

View File

@ -616,7 +616,7 @@ namespace OpenSim.Region.Environment.Scenes
/// </summary> /// </summary>
public void MakeChildAgent() public void MakeChildAgent()
{ {
if(m_animations.Count > 0) if (m_animations.Count > 0)
{ {
LLUUID movement=m_animations[0]; LLUUID movement=m_animations[0];
@ -1110,11 +1110,11 @@ namespace OpenSim.Region.Environment.Scenes
public void AddAnimation(LLUUID animID) public void AddAnimation(LLUUID animID)
{ {
if(m_isChildAgent) if (m_isChildAgent)
return; return;
// Don't let this animation become the movement animation // Don't let this animation become the movement animation
if(m_animations.Count < 1) if (m_animations.Count < 1)
SetMovementAnimation(Animations.AnimsLLUUID["STAND"]); SetMovementAnimation(Animations.AnimsLLUUID["STAND"]);
if (!m_animations.Contains(animID)) if (!m_animations.Contains(animID))
@ -1127,7 +1127,7 @@ namespace OpenSim.Region.Environment.Scenes
public void RemoveAnimation(LLUUID animID) public void RemoveAnimation(LLUUID animID)
{ {
if(m_isChildAgent) if (m_isChildAgent)
return; return;
if (m_animations.Contains(animID)) if (m_animations.Contains(animID))
@ -1143,7 +1143,7 @@ namespace OpenSim.Region.Environment.Scenes
for(idx=0;idx < m_animations.Count;idx++) for(idx=0;idx < m_animations.Count;idx++)
{ {
if(m_animations[idx] == animID) if (m_animations[idx] == animID)
{ {
int seq=m_animationSeqs[idx]; int seq=m_animationSeqs[idx];
@ -1158,16 +1158,16 @@ namespace OpenSim.Region.Environment.Scenes
} }
public void AddAnimation(string name) public void AddAnimation(string name)
{ {
if(m_isChildAgent) if (m_isChildAgent)
return; return;
// Don't let this animation become the movement animation // Don't let this animation become the movement animation
if(m_animations.Count < 1) if (m_animations.Count < 1)
SetMovementAnimation(Animations.AnimsLLUUID["STAND"]); SetMovementAnimation(Animations.AnimsLLUUID["STAND"]);
LLUUID animID=m_controllingClient.GetDefaultAnimation(name); LLUUID animID=m_controllingClient.GetDefaultAnimation(name);
if(animID == LLUUID.Zero) if (animID == LLUUID.Zero)
return; return;
if (!m_animations.Contains(animID)) if (!m_animations.Contains(animID))
{ {
@ -1179,12 +1179,12 @@ namespace OpenSim.Region.Environment.Scenes
public void RemoveAnimation(string name) public void RemoveAnimation(string name)
{ {
if(m_isChildAgent) if (m_isChildAgent)
return; return;
LLUUID animID=m_controllingClient.GetDefaultAnimation(name); LLUUID animID=m_controllingClient.GetDefaultAnimation(name);
if(animID == LLUUID.Zero) if (animID == LLUUID.Zero)
return; return;
if (m_animations.Contains(animID)) if (m_animations.Contains(animID))
{ {
@ -1199,7 +1199,7 @@ namespace OpenSim.Region.Environment.Scenes
for(idx=0;idx < m_animations.Count;idx++) for(idx=0;idx < m_animations.Count;idx++)
{ {
if(m_animations[idx] == animID) if (m_animations[idx] == animID)
{ {
int seq=m_animationSeqs[idx]; int seq=m_animationSeqs[idx];
@ -1231,7 +1231,7 @@ namespace OpenSim.Region.Environment.Scenes
/// </summary> /// </summary>
protected void SetMovementAnimation(LLUUID anim) protected void SetMovementAnimation(LLUUID anim)
{ {
if(m_animations.Count < 1) if (m_animations.Count < 1)
{ {
m_animations.Add(Animations.AnimsLLUUID["STAND"]); m_animations.Add(Animations.AnimsLLUUID["STAND"]);
m_animationSeqs.Add(1); m_animationSeqs.Add(1);
@ -1649,7 +1649,7 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="seqs"></param> /// <param name="seqs"></param>
public void SendAnimPack(LLUUID[] animations, int[] seqs) public void SendAnimPack(LLUUID[] animations, int[] seqs)
{ {
if(m_isChildAgent) if (m_isChildAgent)
return; return;
m_scene.Broadcast( m_scene.Broadcast(

View File

@ -449,10 +449,10 @@ namespace OpenSim.Region.Examples.SimpleModule
{ {
} }
public LLUUID GetDefaultAnimation(string name) public LLUUID GetDefaultAnimation(string name)
{ {
return LLUUID.Zero; return LLUUID.Zero;
} }
public void SendTakeControls(int controls, bool passToAgent, bool TakeControls) public void SendTakeControls(int controls, bool passToAgent, bool TakeControls)
{ {

View File

@ -532,8 +532,6 @@ namespace OpenSim.Region.ScriptEngine.Common
LLUUID.TryParse(id, out keyID); LLUUID.TryParse(id, out keyID);
m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.SenseOnce(m_localID, m_itemID, name, keyID, type, range, arc, m_host); m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.SenseOnce(m_localID, m_itemID, name, keyID, type, range, arc, m_host);
return;
} }
public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate) public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate)
@ -543,14 +541,12 @@ namespace OpenSim.Region.ScriptEngine.Common
LLUUID.TryParse(id, out keyID); LLUUID.TryParse(id, out keyID);
m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.SetSenseRepeatEvent(m_localID, m_itemID, name, keyID, type, range, arc, rate, m_host); m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.SetSenseRepeatEvent(m_localID, m_itemID, name, keyID, type, range, arc, rate, m_host);
return;
} }
public void llSensorRemove() public void llSensorRemove()
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.UnSetSenseRepeaterEvents(m_localID, m_itemID); m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.UnSetSenseRepeaterEvents(m_localID, m_itemID);
return;
} }
public string resolveName(LLUUID objecUUID) public string resolveName(LLUUID objecUUID)
@ -762,7 +758,6 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
World.DeleteSceneObjectGroup(m_host.ParentGroup); World.DeleteSceneObjectGroup(m_host.ParentGroup);
return;
} }
public double llGround(LSL_Types.Vector3 offset) public double llGround(LSL_Types.Vector3 offset)
@ -849,7 +844,6 @@ namespace OpenSim.Region.ScriptEngine.Common
m_host.SetAxisRotation(statusrotationaxis, value); m_host.SetAxisRotation(statusrotationaxis, value);
} }
return;
} }
public LSL_Types.LSLInteger llGetStatus(int status) public LSL_Types.LSLInteger llGetStatus(int status)
@ -921,7 +915,6 @@ namespace OpenSim.Region.ScriptEngine.Common
tmp.Z = (float)scale.z; tmp.Z = (float)scale.z;
part.Scale = tmp; part.Scale = tmp;
part.SendFullUpdateToAllClients(); part.SendFullUpdateToAllClients();
return;
} }
public LSL_Types.Vector3 llGetScale() public LSL_Types.Vector3 llGetScale()
@ -2139,12 +2132,12 @@ namespace OpenSim.Region.ScriptEngine.Common
if (World.m_innerScene.ScenePresences.ContainsKey(m_host.TaskInventory[invItemID].PermsGranter)) if (World.m_innerScene.ScenePresences.ContainsKey(m_host.TaskInventory[invItemID].PermsGranter))
{ {
ScenePresence presence = World.m_innerScene.ScenePresences[m_host.TaskInventory[invItemID].PermsGranter]; ScenePresence presence = World.m_innerScene.ScenePresences[m_host.TaskInventory[invItemID].PermsGranter];
// Do NOT try to parse LLUUID, animations cannot be triggered by ID // Do NOT try to parse LLUUID, animations cannot be triggered by ID
LLUUID animID=InventoryKey(anim, (int)AssetType.Animation); LLUUID animID=InventoryKey(anim, (int)AssetType.Animation);
if (animID == LLUUID.Zero) if (animID == LLUUID.Zero)
presence.AddAnimation(anim); presence.AddAnimation(anim);
else else
presence.AddAnimation(animID); presence.AddAnimation(animID);
} }
} }
} }
@ -2170,15 +2163,15 @@ namespace OpenSim.Region.ScriptEngine.Common
} }
if (animID == LLUUID.Zero) if (animID == LLUUID.Zero)
return; return;
if (World.m_innerScene.ScenePresences.ContainsKey(m_host.TaskInventory[invItemID].PermsGranter)) if (World.m_innerScene.ScenePresences.ContainsKey(m_host.TaskInventory[invItemID].PermsGranter))
{ {
ScenePresence presence = World.m_innerScene.ScenePresences[m_host.TaskInventory[invItemID].PermsGranter]; ScenePresence presence = World.m_innerScene.ScenePresences[m_host.TaskInventory[invItemID].PermsGranter];
if (animID == LLUUID.Zero) if (animID == LLUUID.Zero)
presence.RemoveAnimation(anim); presence.RemoveAnimation(anim);
else else
presence.RemoveAnimation(animID); presence.RemoveAnimation(animID);
} }
} }
} }
@ -2547,7 +2540,6 @@ namespace OpenSim.Region.ScriptEngine.Common
public void llSetScriptState(string name, int run) public void llSetScriptState(string name, int run)
{ {
LLUUID item; LLUUID item;
ScriptManager sm; ScriptManager sm;
IScript script = null; IScript script = null;
@ -2576,11 +2568,8 @@ namespace OpenSim.Region.ScriptEngine.Common
if (script == null) if (script == null)
ShoutError("llSetScriptState: script "+name+" not found"); ShoutError("llSetScriptState: script "+name+" not found");
// If we didn;t find it, then it's safe to // If we didn't find it, then it's safe to
// assume it is not running. // assume it is not running.
return;
} }
public double llGetEnergy() public double llGetEnergy()
@ -4083,7 +4072,7 @@ namespace OpenSim.Region.ScriptEngine.Common
break; break;
// Xantor 03-May-2008 // Xantor 03-May-2008
// Wiki: PSYS_SRC_TEXTURE string inventory item name or key of the particle texture // Wiki: PSYS_SRC_TEXTURE string inventory item name or key of the particle texture
// "" = default texture. // "" = default texture.
case (int)BuiltIn_Commands_BaseClass.PSYS_SRC_TEXTURE: case (int)BuiltIn_Commands_BaseClass.PSYS_SRC_TEXTURE:
LLUUID tkey = LLUUID.Zero; LLUUID tkey = LLUUID.Zero;
@ -4363,7 +4352,6 @@ namespace OpenSim.Region.ScriptEngine.Common
public void llResetOtherScript(string name) public void llResetOtherScript(string name)
{ {
LLUUID item; LLUUID item;
ScriptManager sm; ScriptManager sm;
IScript script = null; IScript script = null;
@ -4382,16 +4370,12 @@ namespace OpenSim.Region.ScriptEngine.Common
if (script == null) if (script == null)
ShoutError("llResetOtherScript: script "+name+" not found"); ShoutError("llResetOtherScript: script "+name+" not found");
// If we didn;t find it, then it's safe to // If we didn't find it, then it's safe to
// assume it is not running. // assume it is not running.
return;
} }
public LSL_Types.LSLInteger llGetScriptState(string name) public LSL_Types.LSLInteger llGetScriptState(string name)
{ {
LLUUID item; LLUUID item;
ScriptManager sm; ScriptManager sm;
IScript script = null; IScript script = null;
@ -4417,11 +4401,10 @@ namespace OpenSim.Region.ScriptEngine.Common
if (script == null) if (script == null)
ShoutError("llGetScriptState: script "+name+" not found"); ShoutError("llGetScriptState: script "+name+" not found");
// If we didn;t find it, then it's safe to // If we didn't find it, then it's safe to
// assume it is not running. // assume it is not running.
return 0; return 0;
} }
public void llRemoteLoadScript() public void llRemoteLoadScript()
@ -4503,27 +4486,26 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
if ((partInst.LinkNum + 1) == linknumber) if ((partInst.LinkNum + 1) == linknumber)
{ {
part=partInst; part = partInst;
break; break;
} }
} }
} }
else else
{ {
part=m_host; part = m_host;
} }
if (part == null) if (part == null)
return; return;
int idx = 0;
int idx=0; while (idx < rules.Length)
while(idx < rules.Length)
{ {
int code=Convert.ToInt32(rules.Data[idx++]); int code = Convert.ToInt32(rules.Data[idx++]);
int remain=rules.Length-idx; int remain = rules.Length - idx;
int face; int face;
LSL_Types.Vector3 v; LSL_Types.Vector3 v;
@ -4586,7 +4568,6 @@ namespace OpenSim.Region.ScriptEngine.Common
SetScale(part, v); SetScale(part, v);
break; break;
} }
} }
} }
@ -4847,7 +4828,7 @@ namespace OpenSim.Region.ScriptEngine.Common
switch(code) switch(code)
{ {
case 2: // PRIM_MATERIAL case 2: // PRIM_MATERIAL
res.Add(new LSL_Types.LSLInteger(m_host.Material)); res.Add(new LSL_Types.LSLInteger(m_host.Material));
break; break;
case 3: // PRIM_PHYSICS case 3: // PRIM_PHYSICS
@ -4890,7 +4871,7 @@ namespace OpenSim.Region.ScriptEngine.Common
m_host.RotationOffset.W)); m_host.RotationOffset.W));
break; break;
case 9: // PRIM_TYPE case 9: // PRIM_TYPE
// TODO-------------- // TODO--------------
res.Add(new LSL_Types.LSLInteger(0)); res.Add(new LSL_Types.LSLInteger(0));
break; break;
@ -4934,7 +4915,7 @@ namespace OpenSim.Region.ScriptEngine.Common
res.Add(new LSL_Types.LSLFloat((texcolor.A * 255) / 255)); res.Add(new LSL_Types.LSLFloat((texcolor.A * 255) / 255));
break; break;
case 19: // PRIM_BUMP_SHINY case 19: // PRIM_BUMP_SHINY
// TODO-------------- // TODO--------------
if (remain < 1) if (remain < 1)
return res; return res;
@ -4945,7 +4926,7 @@ namespace OpenSim.Region.ScriptEngine.Common
res.Add(new LSL_Types.LSLInteger(0)); res.Add(new LSL_Types.LSLInteger(0));
break; break;
case 20: // PRIM_FULLBRIGHT case 20: // PRIM_FULLBRIGHT
// TODO-------------- // TODO--------------
if (remain < 1) if (remain < 1)
return res; return res;
@ -4955,7 +4936,7 @@ namespace OpenSim.Region.ScriptEngine.Common
res.Add(new LSL_Types.LSLInteger(0)); res.Add(new LSL_Types.LSLInteger(0));
break; break;
case 21: // PRIM_FLEXIBLE case 21: // PRIM_FLEXIBLE
PrimitiveBaseShape shape = m_host.Shape; PrimitiveBaseShape shape = m_host.Shape;
if (shape.FlexiEntry) if (shape.FlexiEntry)
@ -4972,7 +4953,7 @@ namespace OpenSim.Region.ScriptEngine.Common
shape.FlexiForceZ)); shape.FlexiForceZ));
break; break;
case 22: // PRIM_TEXGEN case 22: // PRIM_TEXGEN
// TODO-------------- // TODO--------------
// (PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR) // (PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR)
if (remain < 1) if (remain < 1)
@ -4983,7 +4964,7 @@ namespace OpenSim.Region.ScriptEngine.Common
res.Add(new LSL_Types.LSLInteger(0)); res.Add(new LSL_Types.LSLInteger(0));
break; break;
case 23: // PRIM_POINT_LIGHT: case 23: // PRIM_POINT_LIGHT:
shape = m_host.Shape; shape = m_host.Shape;
if (shape.LightEntry) if (shape.LightEntry)
@ -4998,7 +4979,7 @@ namespace OpenSim.Region.ScriptEngine.Common
res.Add(new LSL_Types.LSLFloat(shape.LightFalloff)); // falloff res.Add(new LSL_Types.LSLFloat(shape.LightFalloff)); // falloff
break; break;
case 24: // PRIM_GLOW case 24: // PRIM_GLOW
// TODO-------------- // TODO--------------
if (remain < 1) if (remain < 1)
return res; return res;
@ -5141,7 +5122,6 @@ namespace OpenSim.Region.ScriptEngine.Common
public string llIntegerToBase64(int number) public string llIntegerToBase64(int number)
{ {
// uninitialized string // uninitialized string
char[] imdt = new char[8]; char[] imdt = new char[8];
@ -5160,7 +5140,6 @@ namespace OpenSim.Region.ScriptEngine.Common
imdt[0] = i2ctable[number>>26 & 0x3F]; imdt[0] = i2ctable[number>>26 & 0x3F];
return new string(imdt); return new string(imdt);
} }
// <summary> // <summary>
@ -5206,7 +5185,6 @@ namespace OpenSim.Region.ScriptEngine.Common
public LSL_Types.LSLInteger llBase64ToInteger(string str) public LSL_Types.LSLInteger llBase64ToInteger(string str)
{ {
int number = 0; int number = 0;
int digit; int digit;
@ -5263,7 +5241,6 @@ namespace OpenSim.Region.ScriptEngine.Common
// ignore trailing padding // ignore trailing padding
return number; return number;
} }
public double llGetGMTclock() public double llGetGMTclock()
@ -5334,7 +5311,6 @@ namespace OpenSim.Region.ScriptEngine.Common
public LSL_Types.list llParseStringKeepNulls(string src, LSL_Types.list separators, LSL_Types.list spacers) public LSL_Types.list llParseStringKeepNulls(string src, LSL_Types.list separators, LSL_Types.list spacers)
{ {
int beginning = 0; int beginning = 0;
int srclen = src.Length; int srclen = src.Length;
int seplen = separators.Length; int seplen = separators.Length;
@ -5456,7 +5432,6 @@ namespace OpenSim.Region.ScriptEngine.Common
} }
return tokens; return tokens;
} }
public void llRezAtRoot(string inventory, LSL_Types.Vector3 position, LSL_Types.Vector3 velocity, public void llRezAtRoot(string inventory, LSL_Types.Vector3 position, LSL_Types.Vector3 velocity,

View File

@ -1157,10 +1157,10 @@ namespace OpenSim.Region.ScriptEngine.Common
return new LSLString(d); return new LSLString(d);
} }
public static implicit operator Vector3(LSLString s) public static implicit operator Vector3(LSLString s)
{ {
return new Vector3(s.m_string); return new Vector3(s.m_string);
} }
#endregion #endregion
@ -1287,15 +1287,15 @@ namespace OpenSim.Region.ScriptEngine.Common
return (double)i.value; return (double)i.value;
} }
public static bool operator true(LSLInteger i) public static bool operator true(LSLInteger i)
{ {
return i.value != 0; return i.value != 0;
} }
public static bool operator false(LSLInteger i) public static bool operator false(LSLInteger i)
{ {
return i.value == 0; return i.value == 0;
} }
#region Overriders #region Overriders