Update svn properties. Formatting cleanup. Remove a compiler warning.

0.6.0-stable
Jeff Ames 2008-07-23 13:24:25 +00:00
parent 9e8b456bbc
commit 80d8e2889e
29 changed files with 402 additions and 396 deletions

View File

@ -101,9 +101,11 @@ namespace OpenSim.Data.MySQL
BindingFlags.DeclaredOnly);
foreach (FieldInfo f in m_Fields)
if(f.Name.Substring(0, 2) == "m_")
{
if (f.Name.Substring(0, 2) == "m_")
m_FieldMap[f.Name.Substring(2)] = f;
}
}
private string[] FieldList
{
@ -171,14 +173,14 @@ namespace OpenSim.Data.MySQL
IDataReader r = cmd.ExecuteReader();
if(r.Read())
if (r.Read())
{
foreach (string name in FieldList)
{
if(m_FieldMap[name].GetValue(es) is bool)
if (m_FieldMap[name].GetValue(es) is bool)
{
int v = Convert.ToInt32(r[name]);
if(v != 0)
if (v != 0)
m_FieldMap[name].SetValue(es, true);
else
m_FieldMap[name].SetValue(es, false);
@ -207,9 +209,9 @@ namespace OpenSim.Data.MySQL
foreach (string name in FieldList)
{
if(m_FieldMap[name].GetValue(es) is bool)
if (m_FieldMap[name].GetValue(es) is bool)
{
if((bool)m_FieldMap[name].GetValue(es))
if ((bool)m_FieldMap[name].GetValue(es))
cmd.Parameters.AddWithValue("?"+name, "1");
else
cmd.Parameters.AddWithValue("?"+name, "0");
@ -283,9 +285,9 @@ namespace OpenSim.Data.MySQL
foreach (string name in FieldList)
{
if(m_FieldMap[name].GetValue(es) is bool)
if (m_FieldMap[name].GetValue(es) is bool)
{
if((bool)m_FieldMap[name].GetValue(es))
if ((bool)m_FieldMap[name].GetValue(es))
cmd.Parameters.AddWithValue("?"+name, "1");
else
cmd.Parameters.AddWithValue("?"+name, "0");
@ -317,7 +319,7 @@ namespace OpenSim.Data.MySQL
IDataReader r = cmd.ExecuteReader();
while(r.Read())
while (r.Read())
{
EstateBan eb = new EstateBan();
@ -347,7 +349,7 @@ namespace OpenSim.Data.MySQL
cmd.CommandText = "insert into estateban (EstateID, bannedUUID) values ( ?EstateID, ?bannedUUID )";
foreach(EstateBan b in es.EstateBans)
foreach (EstateBan b in es.EstateBans)
{
cmd.Parameters.AddWithValue("?EstateID", es.EstateID.ToString());
cmd.Parameters.AddWithValue("?bannedUUID", b.bannedUUID.ToString());
@ -372,7 +374,7 @@ namespace OpenSim.Data.MySQL
cmd.CommandText = "insert into "+table+" (EstateID, uuid) values ( ?EstateID, ?uuid )";
foreach(LLUUID uuid in data)
foreach (LLUUID uuid in data)
{
cmd.Parameters.AddWithValue("?EstateID", EstateID.ToString());
cmd.Parameters.AddWithValue("?uuid", uuid.ToString());
@ -395,7 +397,7 @@ namespace OpenSim.Data.MySQL
IDataReader r = cmd.ExecuteReader();
while(r.Read())
while (r.Read())
{
// EstateBan eb = new EstateBan();

View File

@ -94,7 +94,7 @@ namespace OpenSim.Data.SQLite
/// <returns>Asset base</returns>
override public AssetBase FetchAsset(LLUUID uuid)
{
lock(this)
lock (this)
{
using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn))
{
@ -130,7 +130,8 @@ namespace OpenSim.Data.SQLite
}
else
{
lock(this) {
lock (this)
{
using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn))
{
cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID)));
@ -155,7 +156,8 @@ namespace OpenSim.Data.SQLite
{
LogAssetLoad(asset);
lock(this) {
lock (this)
{
using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn))
{
cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID)));

View File

@ -74,7 +74,7 @@ namespace OpenSim.Data.SQLite
BindingFlags.DeclaredOnly);
foreach (FieldInfo f in m_Fields)
if(f.Name.Substring(0, 2) == "m_")
if (f.Name.Substring(0, 2) == "m_")
m_FieldMap[f.Name.Substring(2)] = f;
}
@ -97,14 +97,14 @@ namespace OpenSim.Data.SQLite
IDataReader r = cmd.ExecuteReader();
if(r.Read())
if (r.Read())
{
foreach (string name in FieldList)
{
if(m_FieldMap[name].GetValue(es) is bool)
if (m_FieldMap[name].GetValue(es) is bool)
{
int v = Convert.ToInt32(r[name]);
if(v != 0)
if (v != 0)
m_FieldMap[name].SetValue(es, true);
else
m_FieldMap[name].SetValue(es, false);
@ -133,9 +133,9 @@ namespace OpenSim.Data.SQLite
foreach (string name in FieldList)
{
if(m_FieldMap[name].GetValue(es) is bool)
if (m_FieldMap[name].GetValue(es) is bool)
{
if((bool)m_FieldMap[name].GetValue(es))
if ((bool)m_FieldMap[name].GetValue(es))
cmd.Parameters.Add(":"+name, "1");
else
cmd.Parameters.Add(":"+name, "0");
@ -215,9 +215,9 @@ namespace OpenSim.Data.SQLite
foreach (string name in FieldList)
{
if(m_FieldMap[name].GetValue(es) is bool)
if (m_FieldMap[name].GetValue(es) is bool)
{
if((bool)m_FieldMap[name].GetValue(es))
if ((bool)m_FieldMap[name].GetValue(es))
cmd.Parameters.Add(":"+name, "1");
else
cmd.Parameters.Add(":"+name, "0");
@ -247,7 +247,7 @@ namespace OpenSim.Data.SQLite
IDataReader r = cmd.ExecuteReader();
while(r.Read())
while (r.Read())
{
EstateBan eb = new EstateBan();
@ -275,7 +275,7 @@ namespace OpenSim.Data.SQLite
cmd.CommandText = "insert into estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask) values ( :EstateID, :bannedUUID, '', '', '' )";
foreach(EstateBan b in es.EstateBans)
foreach (EstateBan b in es.EstateBans)
{
cmd.Parameters.Add(":EstateID", es.EstateID.ToString());
cmd.Parameters.Add(":bannedUUID", b.bannedUUID.ToString());
@ -298,7 +298,7 @@ namespace OpenSim.Data.SQLite
cmd.CommandText = "insert into "+table+" (EstateID, uuid) values ( :EstateID, :uuid )";
foreach(LLUUID uuid in data)
foreach (LLUUID uuid in data)
{
cmd.Parameters.Add(":EstateID", EstateID.ToString());
cmd.Parameters.Add(":uuid", uuid.ToString());
@ -319,7 +319,7 @@ namespace OpenSim.Data.SQLite
IDataReader r = cmd.ExecuteReader();
while(r.Read())
while (r.Read())
{
// EstateBan eb = new EstateBan();

View File

@ -63,7 +63,7 @@ namespace OpenSim.Framework
Monitor.Wait(m_queueSync);
}
if(m_pqueue.Count > 0)
if (m_pqueue.Count > 0)
return m_pqueue.Dequeue();
return m_queue.Dequeue();
}
@ -73,7 +73,7 @@ namespace OpenSim.Framework
{
lock (m_queueSync)
{
if(m_pqueue.Contains(item))
if (m_pqueue.Contains(item))
return true;
return m_queue.Contains(item);
}

View File

@ -447,7 +447,7 @@ namespace OpenSim.Framework.Communications.Cache
RequestedAssets.Remove(assetInf.FullID);
// If it's a direct request for a script, drop it
// because it's a hacked client
if(req.AssetRequestSource != 2 || assetInf.Type != 10)
if (req.AssetRequestSource != 2 || assetInf.Type != 10)
AssetRequests.Add(req);
}
}

View File

@ -728,7 +728,7 @@ namespace OpenSim.Framework.Communications.Cache
public void Execute()
{
if(m_delegate != null)
if (m_delegate != null)
m_delegate.DynamicInvoke(m_args);
}
}

View File

@ -233,7 +233,7 @@ namespace OpenSim.Framework
public void Save()
{
if(OnSave != null)
if (OnSave != null)
OnSave(this);
}

View File

@ -4737,51 +4737,51 @@ namespace OpenSim.Region.ClientStack.LindenUDP
requestID = new LLUUID(transfer.TransferInfo.Params, 80);
if (!(((Scene)m_scene).ExternalChecks.ExternalChecksBypassPermissions()))
{
if(taskID != LLUUID.Zero) // Prim
if (taskID != LLUUID.Zero) // Prim
{
SceneObjectPart part = ((Scene)m_scene).GetSceneObjectPart(taskID);
if(part == null)
if (part == null)
break;
if(part.OwnerID != AgentId)
if (part.OwnerID != AgentId)
break;
if((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
break;
TaskInventoryItem ti = part.GetInventoryItem(itemID);
if(ti == null)
if (ti == null)
break;
if(ti.OwnerID != AgentId)
if (ti.OwnerID != AgentId)
break;
if((ti.OwnerMask & ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer))
if ((ti.OwnerMask & ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer))
break;
if(ti.AssetID != requestID)
if (ti.AssetID != requestID)
break;
}
else // Agent
{
CachedUserInfo userInfo = ((Scene)m_scene).CommsManager.UserProfileCacheService.GetUserDetails(AgentId);
if(userInfo == null)
if (userInfo == null)
break;
if(userInfo.RootFolder == null)
if (userInfo.RootFolder == null)
break;
InventoryItemBase assetRequestItem = userInfo.RootFolder.FindItem(itemID);
if(assetRequestItem == null)
if (assetRequestItem == null)
{
assetRequestItem = ((Scene)m_scene).CommsManager.UserProfileCacheService.libraryRoot.FindItem(itemID);
if(assetRequestItem == null)
if (assetRequestItem == null)
return;
}
if((assetRequestItem.CurrentPermissions & ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer))
if ((assetRequestItem.CurrentPermissions & ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer))
break;
if(assetRequestItem.AssetID != requestID)
if (assetRequestItem.AssetID != requestID)
break;
}
}

View File

@ -230,14 +230,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
packet.Header.Sequence = NextPacketSequenceNumber();
lock(m_NeedAck)
lock (m_NeedAck)
{
DropResend(id);
QueuePacket(packet, throttlePacketType, id);
// We want to see that packet arrive if it's reliable
if(packet.Header.Reliable)
if (packet.Header.Reliable)
{
m_UnackedBytes += packet.ToBytes().Length;
m_NeedAck[packet.Header.Sequence] = new AckData(packet, id);
@ -251,10 +251,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
// Add acks to outgoing packets
//
if(m_PendingAcks.Count > 0)
if (m_PendingAcks.Count > 0)
{
int count = m_PendingAcks.Count;
if(count > 10)
if (count > 10)
count = 10;
packet.Header.AckList = new uint[count];
@ -291,14 +291,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// anything. There may not be a client there, don't clog up the
// pipes.
//
if(lastAck == 0)
if (lastAck == 0)
return;
lock (m_NeedAck)
{
// Nothing to do
//
if(m_NeedAck.Count == 0)
if (m_NeedAck.Count == 0)
return;
// If we have seen no acks in <SilenceLimit> s but are
@ -336,7 +336,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
//
if ((now - packet.TickCount) > m_DiscardTimeout)
{
if(!m_ImportantPackets.Contains(packet.Type))
if (!m_ImportantPackets.Contains(packet.Type))
m_NeedAck.Remove(packet.Header.Sequence);
TriggerOnPacketDrop(packet, data.Identifier);
@ -364,7 +364,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// the counter reaches 250. So there is a good chance another
// packet with 250 blocks exists.
//
if(acks.Packets == null ||
if (acks.Packets == null ||
acks.Packets.Length != m_PendingAcks.Count)
acks.Packets = new PacketAckPacket.PacketsBlock[m_PendingAcks.Count];
int i = 0;
@ -389,9 +389,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
lock (m_PendingAcks)
{
if(m_PendingAcks.Count < 250)
if (m_PendingAcks.Count < 250)
{
if(!m_PendingAcks.ContainsKey(packet.Header.Sequence))
if (!m_PendingAcks.ContainsKey(packet.Header.Sequence))
m_PendingAcks.Add(packet.Header.Sequence,
packet.Header.Sequence);
return;
@ -405,9 +405,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// If this is still full we have a truly exceptional
// condition (means, can't happen)
//
if(m_PendingAcks.Count < 250)
if (m_PendingAcks.Count < 250)
{
if(!m_PendingAcks.ContainsKey(packet.Header.Sequence))
if (!m_PendingAcks.ContainsKey(packet.Header.Sequence))
m_PendingAcks.Add(packet.Header.Sequence,
packet.Header.Sequence);
return;
@ -454,7 +454,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
foreach (uint pack in packs.Keys)
{
if(Util.UnixTimeSinceEpoch() - m_DupeTracker[pack] >
if (Util.UnixTimeSinceEpoch() - m_DupeTracker[pack] >
m_DupeTrackerWindow)
m_DupeTracker.Remove(pack);
}
@ -463,13 +463,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public void InPacket(Packet packet)
{
if(packet == null)
if (packet == null)
return;
// If this client is on another partial instance, no need
// to handle packets
//
if(!m_Client.IsActive && packet.Type != PacketType.LogoutRequest)
if (!m_Client.IsActive && packet.Type != PacketType.LogoutRequest)
{
PacketPool.Instance.ReturnPacket(packet);
return;
@ -478,9 +478,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// Any packet can have some packet acks in the header.
// Process them here
//
if(packet.Header.AppendedAcks)
if (packet.Header.AppendedAcks)
{
foreach(uint id in packet.Header.AckList)
foreach (uint id in packet.Header.AckList)
{
ProcessAck(id);
}
@ -489,7 +489,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// When too many acks are needed to be sent, the client sends
// a packet consisting of acks only
//
if(packet.Type == PacketType.PacketAck)
if (packet.Type == PacketType.PacketAck)
{
PacketAckPacket ackPacket = (PacketAckPacket)packet;
@ -502,7 +502,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
PacketPool.Instance.ReturnPacket(packet);
return;
}
else if(packet.Type == PacketType.StartPingCheck)
else if (packet.Type == PacketType.StartPingCheck)
{
StartPingCheckPacket startPing = (StartPingCheckPacket)packet;
CompletePingCheckPacket endPing = (CompletePingCheckPacket)PacketPool.Instance.GetPacket(PacketType.CompletePingCheck);
@ -560,9 +560,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
AckData data;
Packet packet;
lock(m_NeedAck)
lock (m_NeedAck)
{
if(!m_NeedAck.TryGetValue(id, out data))
if (!m_NeedAck.TryGetValue(id, out data))
return;
packet = data.Packet;
@ -650,7 +650,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public void AddImportantPacket(PacketType type)
{
if(m_ImportantPackets.Contains(type))
if (m_ImportantPackets.Contains(type))
return;
m_ImportantPackets.Add(type);
@ -658,7 +658,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public void RemoveImportantPacket(PacketType type)
{
if(!m_ImportantPackets.Contains(type))
if (!m_ImportantPackets.Contains(type))
return;
m_ImportantPackets.Remove(type);
@ -668,7 +668,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
foreach (AckData data in new List<AckData>(m_NeedAck.Values))
{
if(data.Identifier != null && data.Identifier == id)
if (data.Identifier != null && data.Identifier == id)
{
m_NeedAck.Remove(data.Packet.Header.Sequence);
return;
@ -680,7 +680,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
PacketDrop handlerPacketDrop = OnPacketDrop;
if(handlerPacketDrop == null)
if (handlerPacketDrop == null)
return;
handlerPacketDrop(packet, id);

View File

@ -338,7 +338,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (TaskThrottle.UnderLimit() && (TaskOutgoingPacketQueue.Count > 0 || TaskLowpriorityPacketQueue.Count > 0))
{
LLQueItem qpack;
if(TaskOutgoingPacketQueue.Count > 0)
if (TaskOutgoingPacketQueue.Count > 0)
{
qpack = TaskOutgoingPacketQueue.Dequeue();
SendQueue.PriorityEnqueue(qpack);

View File

@ -40,7 +40,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
/// </summary>
public class AssetsArchiver
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
/// <summary>
/// Archive assets

View File

@ -52,7 +52,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
//SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, LLUUID covenant)
uint sun = 0;
if(!m_scene.RegionInfo.EstateSettings.UseGlobalTime)
if (!m_scene.RegionInfo.EstateSettings.UseGlobalTime)
sun=(uint)(m_scene.RegionInfo.EstateSettings.SunPosition*1024.0) + 0x1800;
remote_client.SendDetailedEstateData(invoice,
m_scene.RegionInfo.EstateSettings.EstateName,
@ -98,7 +98,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
m_scene.RegionInfo.RegionSettings.ObjectBonus = objectBonusFactor;
if(matureLevel <= 13)
if (matureLevel <= 13)
m_scene.RegionInfo.RegionSettings.Maturity = 0;
else
m_scene.RegionInfo.RegionSettings.Maturity = 1;
@ -245,7 +245,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
ScenePresence s = m_scene.GetScenePresence(user);
if (s != null)
{
if(!s.IsChildAgent)
if (!s.IsChildAgent)
m_scene.TeleportClientHome(user, s.ControllingClient);
}
@ -395,7 +395,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
args.redirectGridY = m_scene.RegionInfo.EstateSettings.RedirectGridY;
args.regionFlags = GetRegionFlags();
byte mature = 13;
if(m_scene.RegionInfo.RegionSettings.Maturity == 1)
if (m_scene.RegionInfo.RegionSettings.Maturity == 1)
mature = 21;
args.simAccess = mature;
@ -550,7 +550,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
args.terrainStartHeight3 = (float)m_scene.RegionInfo.RegionSettings.Elevation1NE;
args.terrainHeightRange3 = (float)m_scene.RegionInfo.RegionSettings.Elevation2NE;
byte mature = 13;
if(m_scene.RegionInfo.RegionSettings.Maturity == 1)
if (m_scene.RegionInfo.RegionSettings.Maturity == 1)
mature = 21;
args.simAccess = mature;
args.waterHeight = (float)m_scene.RegionInfo.RegionSettings.WaterHeight;
@ -579,7 +579,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
public void handleEstateChangeInfo(IClientAPI remoteClient, LLUUID invoice, LLUUID senderID, UInt32 parms1, UInt32 parms2)
{
if(parms2 == 0)
if (parms2 == 0)
{
m_scene.RegionInfo.EstateSettings.UseGlobalTime = true;
m_scene.RegionInfo.EstateSettings.SunPosition = 0.0;
@ -590,37 +590,37 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
m_scene.RegionInfo.EstateSettings.SunPosition = (double)(parms2 - 0x1800)/1024.0;
}
if((parms1 & 0x00000010) != 0)
if ((parms1 & 0x00000010) != 0)
m_scene.RegionInfo.EstateSettings.FixedSun = true;
else
m_scene.RegionInfo.EstateSettings.FixedSun = false;
if((parms1 & 0x00008000) != 0)
if ((parms1 & 0x00008000) != 0)
m_scene.RegionInfo.EstateSettings.PublicAccess = true;
else
m_scene.RegionInfo.EstateSettings.PublicAccess = false;
if((parms1 & 0x10000000) != 0)
if ((parms1 & 0x10000000) != 0)
m_scene.RegionInfo.EstateSettings.AllowVoice = true;
else
m_scene.RegionInfo.EstateSettings.AllowVoice = false;
if((parms1 & 0x00100000) != 0)
if ((parms1 & 0x00100000) != 0)
m_scene.RegionInfo.EstateSettings.AllowDirectTeleport = true;
else
m_scene.RegionInfo.EstateSettings.AllowDirectTeleport = false;
if((parms1 & 0x00800000) != 0)
if ((parms1 & 0x00800000) != 0)
m_scene.RegionInfo.EstateSettings.DenyAnonymous = true;
else
m_scene.RegionInfo.EstateSettings.DenyAnonymous = false;
if((parms1 & 0x01000000) != 0)
if ((parms1 & 0x01000000) != 0)
m_scene.RegionInfo.EstateSettings.DenyIdentified = true;
else
m_scene.RegionInfo.EstateSettings.DenyIdentified = false;
if((parms1 & 0x02000000) != 0)
if ((parms1 & 0x02000000) != 0)
m_scene.RegionInfo.EstateSettings.DenyTransacted = true;
else
m_scene.RegionInfo.EstateSettings.DenyTransacted = false;
@ -628,10 +628,10 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
m_scene.RegionInfo.EstateSettings.Save();
float sun = (float)m_scene.RegionInfo.RegionSettings.SunPosition;
if(m_scene.RegionInfo.RegionSettings.UseEstateSun)
if (m_scene.RegionInfo.RegionSettings.UseEstateSun)
{
sun = (float)m_scene.RegionInfo.EstateSettings.SunPosition;
if(m_scene.RegionInfo.EstateSettings.UseGlobalTime)
if (m_scene.RegionInfo.EstateSettings.UseGlobalTime)
sun = m_scene.EventManager.GetSunLindenHour();
}
@ -726,30 +726,30 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
// Fully implemented
//
if(m_scene.RegionInfo.RegionSettings.AllowDamage)
if (m_scene.RegionInfo.RegionSettings.AllowDamage)
flags |= Simulator.RegionFlags.AllowDamage;
if(m_scene.RegionInfo.RegionSettings.BlockTerraform)
if (m_scene.RegionInfo.RegionSettings.BlockTerraform)
flags |= Simulator.RegionFlags.BlockTerraform;
if(!m_scene.RegionInfo.RegionSettings.AllowLandResell)
if (!m_scene.RegionInfo.RegionSettings.AllowLandResell)
flags |= Simulator.RegionFlags.BlockLandResell;
if(m_scene.RegionInfo.RegionSettings.DisableCollisions)
if (m_scene.RegionInfo.RegionSettings.DisableCollisions)
flags |= Simulator.RegionFlags.SkipCollisions;
if(m_scene.RegionInfo.RegionSettings.DisableScripts)
if (m_scene.RegionInfo.RegionSettings.DisableScripts)
flags |= Simulator.RegionFlags.SkipScripts;
if(m_scene.RegionInfo.RegionSettings.DisablePhysics)
if (m_scene.RegionInfo.RegionSettings.DisablePhysics)
flags |= Simulator.RegionFlags.SkipPhysics;
if(m_scene.RegionInfo.RegionSettings.BlockFly)
if (m_scene.RegionInfo.RegionSettings.BlockFly)
flags |= Simulator.RegionFlags.NoFly;
if(m_scene.RegionInfo.RegionSettings.RestrictPushing)
if (m_scene.RegionInfo.RegionSettings.RestrictPushing)
flags |= Simulator.RegionFlags.RestrictPushObject;
if(m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide)
if (m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide)
flags |= Simulator.RegionFlags.AllowParcelChanges;
if(m_scene.RegionInfo.RegionSettings.BlockShowInSearch)
if (m_scene.RegionInfo.RegionSettings.BlockShowInSearch)
flags |= (Simulator.RegionFlags)(1 << 29);
if(m_scene.RegionInfo.RegionSettings.FixedSun)
if (m_scene.RegionInfo.RegionSettings.FixedSun)
flags |= Simulator.RegionFlags.SunFixed;
if(m_scene.RegionInfo.RegionSettings.Sandbox)
if (m_scene.RegionInfo.RegionSettings.Sandbox)
flags |= Simulator.RegionFlags.Sandbox;
// Handled in LandObject.cs: AllowLandmark
@ -769,30 +769,30 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
{
Simulator.RegionFlags flags = Simulator.RegionFlags.None;
if(m_scene.RegionInfo.EstateSettings.FixedSun)
if (m_scene.RegionInfo.EstateSettings.FixedSun)
flags |= Simulator.RegionFlags.SunFixed;
if(m_scene.RegionInfo.EstateSettings.PublicAccess)
if (m_scene.RegionInfo.EstateSettings.PublicAccess)
flags |= (Simulator.RegionFlags.PublicAllowed |
Simulator.RegionFlags.ExternallyVisible);
if(m_scene.RegionInfo.EstateSettings.AllowVoice)
if (m_scene.RegionInfo.EstateSettings.AllowVoice)
flags |= Simulator.RegionFlags.AllowVoice;
if(m_scene.RegionInfo.EstateSettings.AllowDirectTeleport)
if (m_scene.RegionInfo.EstateSettings.AllowDirectTeleport)
flags |= Simulator.RegionFlags.AllowDirectTeleport;
if(m_scene.RegionInfo.EstateSettings.DenyAnonymous)
if (m_scene.RegionInfo.EstateSettings.DenyAnonymous)
flags |= Simulator.RegionFlags.DenyAnonymous;
if(m_scene.RegionInfo.EstateSettings.DenyIdentified)
if (m_scene.RegionInfo.EstateSettings.DenyIdentified)
flags |= Simulator.RegionFlags.DenyIdentified;
if(m_scene.RegionInfo.EstateSettings.DenyTransacted)
if (m_scene.RegionInfo.EstateSettings.DenyTransacted)
flags |= Simulator.RegionFlags.DenyTransacted;
if(m_scene.RegionInfo.EstateSettings.AbuseEmailToEstateOwner)
if (m_scene.RegionInfo.EstateSettings.AbuseEmailToEstateOwner)
flags |= Simulator.RegionFlags.AbuseEmailToEstateOwner;
if(m_scene.RegionInfo.EstateSettings.BlockDwell)
if (m_scene.RegionInfo.EstateSettings.BlockDwell)
flags |= Simulator.RegionFlags.BlockDwell;
if(m_scene.RegionInfo.EstateSettings.EstateSkipScripts)
if (m_scene.RegionInfo.EstateSettings.EstateSkipScripts)
flags |= Simulator.RegionFlags.EstateSkipScripts;
if(m_scene.RegionInfo.EstateSettings.ResetHomeOnTeleport)
if (m_scene.RegionInfo.EstateSettings.ResetHomeOnTeleport)
flags |= Simulator.RegionFlags.ResetHomeOnTeleport;
if(m_scene.RegionInfo.EstateSettings.TaxFree)
if (m_scene.RegionInfo.EstateSettings.TaxFree)
flags |= Simulator.RegionFlags.TaxFree;
return (uint)flags;
@ -804,7 +804,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
return true;
List<LLUUID> ems = new List<LLUUID>(m_scene.RegionInfo.EstateSettings.EstateManagers);
if(ems.Contains(avatarID))
if (ems.Contains(avatarID))
return true;
return false;

View File

@ -163,11 +163,11 @@ namespace OpenSim.Region.Environment.Modules.World.Land
{
IEstateModule estateModule = m_scene.RequestModuleInterface<IEstateModule>();
uint regionFlags = 336723974 & ~((uint)(Simulator.RegionFlags.AllowLandmark | Simulator.RegionFlags.AllowSetHome));
if(estateModule != null)
if (estateModule != null)
regionFlags = estateModule.GetRegionFlags();
if((landData.landFlags & (uint)Parcel.ParcelFlags.AllowLandmark) != 0)
if ((landData.landFlags & (uint)Parcel.ParcelFlags.AllowLandmark) != 0)
regionFlags |= (uint)Simulator.RegionFlags.AllowLandmark;
if(landData.ownerID == remote_client.AgentId)
if (landData.ownerID == remote_client.AgentId)
regionFlags |= (uint)Simulator.RegionFlags.AllowSetHome;
remote_client.SendLandProperties(remote_client, sequence_id,
snap_selection, request_result, landData,

View File

@ -1365,7 +1365,7 @@ namespace OpenSim.Region.Environment.Scenes
// We need to explicitly resend the newly link prim's object properties since no other actions
// occur on link to invoke this elsewhere (such as object selection)
parenPrim.TriggerScriptChangedEvent(Changed.LINK);
if(client != null)
if (client != null)
parenPrim.GetProperties(client);
else
{
@ -1426,13 +1426,13 @@ namespace OpenSim.Region.Environment.Scenes
parenPrim.DelinkFromGroup(childPrimId, sendEvents);
}
if(parenPrim.Children.Count == 1)
if (parenPrim.Children.Count == 1)
{
// The link set has been completely torn down
// This is the case if you select a link set and delink
//
parenPrim.RootPart.LinkNum = 1;
if(sendEvents)
if (sendEvents)
parenPrim.TriggerScriptChangedEvent(Changed.LINK);
}
else
@ -1449,7 +1449,7 @@ namespace OpenSim.Region.Environment.Scenes
// Tear down the remaining link set
//
if(unlink_ids.Count == 2)
if (unlink_ids.Count == 2)
{
DelinkObjects(unlink_ids, true);
return;
@ -1494,7 +1494,7 @@ namespace OpenSim.Region.Environment.Scenes
{
grp.DelinkFromGroup(primIds[i]);
delinkedSomething = true;
if(!parents.Contains(grp))
if (!parents.Contains(grp))
parents.Add(grp);
}

View File

@ -1693,7 +1693,7 @@ namespace OpenSim.Region.Environment.Scenes
}
// Finally remove the item, for reals this time.
if(permissionToDelete)
if (permissionToDelete)
DeleteSceneObject(objectGroup);
}

View File

@ -272,7 +272,7 @@ namespace OpenSim.Region.Environment.Scenes
// Load region settings
m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID);
if(m_storageManager.EstateDataStore != null)
if (m_storageManager.EstateDataStore != null)
m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID);
@ -2505,7 +2505,7 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="capsObjectPath"></param>
public void AddCapsHandler(LLUUID agentId)
{
if(RegionInfo.EstateSettings.IsBanned(agentId))
if (RegionInfo.EstateSettings.IsBanned(agentId))
return;
String capsObjectPath = GetCapsPath(agentId);

View File

@ -427,7 +427,7 @@ namespace OpenSim.Region.Environment.Scenes
if (reader.Name == "SceneObjectPart")
{
SceneObjectPart Part = SceneObjectPart.FromXml(reader);
if(m_rootPart.LinkNum == 0)
if (m_rootPart.LinkNum == 0)
m_rootPart.LinkNum++;
AddPart(Part);
Part.LinkNum = m_parts.Count;
@ -833,7 +833,7 @@ namespace OpenSim.Region.Environment.Scenes
part.LinkNum = m_parts.Count;
if(part.LinkNum == 2 && RootPart != null)
if (part.LinkNum == 2 && RootPart != null)
RootPart.LinkNum = 1;
}
}
@ -1745,7 +1745,7 @@ namespace OpenSim.Region.Environment.Scenes
linkPart.RotationOffset = new LLQuaternion(newRot.x, newRot.y, newRot.z, newRot.w);
linkPart.ParentID = m_rootPart.LocalId;
if(m_rootPart.LinkNum == 0)
if (m_rootPart.LinkNum == 0)
m_rootPart.LinkNum = 1;
lock (m_parts)
@ -1815,14 +1815,16 @@ namespace OpenSim.Region.Environment.Scenes
m_parts.Remove(linkPart.UUID);
}
if(m_parts.Count == 1 && RootPart != null) //Single prim is left
if (m_parts.Count == 1 && RootPart != null) //Single prim is left
RootPart.LinkNum = 0;
else
{
foreach (SceneObjectPart p in m_parts.Values)
if(p.LinkNum > linkPart.LinkNum)
{
if (p.LinkNum > linkPart.LinkNum)
p.LinkNum--;
}
}
linkPart.ParentID = 0;
linkPart.LinkNum = 0;
@ -1858,7 +1860,7 @@ namespace OpenSim.Region.Environment.Scenes
m_scene.AddNewSceneObject(objectGroup, true);
if(sendEvents)
if (sendEvents)
linkPart.TriggerScriptChangedEvent(Changed.LINK);
HasGroupChanged = true;
@ -2131,11 +2133,11 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="localID"></param>
public void Resize(LLVector3 scale, uint localID)
{
if(scale.X > m_scene.m_maxNonphys)
if (scale.X > m_scene.m_maxNonphys)
scale.X = m_scene.m_maxNonphys;
if(scale.Y > m_scene.m_maxNonphys)
if (scale.Y > m_scene.m_maxNonphys)
scale.Y = m_scene.m_maxNonphys;
if(scale.Z > m_scene.m_maxNonphys)
if (scale.Z > m_scene.m_maxNonphys)
scale.Z = m_scene.m_maxNonphys;
SceneObjectPart part = GetChildPart(localID);
@ -2144,13 +2146,13 @@ namespace OpenSim.Region.Environment.Scenes
part.Resize(scale);
if (part.PhysActor != null)
{
if(part.PhysActor.IsPhysical)
if (part.PhysActor.IsPhysical)
{
if(scale.X > m_scene.m_maxPhys)
if (scale.X > m_scene.m_maxPhys)
scale.X = m_scene.m_maxPhys;
if(scale.Y > m_scene.m_maxPhys)
if (scale.Y > m_scene.m_maxPhys)
scale.Y = m_scene.m_maxPhys;
if(scale.Z > m_scene.m_maxPhys)
if (scale.Z > m_scene.m_maxPhys)
scale.Z = m_scene.m_maxPhys;
}
part.PhysActor.Size =
@ -2179,19 +2181,19 @@ namespace OpenSim.Region.Environment.Scenes
SceneObjectPart part = GetChildPart(localID);
if (part != null)
{
if(scale.X > m_scene.m_maxNonphys)
if (scale.X > m_scene.m_maxNonphys)
scale.X = m_scene.m_maxNonphys;
if(scale.Y > m_scene.m_maxNonphys)
if (scale.Y > m_scene.m_maxNonphys)
scale.Y = m_scene.m_maxNonphys;
if(scale.Z > m_scene.m_maxNonphys)
if (scale.Z > m_scene.m_maxNonphys)
scale.Z = m_scene.m_maxNonphys;
if(part.PhysActor != null && part.PhysActor.IsPhysical)
if (part.PhysActor != null && part.PhysActor.IsPhysical)
{
if(scale.X > m_scene.m_maxPhys)
if (scale.X > m_scene.m_maxPhys)
scale.X = m_scene.m_maxPhys;
if(scale.Y > m_scene.m_maxPhys)
if (scale.Y > m_scene.m_maxPhys)
scale.Y = m_scene.m_maxPhys;
if(scale.Z > m_scene.m_maxPhys)
if (scale.Z > m_scene.m_maxPhys)
scale.Z = m_scene.m_maxPhys;
}
float x = (scale.X / part.Scale.X);
@ -2200,7 +2202,7 @@ namespace OpenSim.Region.Environment.Scenes
lock (m_parts)
{
if(x > 1.0f || y > 1.0f || z > 1.0f)
if (x > 1.0f || y > 1.0f || z > 1.0f)
{
foreach (SceneObjectPart obPart in m_parts.Values)
{
@ -2211,9 +2213,9 @@ namespace OpenSim.Region.Environment.Scenes
float f = 1.0f;
float a = 1.0f;
if(part.PhysActor != null && part.PhysActor.IsPhysical)
if (part.PhysActor != null && part.PhysActor.IsPhysical)
{
if(oldSize.X*x > m_scene.m_maxPhys)
if (oldSize.X*x > m_scene.m_maxPhys)
{
f = m_scene.m_maxPhys / oldSize.X;
a = f / x;
@ -2221,7 +2223,7 @@ namespace OpenSim.Region.Environment.Scenes
y *= a;
z *= a;
}
if(oldSize.Y*y > m_scene.m_maxPhys)
if (oldSize.Y*y > m_scene.m_maxPhys)
{
f = m_scene.m_maxPhys / oldSize.Y;
a = f / y;
@ -2229,7 +2231,7 @@ namespace OpenSim.Region.Environment.Scenes
y *= a;
z *= a;
}
if(oldSize.Z*z > m_scene.m_maxPhys)
if (oldSize.Z*z > m_scene.m_maxPhys)
{
f = m_scene.m_maxPhys / oldSize.Z;
a = f / z;
@ -2240,7 +2242,7 @@ namespace OpenSim.Region.Environment.Scenes
}
else
{
if(oldSize.X*x > m_scene.m_maxNonphys)
if (oldSize.X*x > m_scene.m_maxNonphys)
{
f = m_scene.m_maxNonphys / oldSize.X;
a = f / x;
@ -2248,7 +2250,7 @@ namespace OpenSim.Region.Environment.Scenes
y *= a;
z *= a;
}
if(oldSize.Y*y > m_scene.m_maxNonphys)
if (oldSize.Y*y > m_scene.m_maxNonphys)
{
f = m_scene.m_maxNonphys / oldSize.Y;
a = f / y;
@ -2256,7 +2258,7 @@ namespace OpenSim.Region.Environment.Scenes
y *= a;
z *= a;
}
if(oldSize.Z*z > m_scene.m_maxNonphys)
if (oldSize.Z*z > m_scene.m_maxNonphys)
{
f = m_scene.m_maxNonphys / oldSize.Z;
a = f / z;

View File

@ -2245,7 +2245,7 @@ namespace OpenSim.Region.Environment.Scenes
public void SetAvatarOnSitTarget(LLUUID avatarID)
{
m_sitTargetAvatar = avatarID;
if(ParentGroup != null)
if (ParentGroup != null)
ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
}

View File

@ -79,7 +79,7 @@ namespace OpenSim.Region.Environment
typeInterface = pluginType.GetInterface("IEstateDataStore", true);
if(typeInterface != null)
if (typeInterface != null)
{
IEstateDataStore estPlug =
(IEstateDataStore) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));

View File

@ -212,8 +212,9 @@ namespace OpenSim.Region.Modules.SvnSerialiser
{
m_scenes.Add(scene);
}
//Only register it once, to prevend command being executed x*region times
if(m_scenes.Count ==1) {
//Only register it once, to prevent command being executed x*region times
if (m_scenes.Count == 1)
{
scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
}
}
@ -341,7 +342,6 @@ namespace OpenSim.Region.Modules.SvnSerialiser
}
}
public void LoadAllScenes(int revision)
{
CheckoutSvn(new SvnRevision(revision));

View File

@ -950,19 +950,19 @@ namespace OpenSim.Region.ScriptEngine.Common
if (value == 1)
{
SceneObjectGroup group = m_host.ParentGroup;
if(group == null)
if (group == null)
return;
bool allow = true;
foreach(SceneObjectPart part in group.Children.Values)
foreach (SceneObjectPart part in group.Children.Values)
{
if(part.Scale.X > World.m_maxPhys || part.Scale.Y > World.m_maxPhys || part.Scale.Z > World.m_maxPhys)
if (part.Scale.X > World.m_maxPhys || part.Scale.Y > World.m_maxPhys || part.Scale.Z > World.m_maxPhys)
{
allow = false;
break;
}
}
if(!allow)
if (!allow)
return;
m_host.ScriptSetPhysicsStatus(true);
}
@ -1083,23 +1083,23 @@ namespace OpenSim.Region.ScriptEngine.Common
{
// TODO: this needs to trigger a persistance save as well
if(part == null || part.ParentGroup == null || part.ParentGroup.RootPart == null)
if (part == null || part.ParentGroup == null || part.ParentGroup.RootPart == null)
return;
if(part.ParentGroup.RootPart.PhysActor != null && part.ParentGroup.RootPart.PhysActor.IsPhysical)
if (part.ParentGroup.RootPart.PhysActor != null && part.ParentGroup.RootPart.PhysActor.IsPhysical)
{
if(scale.x > World.m_maxPhys)
if (scale.x > World.m_maxPhys)
scale.x = World.m_maxPhys;
if(scale.y > World.m_maxPhys)
if (scale.y > World.m_maxPhys)
scale.y = World.m_maxPhys;
if(scale.z > World.m_maxPhys)
if (scale.z > World.m_maxPhys)
scale.z = World.m_maxPhys;
}
if(scale.x > World.m_maxNonphys)
if (scale.x > World.m_maxNonphys)
scale.x = World.m_maxNonphys;
if(scale.y > World.m_maxNonphys)
if (scale.y > World.m_maxNonphys)
scale.y = World.m_maxNonphys;
if(scale.z > World.m_maxNonphys)
if (scale.z > World.m_maxNonphys)
scale.z = World.m_maxNonphys;
LLVector3 tmp = part.Scale;
tmp.X = (float)scale.x;
@ -6788,7 +6788,7 @@ namespace OpenSim.Region.ScriptEngine.Common
return new LSL_Types.Vector3();
}
ScenePresence presence = World.GetScenePresence(m_host.OwnerID);
if(presence != null)
if (presence != null)
{
LSL_Types.Vector3 pos = new LSL_Types.Vector3(presence.CameraPosition.x,presence.CameraPosition.y,presence.CameraPosition.z);
return pos;
@ -6968,7 +6968,7 @@ namespace OpenSim.Region.ScriptEngine.Common
{
m_host.AddScriptLPS(1);
IEstateModule estate = World.RequestModuleInterface<IEstateModule>();
if(estate == null)
if (estate == null)
return 67108864;
return estate.GetRegionFlags();
}

View File

@ -790,19 +790,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (value == 1)
{
SceneObjectGroup group = m_host.ParentGroup;
if(group == null)
if (group == null)
return;
bool allow = true;
foreach(SceneObjectPart part in group.Children.Values)
foreach (SceneObjectPart part in group.Children.Values)
{
if(part.Scale.X > World.m_maxPhys || part.Scale.Y > World.m_maxPhys || part.Scale.Z > World.m_maxPhys)
if (part.Scale.X > World.m_maxPhys || part.Scale.Y > World.m_maxPhys || part.Scale.Z > World.m_maxPhys)
{
allow = false;
break;
}
}
if(!allow)
if (!allow)
return;
m_host.ScriptSetPhysicsStatus(true);
}
@ -937,23 +937,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
// TODO: this needs to trigger a persistance save as well
if(part == null || part.ParentGroup == null || part.ParentGroup.RootPart == null)
if (part == null || part.ParentGroup == null || part.ParentGroup.RootPart == null)
return;
if(part.ParentGroup.RootPart.PhysActor != null && part.ParentGroup.RootPart.PhysActor.IsPhysical)
if (part.ParentGroup.RootPart.PhysActor != null && part.ParentGroup.RootPart.PhysActor.IsPhysical)
{
if(scale.x > World.m_maxPhys)
if (scale.x > World.m_maxPhys)
scale.x = World.m_maxPhys;
if(scale.y > World.m_maxPhys)
if (scale.y > World.m_maxPhys)
scale.y = World.m_maxPhys;
if(scale.z > World.m_maxPhys)
if (scale.z > World.m_maxPhys)
scale.z = World.m_maxPhys;
}
if(scale.x > World.m_maxNonphys)
if (scale.x > World.m_maxNonphys)
scale.x = World.m_maxNonphys;
if(scale.y > World.m_maxNonphys)
if (scale.y > World.m_maxNonphys)
scale.y = World.m_maxNonphys;
if(scale.z > World.m_maxNonphys)
if (scale.z > World.m_maxNonphys)
scale.z = World.m_maxNonphys;
LLVector3 tmp = part.Scale;
tmp.X = (float)scale.x;
@ -6748,7 +6748,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
m_host.AddScriptLPS(1);
IEstateModule estate = World.RequestModuleInterface<IEstateModule>();
if(estate == null)
if (estate == null)
return 67108864;
return (int)estate.GetRegionFlags();
}

View File

@ -327,7 +327,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
{
// Its LSL, convert it to C#
//compileScript = LSL_Converter.Convert(Script);
if(m_UseCompiler)
if (m_UseCompiler)
LSL_Converter = (ICodeConverter)new CSCodeGenerator();
else
LSL_Converter = (ICodeConverter)new LSL2CSConverter();

View File

@ -1191,7 +1191,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
if (result == null)
return true;
if(!m_InSelfDelete)
if (!m_InSelfDelete)
result.Abort();
lock (m_EventQueue)
@ -1342,10 +1342,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
e.ToString());
}
}
else if((e is TargetInvocationException) && (e.InnerException is SelfDeleteException))
else if ((e is TargetInvocationException) && (e.InnerException is SelfDeleteException))
{
m_InSelfDelete = true;
if(part != null && part.ParentGroup != null)
if (part != null && part.ParentGroup != null)
m_Engine.World.DeleteSceneObject(part.ParentGroup);
}
}