Formatting cleanup.
parent
e34f537a1a
commit
5752c1f5c2
|
@ -72,7 +72,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
switch(idx.ToLower())
|
switch (idx.ToLower())
|
||||||
{
|
{
|
||||||
case "name":
|
case "name":
|
||||||
return region_name;
|
return region_name;
|
||||||
|
|
|
@ -296,7 +296,7 @@ namespace OpenSim.ApplicationPlugins.Rest
|
||||||
public bool RemoveAgentHandler(string agentName, IHttpAgentHandler handler)
|
public bool RemoveAgentHandler(string agentName, IHttpAgentHandler handler)
|
||||||
{
|
{
|
||||||
if (!IsEnabled) return false;
|
if (!IsEnabled) return false;
|
||||||
if(_agents[agentName] == handler)
|
if (_agents[agentName] == handler)
|
||||||
{
|
{
|
||||||
_agents.Remove(agentName);
|
_agents.Remove(agentName);
|
||||||
return _httpd.RemoveAgentHandler(agentName, handler);
|
return _httpd.RemoveAgentHandler(agentName, handler);
|
||||||
|
|
|
@ -485,10 +485,10 @@ namespace OpenSim.Framework.Communications.Cache
|
||||||
{
|
{
|
||||||
if (HasInventory)
|
if (HasInventory)
|
||||||
{
|
{
|
||||||
if(item.Folder == LLUUID.Zero)
|
if (item.Folder == LLUUID.Zero)
|
||||||
{
|
{
|
||||||
InventoryFolderImpl f=FindFolderForType(item.AssetType);
|
InventoryFolderImpl f=FindFolderForType(item.AssetType);
|
||||||
if(f != null)
|
if (f != null)
|
||||||
item.Folder=f.ID;
|
item.Folder=f.ID;
|
||||||
else
|
else
|
||||||
item.Folder=RootFolder.ID;
|
item.Folder=RootFolder.ID;
|
||||||
|
@ -617,14 +617,14 @@ namespace OpenSim.Framework.Communications.Cache
|
||||||
|
|
||||||
private InventoryFolderImpl FindFolderForType(int type)
|
private InventoryFolderImpl FindFolderForType(int type)
|
||||||
{
|
{
|
||||||
if(RootFolder == null)
|
if (RootFolder == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
lock(RootFolder.SubFolders)
|
lock (RootFolder.SubFolders)
|
||||||
{
|
{
|
||||||
foreach (InventoryFolderImpl f in RootFolder.SubFolders.Values)
|
foreach (InventoryFolderImpl f in RootFolder.SubFolders.Values)
|
||||||
{
|
{
|
||||||
if(f.Type == type)
|
if (f.Type == type)
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -310,19 +310,20 @@ namespace OpenSim.Framework.Servers
|
||||||
agentHandler = null;
|
agentHandler = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
foreach(IHttpAgentHandler handler in m_agentHandlers.Values)
|
foreach (IHttpAgentHandler handler in m_agentHandlers.Values)
|
||||||
{
|
{
|
||||||
if(handler.Match(request, response))
|
if (handler.Match(request, response))
|
||||||
{
|
{
|
||||||
agentHandler = handler;
|
agentHandler = handler;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(KeyNotFoundException) {}
|
catch(KeyNotFoundException)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -478,7 +479,6 @@ namespace OpenSim.Framework.Servers
|
||||||
|
|
||||||
private bool HandleAgentRequest(IHttpAgentHandler handler, OSHttpRequest request, OSHttpResponse response)
|
private bool HandleAgentRequest(IHttpAgentHandler handler, OSHttpRequest request, OSHttpResponse response)
|
||||||
{
|
{
|
||||||
|
|
||||||
// In the case of REST, then handler is responsible for ALL aspects of
|
// In the case of REST, then handler is responsible for ALL aspects of
|
||||||
// the request/response handling. Nothing is done here, not even encoding.
|
// the request/response handling. Nothing is done here, not even encoding.
|
||||||
|
|
||||||
|
@ -500,11 +500,12 @@ namespace OpenSim.Framework.Servers
|
||||||
response.StatusCode = (int)OSHttpStatusCode.ServerErrorInternalError;
|
response.StatusCode = (int)OSHttpStatusCode.ServerErrorInternalError;
|
||||||
response.OutputStream.Close();
|
response.OutputStream.Close();
|
||||||
}
|
}
|
||||||
catch(Exception){}
|
catch(Exception)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void HandleHTTPRequest(OSHttpRequest request, OSHttpResponse response)
|
public void HandleHTTPRequest(OSHttpRequest request, OSHttpResponse response)
|
||||||
|
@ -759,13 +760,16 @@ namespace OpenSim.Framework.Servers
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if(handler == m_agentHandlers[agent])
|
if (handler == m_agentHandlers[agent])
|
||||||
{
|
{
|
||||||
m_agentHandlers.Remove(agent);
|
m_agentHandlers.Remove(agent);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(KeyNotFoundException) {}
|
catch(KeyNotFoundException)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -569,7 +569,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
|
||||||
{
|
{
|
||||||
foreach (ListenerInfo l in list)
|
foreach (ListenerInfo l in list)
|
||||||
{
|
{
|
||||||
if(l.GetItemID() == itemID)
|
if (l.GetItemID() == itemID)
|
||||||
data.AddRange(l.GetSerializationData());
|
data.AddRange(l.GetSerializationData());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -582,14 +582,14 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
Object[] item = new Object[6];
|
Object[] item = new Object[6];
|
||||||
|
|
||||||
while(idx < data.Length)
|
while (idx < data.Length)
|
||||||
{
|
{
|
||||||
Array.Copy(data, idx, item, 0, 6);
|
Array.Copy(data, idx, item, 0, 6);
|
||||||
|
|
||||||
ListenerInfo info =
|
ListenerInfo info =
|
||||||
ListenerInfo.FromData(localID, itemID, hostID, item);
|
ListenerInfo.FromData(localID, itemID, hostID, item);
|
||||||
|
|
||||||
if(!m_listeners.ContainsKey((int)item[2]))
|
if (!m_listeners.ContainsKey((int)item[2]))
|
||||||
m_listeners.Add((int)item[2], new List<ListenerInfo>());
|
m_listeners.Add((int)item[2], new List<ListenerInfo>());
|
||||||
m_listeners[(int)item[2]].Add(info);
|
m_listeners[(int)item[2]].Add(info);
|
||||||
|
|
||||||
|
|
|
@ -360,7 +360,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
group.SetGroup(GroupID, remoteClient);
|
group.SetGroup(GroupID, remoteClient);
|
||||||
else
|
else
|
||||||
remoteClient.SendAgentAlertMessage("You don't have permission to set the group", false);
|
remoteClient.SendAgentAlertMessage("You don't have permission to set the group", false);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -863,7 +862,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
grp.scriptScore = 0;
|
grp.scriptScore = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
public void AddUploadedInventoryItem(LLUUID agentID, InventoryItemBase item)
|
public void AddUploadedInventoryItem(LLUUID agentID, InventoryItemBase item)
|
||||||
{
|
{
|
||||||
IMoneyModule money=RequestModuleInterface<IMoneyModule>();
|
IMoneyModule money=RequestModuleInterface<IMoneyModule>();
|
||||||
if(money != null)
|
if (money != null)
|
||||||
{
|
{
|
||||||
money.ApplyUploadCharge(agentID);
|
money.ApplyUploadCharge(agentID);
|
||||||
}
|
}
|
||||||
|
@ -930,7 +930,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
if (part != null)
|
if (part != null)
|
||||||
{
|
{
|
||||||
TaskInventoryItem currentItem=part.GetInventoryItem(itemID);
|
TaskInventoryItem currentItem=part.GetInventoryItem(itemID);
|
||||||
if(currentItem == null)
|
if (currentItem == null)
|
||||||
{
|
{
|
||||||
LLUUID copyID = LLUUID.Random();
|
LLUUID copyID = LLUUID.Random();
|
||||||
if (itemID != LLUUID.Zero)
|
if (itemID != LLUUID.Zero)
|
||||||
|
@ -972,9 +972,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
else // Updating existing item with new perms etc
|
else // Updating existing item with new perms etc
|
||||||
{
|
{
|
||||||
TaskInventoryItem prevItem=part.GetInventoryItem(itemID);
|
TaskInventoryItem prevItem=part.GetInventoryItem(itemID);
|
||||||
itemInfo.AssetID = prevItem.AssetID;
|
itemInfo.AssetID = prevItem.AssetID;
|
||||||
if(part.UpdateInventoryItem(itemInfo))
|
if (part.UpdateInventoryItem(itemInfo))
|
||||||
part.GetProperties(remoteClient);
|
part.GetProperties(remoteClient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -293,7 +293,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
LLUUID itemID)
|
LLUUID itemID)
|
||||||
{
|
{
|
||||||
SceneObjectPart part=GetSceneObjectPart(objectID);
|
SceneObjectPart part=GetSceneObjectPart(objectID);
|
||||||
if(part == null)
|
if (part == null)
|
||||||
return;
|
return;
|
||||||
EventManager.TriggerScriptReset(part.LocalId, itemID);
|
EventManager.TriggerScriptReset(part.LocalId, itemID);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2100,26 +2100,26 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// <param name="pos"></param>
|
/// <param name="pos"></param>
|
||||||
public void UpdateOffSet(LLVector3 pos)
|
public void UpdateOffSet(LLVector3 pos)
|
||||||
{
|
{
|
||||||
if ((pos.X != OffsetPosition.X) ||
|
if ((pos.X != OffsetPosition.X) ||
|
||||||
(pos.Y != OffsetPosition.Y) ||
|
(pos.Y != OffsetPosition.Y) ||
|
||||||
(pos.Z != OffsetPosition.Z))
|
(pos.Z != OffsetPosition.Z))
|
||||||
{
|
{
|
||||||
LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
|
LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
|
||||||
OffsetPosition = newPos;
|
OffsetPosition = newPos;
|
||||||
ScheduleTerseUpdate();
|
ScheduleTerseUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateGroupPosition(LLVector3 pos)
|
public void UpdateGroupPosition(LLVector3 pos)
|
||||||
{
|
{
|
||||||
if ((pos.X != GroupPosition.X) ||
|
if ((pos.X != GroupPosition.X) ||
|
||||||
(pos.Y != GroupPosition.Y) ||
|
(pos.Y != GroupPosition.Y) ||
|
||||||
(pos.Z != GroupPosition.Z))
|
(pos.Z != GroupPosition.Z))
|
||||||
{
|
{
|
||||||
LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
|
LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
|
||||||
GroupPosition = newPos;
|
GroupPosition = newPos;
|
||||||
ScheduleTerseUpdate();
|
ScheduleTerseUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -2128,15 +2128,15 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
public void UpdateRotation(LLQuaternion rot)
|
public void UpdateRotation(LLQuaternion rot)
|
||||||
{
|
{
|
||||||
if ((rot.X != RotationOffset.X) ||
|
if ((rot.X != RotationOffset.X) ||
|
||||||
(rot.Y != RotationOffset.Y) ||
|
(rot.Y != RotationOffset.Y) ||
|
||||||
(rot.Z != RotationOffset.Z) ||
|
(rot.Z != RotationOffset.Z) ||
|
||||||
(rot.W != RotationOffset.W))
|
(rot.W != RotationOffset.W))
|
||||||
{
|
{
|
||||||
//StoreUndoState();
|
//StoreUndoState();
|
||||||
RotationOffset = new LLQuaternion(rot.X, rot.Y, rot.Z, rot.W);
|
RotationOffset = new LLQuaternion(rot.X, rot.Y, rot.Z, rot.W);
|
||||||
ScheduleTerseUpdate();
|
ScheduleTerseUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -1407,9 +1407,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
if (remoteAvatar == null)
|
if (remoteAvatar == null)
|
||||||
return;
|
return;
|
||||||
IClientAPI cl=remoteAvatar.ControllingClient;
|
IClientAPI cl=remoteAvatar.ControllingClient;
|
||||||
if(cl == null)
|
if (cl == null)
|
||||||
return;
|
return;
|
||||||
if(m_appearance.Texture == null)
|
if (m_appearance.Texture == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
remoteAvatar.m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid,
|
remoteAvatar.m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid,
|
||||||
|
|
|
@ -157,7 +157,7 @@ namespace OpenSim.Region.Modules.AvatarFactory
|
||||||
{
|
{
|
||||||
IClientAPI clientView = (IClientAPI)sender;
|
IClientAPI clientView = (IClientAPI)sender;
|
||||||
ScenePresence avatar = m_scene.GetScenePresence(clientView.AgentId);
|
ScenePresence avatar = m_scene.GetScenePresence(clientView.AgentId);
|
||||||
if(avatar == null) {
|
if (avatar == null) {
|
||||||
m_log.Info("Avatar is child agent, ignoring AvatarIsWearing event");
|
m_log.Info("Avatar is child agent, ignoring AvatarIsWearing event");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -165,7 +165,7 @@ namespace OpenSim.Region.Modules.AvatarFactory
|
||||||
CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(clientView.AgentId);
|
CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(clientView.AgentId);
|
||||||
|
|
||||||
AvatarAppearance avatAppearance = null;
|
AvatarAppearance avatAppearance = null;
|
||||||
if(!TryGetAvatarAppearance(clientView.AgentId, out avatAppearance)) {
|
if (!TryGetAvatarAppearance(clientView.AgentId, out avatAppearance)) {
|
||||||
m_log.Info("We didn't seem to find the appearance, falling back to ScenePresense");
|
m_log.Info("We didn't seem to find the appearance, falling back to ScenePresense");
|
||||||
avatAppearance = avatar.Appearance;
|
avatAppearance = avatar.Appearance;
|
||||||
}
|
}
|
||||||
|
|
|
@ -304,7 +304,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
|
||||||
{
|
{
|
||||||
int colon=t.IndexOf(":");
|
int colon=t.IndexOf(":");
|
||||||
|
|
||||||
if(-1 != colon)
|
if (-1 != colon)
|
||||||
{
|
{
|
||||||
line = " at line " + Convert.ToInt32(t.Substring(colon + 1)).ToString();
|
line = " at line " + Convert.ToInt32(t.Substring(colon + 1)).ToString();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -78,7 +78,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
|
||||||
// Xantor 20080525: I need assetID here to see if we already compiled this one previously
|
// Xantor 20080525: I need assetID here to see if we already compiled this one previously
|
||||||
LLUUID assetID = LLUUID.Zero;
|
LLUUID assetID = LLUUID.Zero;
|
||||||
TaskInventoryItem taskInventoryItem = new TaskInventoryItem();
|
TaskInventoryItem taskInventoryItem = new TaskInventoryItem();
|
||||||
if(m_host.TaskInventory.TryGetValue(itemID,out taskInventoryItem))
|
if (m_host.TaskInventory.TryGetValue(itemID,out taskInventoryItem))
|
||||||
assetID = taskInventoryItem.AssetID;
|
assetID = taskInventoryItem.AssetID;
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue