Update svn properties, clean up formatting, refactor out duplicate hard-coded port numbers.

0.6.0-stable
Jeff Ames 2008-06-13 00:21:53 +00:00
parent 1451d6fb9a
commit 64f01ade04
11 changed files with 74 additions and 94 deletions

View File

@ -129,9 +129,12 @@ namespace OpenSim.Data
cmd.CommandText = kvp.Value;
cmd.ExecuteNonQuery();
if (version == 0) {
if (version == 0)
{
InsertVersion(_type, newversion);
} else {
}
else
{
UpdateVersion(_type, newversion);
}
version = newversion;
@ -149,7 +152,7 @@ namespace OpenSim.Data
if (m.Success)
{
int MigrationVersion = int.Parse(m.Groups[1].ToString());
if ( MigrationVersion > max )
if (MigrationVersion > max)
max = MigrationVersion;
}
}
@ -160,9 +163,12 @@ namespace OpenSim.Data
{
get { return FindVersion(_type); }
set {
if (Version < 1) {
if (Version < 1)
{
InsertVersion(_type, value);
} else {
}
else
{
UpdateVersion(_type, value);
}
}
@ -172,7 +178,8 @@ namespace OpenSim.Data
{
int version = 0;
DbCommand cmd = _conn.CreateCommand();
try {
try
{
cmd.CommandText = "select version from migrations where name='" + type + "' limit 1";
using (IDataReader reader = cmd.ExecuteReader())
{
@ -182,7 +189,9 @@ namespace OpenSim.Data
}
reader.Close();
}
} catch {
}
catch
{
// Something went wrong, so we're version 0
}
return version;

View File

@ -132,7 +132,7 @@ namespace OpenSim.Data.MySQL
// if there are no tables, get out of here and let
// migrations do their job
if(
if (
tableList["inventoryfolders"] == null &&
tableList["inventoryitems"] == null
)

View File

@ -138,7 +138,7 @@ namespace OpenSim.Data.MySQL
// if there are no tables, get out of here and let
// migrations do their job
if(
if (
tableList[m_agentsTableName] == null &&
tableList[m_usersTableName] == null &&
tableList[m_userFriendsTableName] == null &&

View File

@ -63,7 +63,7 @@ namespace OpenSim.Framework
configMember.addConfigurationOption("default_user_server",
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
"Default User Server URI",
"http://127.0.0.1:8002" + "/", false);
"http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString() + "/", false);
configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"Key to send to user server", "null", false);
configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
@ -71,7 +71,7 @@ namespace OpenSim.Framework
configMember.addConfigurationOption("default_grid_server",
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
"Default Grid Server URI",
"http://127.0.0.1:8001/", false);
"http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString() + "/", false);
configMember.addConfigurationOption("grid_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"Key to send to grid server", "null", false);
configMember.addConfigurationOption("grid_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,

View File

@ -136,7 +136,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
{
bool lookup = false;
lock(cachedMapBlocks)
lock (cachedMapBlocks)
{
if (cachedMapBlocks.Count > 0 && ((cachedTime + 1800) > Util.UnixTimeSinceEpoch()))
{
@ -157,7 +157,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
mapBlocks = m_scene.CommsManager.GridService.RequestNeighbourMapBlocks((int)m_scene.RegionInfo.RegionLocX - 8, (int)m_scene.RegionInfo.RegionLocY - 8, (int)m_scene.RegionInfo.RegionLocX + 8, (int)m_scene.RegionInfo.RegionLocY + 8);
avatarPresence.ControllingClient.SendMapBlock(mapBlocks);
lock(cachedMapBlocks)
lock (cachedMapBlocks)
cachedMapBlocks = mapBlocks;
cachedTime = Util.UnixTimeSinceEpoch();

View File

@ -1122,12 +1122,9 @@ namespace OpenSim.Region.Environment.Scenes
mapbmp.SetPixel(x, (256 - y) - 1, black);
}
}
}
//}
//tc = System.Environment.TickCount - tc;
//m_log.Info("[MAPTILE]: Completed One row in " + tc + " ms");
}
@ -1135,7 +1132,6 @@ namespace OpenSim.Region.Environment.Scenes
bool drawPrimVolume = true;
try
{
IConfig startupConfig = m_config.Configs["Startup"];
@ -1146,7 +1142,6 @@ namespace OpenSim.Region.Environment.Scenes
m_log.Warn("Failed to load StarupConfg");
}
if (drawPrimVolume)
{
tc = System.Environment.TickCount;
@ -1177,9 +1172,7 @@ namespace OpenSim.Region.Environment.Scenes
int colorg = 255 - (int)(texcolor.G * 255f);
int colorb = 255 - (int)(texcolor.B * 255f);
if (colorr == 255 && colorg == 255 && colorb == 255)
{ }
else
if (!(colorr == 255 && colorg == 255 && colorb == 255))
{
//Try to set the map spot color
try
@ -1248,7 +1241,6 @@ namespace OpenSim.Region.Environment.Scenes
|| mapdrawendY > 255)
continue;
int wy = 0;
bool breakYN = false; // If we run into an error drawing, break out of the
@ -1304,7 +1296,6 @@ namespace OpenSim.Region.Environment.Scenes
asset.Type = 0;
asset.Temporary = temporary;
AssetCache.AddAsset(asset);
}
else
{
@ -1322,7 +1313,6 @@ namespace OpenSim.Region.Environment.Scenes
AssetCache.AddAsset(asset);
}
}
}
#endregion
@ -1442,10 +1432,8 @@ namespace OpenSim.Region.Environment.Scenes
// Un-offset the prim (it gets offset later by the consumer method)
pos.Z -= 0.25F;
}
return pos;
}
else
@ -1889,11 +1877,9 @@ namespace OpenSim.Region.Environment.Scenes
client.OnObjectDuplicateOnRay += doObjectDuplicateOnRay;
client.OnUpdatePrimFlags += m_innerScene.UpdatePrimFlags;
client.OnRequestObjectPropertiesFamily += m_innerScene.RequestObjectPropertiesFamily;
client.OnRequestGodlikePowers += handleRequestGodlikePowers;
client.OnGodKickUser += HandleGodlikeKickUser;
client.OnObjectPermissions += HandleObjectPermissionsUpdate;
client.OnCreateNewInventoryItem += CreateNewInventoryItem;
client.OnCreateNewInventoryFolder += CommsManager.UserProfileCacheService.HandleCreateInventoryFolder;
client.OnUpdateInventoryFolder += CommsManager.UserProfileCacheService.HandleUpdateInventoryFolder;
@ -1907,30 +1893,24 @@ namespace OpenSim.Region.Environment.Scenes
client.OnRemoveInventoryItem += RemoveInventoryItem;
client.OnRemoveInventoryFolder += RemoveInventoryFolder;
client.OnRezScript += RezScript;
client.OnRequestTaskInventory += RequestTaskInventory;
client.OnRemoveTaskItem += RemoveTaskInventory;
client.OnUpdateTaskInventory += UpdateTaskInventory;
client.OnMoveTaskItem += MoveTaskInventoryItem;
client.OnGrabObject += ProcessObjectGrab;
client.OnDeGrabObject += ProcessObjectDeGrab;
client.OnMoneyTransferRequest += ProcessMoneyTransferRequest;
client.OnParcelBuy += ProcessParcelBuy;
client.OnAvatarPickerRequest += ProcessAvatarPickerRequest;
client.OnPacketStats += AddPacketStats;
client.OnObjectIncludeInSearch += m_innerScene.MakeObjectSearchable;
client.OnTeleportHomeRequest += TeleportClientHome;
client.OnSetStartLocationRequest += SetHomeRezPoint;
client.OnUndo += m_innerScene.HandleUndo;
client.OnObjectGroupRequest += m_innerScene.HandleObjectGroupUpdate;
client.OnParcelReturnObjectsRequest += LandChannel.ReturnObjectsInParcel;
client.OnScriptReset += ProcessScriptReset;
// EventManager.TriggerOnNewClient(client);
}
@ -1958,7 +1938,6 @@ namespace OpenSim.Region.Environment.Scenes
if (target != null && target2 != null)
{
LLVector3 direction = LLVector3.Norm(RayEnd - RayStart);
Vector3 AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z);
Vector3 AXdirection = new Vector3(direction.X, direction.Y, direction.Z);
@ -1991,9 +1970,8 @@ namespace OpenSim.Region.Environment.Scenes
ScaleOffset = Math.Abs(ScaleOffset);
LLVector3 intersectionpoint = new LLVector3(ei.ipoint.x, ei.ipoint.y, ei.ipoint.z);
LLVector3 normal = new LLVector3(ei.normal.x, ei.normal.y, ei.normal.z);
LLVector3 offset = (normal * (ScaleOffset / 2f));
pos = (intersectionpoint + offset);
LLVector3 offset = normal * (ScaleOffset / 2f);
pos = intersectionpoint + offset;
// stick in offset format from the original prim
pos = pos - target.ParentGroup.AbsolutePosition;

View File

@ -481,8 +481,6 @@ namespace OpenSim.Region.Environment.Scenes
// }
}
public uint GenerateClientFlags(LLUUID ObjectID)
{
return m_scene.ExternalChecks.ExternalChecksGenerateClientFlags(m_uuid, ObjectID);
@ -969,8 +967,6 @@ namespace OpenSim.Region.Environment.Scenes
}
}
m_scene.EventManager.TriggerOnClientMovement(this);
m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS);
@ -1006,7 +1002,6 @@ namespace OpenSim.Region.Environment.Scenes
//m_log.Debug("[AUTOPILOT]: " + Util.GetDistanceTo(AbsolutePosition, m_autoPilotTarget).ToString());
if (Util.GetDistanceTo(AbsolutePosition, m_autoPilotTarget) <= 1.5)
{
if (m_sitAtAutoTarget)
{
SceneObjectPart part = m_scene.GetSceneObjectPart(m_requestedSitTargetUUID);
@ -2140,7 +2135,6 @@ namespace OpenSim.Region.Environment.Scenes
m_log.Info("[CLIENT]: Couldn't save attachments. :(");
}
m_attachments.Clear();
}
}
lock (m_knownPrimUUID)
@ -2204,7 +2198,6 @@ namespace OpenSim.Region.Environment.Scenes
m_attachmentsTransported = true;
lock (m_attachments)
{
foreach (SceneObjectGroup gobj in m_attachments)
{
// If the prim group is null then something must have happened to it!