Formatting cleanup.
parent
54e1988d85
commit
b4141f9e56
|
@ -205,7 +205,7 @@ namespace OpenSim.Data.SQLite
|
|||
|
||||
public void StoreRegionSettings(RegionSettings rs)
|
||||
{
|
||||
lock(ds)
|
||||
lock (ds)
|
||||
{
|
||||
DataTable regionsettings = ds.Tables["regionsettings"];
|
||||
|
||||
|
|
|
@ -4793,7 +4793,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
ObjectClickActionPacket ocpacket = (ObjectClickActionPacket)Pack;
|
||||
|
||||
handlerObjectClickAction = OnObjectClickAction;
|
||||
if(handlerObjectClickAction != null)
|
||||
if (handlerObjectClickAction != null)
|
||||
{
|
||||
foreach (ObjectClickActionPacket.ObjectDataBlock odata in ocpacket.ObjectData)
|
||||
{
|
||||
|
|
|
@ -500,16 +500,17 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
|
||||
// TODO if we decide to do sitting in a more SL compatible way (multiple avatars per prim), this has to be fixed, too
|
||||
if(m_sitTargetAvatar != UUID.Zero) {
|
||||
if (m_sitTargetAvatar != UUID.Zero)
|
||||
{
|
||||
if (m_parentGroup != null) // TODO can there be a SOP without a SOG?
|
||||
{
|
||||
ScenePresence avatar;
|
||||
if(m_parentGroup.Scene.TryGetAvatar(m_sitTargetAvatar, out avatar)) {
|
||||
if (m_parentGroup.Scene.TryGetAvatar(m_sitTargetAvatar, out avatar))
|
||||
{
|
||||
avatar.ParentPosition = GetWorldPosition();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3304,27 +3305,33 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
public void SetCameraAtOffset(Vector3 v) {
|
||||
public void SetCameraAtOffset(Vector3 v)
|
||||
{
|
||||
m_cameraAtOffset = v;
|
||||
}
|
||||
|
||||
public void SetCameraEyeOffset(Vector3 v) {
|
||||
public void SetCameraEyeOffset(Vector3 v)
|
||||
{
|
||||
m_cameraEyeOffset = v;
|
||||
}
|
||||
|
||||
public void SetForceMouselook(bool force) {
|
||||
public void SetForceMouselook(bool force)
|
||||
{
|
||||
m_forceMouselook = force;
|
||||
}
|
||||
|
||||
public Vector3 GetCameraAtOffset() {
|
||||
public Vector3 GetCameraAtOffset()
|
||||
{
|
||||
return m_cameraAtOffset;
|
||||
}
|
||||
|
||||
public Vector3 GetCameraEyeOffset() {
|
||||
public Vector3 GetCameraEyeOffset()
|
||||
{
|
||||
return m_cameraEyeOffset;
|
||||
}
|
||||
|
||||
public bool GetForceMouselook() {
|
||||
public bool GetForceMouselook()
|
||||
{
|
||||
return m_forceMouselook;
|
||||
}
|
||||
|
||||
|
|
|
@ -603,18 +603,18 @@ namespace OpenSim.Region.ScriptEngine.Common
|
|||
{
|
||||
|
||||
// Console.WriteLine(""+JSON[i]);
|
||||
switch(JSON[i])
|
||||
switch (JSON[i])
|
||||
{
|
||||
case '{':
|
||||
// create hashtable and add it to the stack or array if we are populating one, we can have a lot of nested objects in JSON
|
||||
|
||||
Hashtable currentObject = new Hashtable();
|
||||
if(objectStack.Count==0) // the stack should only be empty for the first outer object
|
||||
if (objectStack.Count==0) // the stack should only be empty for the first outer object
|
||||
{
|
||||
|
||||
objectStack.Push(jsondata);
|
||||
}
|
||||
else if(objectStack.Peek().ToString()=="System.Collections.ArrayList")
|
||||
else if (objectStack.Peek().ToString()=="System.Collections.ArrayList")
|
||||
{
|
||||
// add it to the parent array
|
||||
((ArrayList)objectStack.Peek()).Add(currentObject);
|
||||
|
@ -640,17 +640,17 @@ namespace OpenSim.Region.ScriptEngine.Common
|
|||
i++; // move to next char
|
||||
|
||||
// just loop through until the next quote mark storing the string
|
||||
while(JSON[i]!='"')
|
||||
while (JSON[i]!='"')
|
||||
{
|
||||
tokenValue+=JSON[i++];
|
||||
}
|
||||
|
||||
// ok we've got a string, if we've got an array on the top of the stack then we store it
|
||||
if(objectStack.Peek().ToString()=="System.Collections.ArrayList")
|
||||
if (objectStack.Peek().ToString()=="System.Collections.ArrayList")
|
||||
{
|
||||
((ArrayList)objectStack.Peek()).Add(tokenValue);
|
||||
}
|
||||
else if(currentKey==null) // no key stored and its not an array this must be a key so store it
|
||||
else if (currentKey==null) // no key stored and its not an array this must be a key so store it
|
||||
{
|
||||
currentKey = tokenValue;
|
||||
}
|
||||
|
@ -672,7 +672,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
|||
case '[': // array start
|
||||
ArrayList currentArray = new ArrayList();
|
||||
|
||||
if(objectStack.Peek().ToString()=="System.Collections.ArrayList")
|
||||
if (objectStack.Peek().ToString()=="System.Collections.ArrayList")
|
||||
{
|
||||
((ArrayList)objectStack.Peek()).Add(currentArray);
|
||||
}
|
||||
|
@ -694,7 +694,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
|||
break;
|
||||
case 't': // we've found a character start not in quotes, it must be a boolean true
|
||||
|
||||
if(objectStack.Peek().ToString()=="System.Collections.ArrayList")
|
||||
if (objectStack.Peek().ToString()=="System.Collections.ArrayList")
|
||||
{
|
||||
((ArrayList)objectStack.Peek()).Add(true);
|
||||
}
|
||||
|
@ -708,7 +708,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
|||
break;
|
||||
case 'f': // we've found a character start not in quotes, it must be a boolean false
|
||||
|
||||
if(objectStack.Peek().ToString()=="System.Collections.ArrayList")
|
||||
if (objectStack.Peek().ToString()=="System.Collections.ArrayList")
|
||||
{
|
||||
((ArrayList)objectStack.Peek()).Add(false);
|
||||
}
|
||||
|
@ -727,7 +727,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
|||
string numberValue="";
|
||||
|
||||
// just loop through until the next known marker quote mark storing the string
|
||||
while(JSON[i] != '"' && JSON[i] != ',' && JSON[i] != ']' && JSON[i] != '}' && JSON[i] != ' ')
|
||||
while (JSON[i] != '"' && JSON[i] != ',' && JSON[i] != ']' && JSON[i] != '}' && JSON[i] != ' ')
|
||||
{
|
||||
numberValue+=""+JSON[i++];
|
||||
}
|
||||
|
@ -735,7 +735,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
|||
i--; // we want to process this caracter that marked the end of this string in the main loop
|
||||
|
||||
// ok we've got a string, if we've got an array on the top of the stack then we store it
|
||||
if(objectStack.Peek().ToString()=="System.Collections.ArrayList")
|
||||
if (objectStack.Peek().ToString()=="System.Collections.ArrayList")
|
||||
{
|
||||
((ArrayList)objectStack.Peek()).Add(numberValue);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue