Compare commits
53 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a643a1bb9 | ||
|
|
a5488650ff | ||
|
|
a275127a65 | ||
|
|
02db31db6a | ||
|
|
8bd813e6fc | ||
|
|
09ff121654 | ||
|
|
0434758a0d | ||
|
|
8bb0a71083 | ||
|
|
d7651a389e | ||
|
|
824318a0c1 | ||
|
|
5e9ed22e84 | ||
|
|
a6c611e7c9 | ||
|
|
72b325f8b5 | ||
|
|
54d0514b13 | ||
|
|
58b1c3cec0 | ||
|
|
71641523a3 | ||
|
|
94c5e25c3b | ||
|
|
20bad0aa6c | ||
|
|
e7f23a6218 | ||
|
|
25c29db8b6 | ||
|
|
1750fba9ce | ||
|
|
b18e410586 | ||
|
|
38d5e1fab3 | ||
|
|
4180c32eb1 | ||
|
|
5115229fdf | ||
|
|
e8f2d814e7 | ||
|
|
1fda8c5a86 | ||
|
|
6b77b55d40 | ||
|
|
82cdb08c1f | ||
|
|
dafcb3bcd7 | ||
|
|
3259b1d1e0 | ||
|
|
512910a51f | ||
|
|
fdda57cf10 | ||
|
|
ec8e34950d | ||
|
|
93964ef3a4 | ||
|
|
5c8af6a136 | ||
|
|
4d0c8aca05 | ||
|
|
8fc16ece96 | ||
|
|
fcbb375e8f | ||
|
|
49c65279fa | ||
|
|
86e8a56fe1 | ||
|
|
b199330682 | ||
|
|
7a7ebaebd1 | ||
|
|
164ae0b24b | ||
|
|
7156545fca | ||
|
|
73a5abf4d9 | ||
|
|
630c8dc828 | ||
|
|
6de89246c2 | ||
|
|
96973a5778 | ||
|
|
96843f2b17 | ||
|
|
8a36f54cf4 | ||
|
|
1a14e660d2 | ||
|
|
2502aae5db |
@@ -8,6 +8,24 @@
|
||||
<copy file="bin/OpenSim.ini.example" tofile="bin/OpenSim.ini"/>
|
||||
<copy file="bin/config-include/StandaloneCommon.ini.example" tofile="bin/config-include/StandaloneCommon.ini"/>
|
||||
<copy file="bin/config-include/FlotsamCache.ini.example" tofile="bin/config-include/FlotsamCache.ini"/>
|
||||
<!-- delete files generated by runprebuild.sh which had to be run in order to generate the build file for this target-->
|
||||
<delete>
|
||||
<fileset basedir="OpenSim">
|
||||
<include name="**/*.build"/>
|
||||
<include name="**/*.csproj*"/>
|
||||
<include name="**/*.dll.build"/>
|
||||
<include name="**/*.pidb"/>
|
||||
<exclude name="Tools/OpenSim.32BitLaunch/**"/>
|
||||
<exclude name="Tools/Robust.32BitLaunch/**"/>
|
||||
<exclude name="Tools/LaunchSLClient/**"/>
|
||||
</fileset>
|
||||
</delete>
|
||||
<delete>
|
||||
<fileset>
|
||||
<include name="OpenSim.build"/>
|
||||
<include name="OpenSim.sln"/>
|
||||
</fileset>
|
||||
</delete>
|
||||
</target>
|
||||
|
||||
<property name="distbindir" value="distbin" />
|
||||
|
||||
@@ -89,5 +89,11 @@ namespace OpenSim.Data.MSSQL
|
||||
return DoQuery(cmd);
|
||||
}
|
||||
}
|
||||
|
||||
public FriendsData[] GetFriends(Guid principalID)
|
||||
{
|
||||
return GetFriends(principalID.ToString());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -813,7 +813,7 @@ namespace OpenSim.Data.MSSQL
|
||||
{
|
||||
try
|
||||
{
|
||||
using (SqlCommand command = new SqlCommand("DELETE FROM inventoryfolders WHERE folderID=@folderID", connection))
|
||||
using (SqlCommand command = new SqlCommand("DELETE FROM inventoryfolders WHERE folderID=@folderID and type=-1", connection))
|
||||
{
|
||||
command.Parameters.Add(database.CreateParameter("folderID", folderID));
|
||||
|
||||
|
||||
@@ -675,7 +675,7 @@ VALUES
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
|
||||
sql = "INSERT INTO [landaccesslist] ([LandUUID],[AccessUUID],[Flags]) VALUES (@LandUUID,@AccessUUID,@Flags)";
|
||||
sql = "INSERT INTO [landaccesslist] ([LandUUID],[AccessUUID],[Flags],[Expires]) VALUES (@LandUUID,@AccessUUID,@Flags,@Expires)";
|
||||
|
||||
using (SqlConnection conn = new SqlConnection(m_connectionString))
|
||||
using (SqlCommand cmd = new SqlCommand(sql, conn))
|
||||
@@ -1215,6 +1215,8 @@ VALUES
|
||||
//Store new values
|
||||
StoreNewRegionSettings(regionSettings);
|
||||
|
||||
LoadSpawnPoints(regionSettings);
|
||||
|
||||
return regionSettings;
|
||||
}
|
||||
|
||||
@@ -1252,7 +1254,7 @@ VALUES
|
||||
,[elevation_1_ne] = @elevation_1_ne ,[elevation_2_ne] = @elevation_2_ne ,[elevation_1_se] = @elevation_1_se ,[elevation_2_se] = @elevation_2_se
|
||||
,[elevation_1_sw] = @elevation_1_sw ,[elevation_2_sw] = @elevation_2_sw ,[water_height] = @water_height ,[terrain_raise_limit] = @terrain_raise_limit
|
||||
,[terrain_lower_limit] = @terrain_lower_limit ,[use_estate_sun] = @use_estate_sun ,[fixed_sun] = @fixed_sun ,[sun_position] = @sun_position
|
||||
,[covenant] = @covenant ,[covenant_datetime] = @covenant_datetime, [sunvectorx] = @sunvectorx, [sunvectory] = @sunvectory, [sunvectorz] = @sunvectorz, [Sandbox] = @Sandbox, [loaded_creation_datetime] = @loaded_creation_datetime, [loaded_creation_id] = @loaded_creation_id
|
||||
,[covenant] = @covenant ,[covenant_datetime] = @covenant_datetime, [sunvectorx] = @sunvectorx, [sunvectory] = @sunvectory, [sunvectorz] = @sunvectorz, [Sandbox] = @Sandbox, [loaded_creation_datetime] = @loaded_creation_datetime, [loaded_creation_id] = @loaded_creation_id, [map_tile_id] = @TerrainImageID, [telehubobject] = @telehubobject, [parcel_tile_id] = @ParcelImageID
|
||||
WHERE [regionUUID] = @regionUUID";
|
||||
|
||||
using (SqlConnection conn = new SqlConnection(m_connectionString))
|
||||
@@ -1263,6 +1265,7 @@ VALUES
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
SaveSpawnPoints(regionSettings);
|
||||
}
|
||||
|
||||
public void Shutdown()
|
||||
@@ -1383,6 +1386,11 @@ VALUES
|
||||
newSettings.LoadedCreationID = "";
|
||||
else
|
||||
newSettings.LoadedCreationID = (String)row["loaded_creation_id"];
|
||||
|
||||
newSettings.TerrainImageID = new UUID((string)row["map_tile_ID"]);
|
||||
newSettings.ParcelImageID = new UUID((Guid)row["parcel_tile_ID"]);
|
||||
newSettings.TelehubObject = new UUID((Guid)row["TelehubObject"]);
|
||||
|
||||
return newSettings;
|
||||
}
|
||||
|
||||
@@ -1454,6 +1462,13 @@ VALUES
|
||||
}
|
||||
|
||||
newData.ParcelAccessList = new List<LandAccessEntry>();
|
||||
newData.MediaDescription = (string)row["MediaDescription"];
|
||||
newData.MediaType = (string)row["MediaType"];
|
||||
newData.MediaWidth = Convert.ToInt32((((string)row["MediaSize"]).Split(','))[0]);
|
||||
newData.MediaHeight = Convert.ToInt32((((string)row["MediaSize"]).Split(','))[1]);
|
||||
newData.MediaLoop = Convert.ToBoolean(row["MediaLoop"]);
|
||||
newData.ObscureMusic = Convert.ToBoolean(row["ObscureMusic"]);
|
||||
newData.ObscureMedia = Convert.ToBoolean(row["ObscureMedia"]);
|
||||
|
||||
return newData;
|
||||
}
|
||||
@@ -1468,7 +1483,7 @@ VALUES
|
||||
LandAccessEntry entry = new LandAccessEntry();
|
||||
entry.AgentID = new UUID((Guid)row["AccessUUID"]);
|
||||
entry.Flags = (AccessList)Convert.ToInt32(row["Flags"]);
|
||||
entry.Expires = 0;
|
||||
entry.Expires = Convert.ToInt32(row["Expires"]);
|
||||
return entry;
|
||||
}
|
||||
|
||||
@@ -1497,7 +1512,8 @@ VALUES
|
||||
prim.TouchName = (string)primRow["TouchName"];
|
||||
// permissions
|
||||
prim.Flags = (PrimFlags)Convert.ToUInt32(primRow["ObjectFlags"]);
|
||||
prim.CreatorID = new UUID((Guid)primRow["CreatorID"]);
|
||||
//prim.CreatorID = new UUID((Guid)primRow["CreatorID"]);
|
||||
prim.CreatorIdentification = (string)primRow["CreatorID"];
|
||||
prim.OwnerID = new UUID((Guid)primRow["OwnerID"]);
|
||||
prim.GroupID = new UUID((Guid)primRow["GroupID"]);
|
||||
prim.LastOwnerID = new UUID((Guid)primRow["LastOwnerID"]);
|
||||
@@ -1691,7 +1707,8 @@ VALUES
|
||||
taskItem.Name = (string)inventoryRow["name"];
|
||||
taskItem.Description = (string)inventoryRow["description"];
|
||||
taskItem.CreationDate = Convert.ToUInt32(inventoryRow["creationDate"]);
|
||||
taskItem.CreatorID = new UUID((Guid)inventoryRow["creatorID"]);
|
||||
//taskItem.CreatorID = new UUID((Guid)inventoryRow["creatorID"]);
|
||||
taskItem.CreatorIdentification = (string)inventoryRow["creatorID"];
|
||||
taskItem.OwnerID = new UUID((Guid)inventoryRow["ownerID"]);
|
||||
taskItem.LastOwnerID = new UUID((Guid)inventoryRow["lastOwnerID"]);
|
||||
taskItem.GroupID = new UUID((Guid)inventoryRow["groupID"]);
|
||||
@@ -1792,6 +1809,9 @@ VALUES
|
||||
parameters.Add(_Database.CreateParameter("covenant_datetime", settings.CovenantChangedDateTime));
|
||||
parameters.Add(_Database.CreateParameter("Loaded_Creation_DateTime", settings.LoadedCreationDateTime));
|
||||
parameters.Add(_Database.CreateParameter("Loaded_Creation_ID", settings.LoadedCreationID));
|
||||
parameters.Add(_Database.CreateParameter("TerrainImageID", settings.TerrainImageID));
|
||||
parameters.Add(_Database.CreateParameter("ParcelImageID", settings.ParcelImageID));
|
||||
parameters.Add(_Database.CreateParameter("TelehubObject", settings.TelehubObject));
|
||||
|
||||
return parameters.ToArray();
|
||||
}
|
||||
@@ -1859,6 +1879,7 @@ VALUES
|
||||
parameters.Add(_Database.CreateParameter("LandUUID", parcelID));
|
||||
parameters.Add(_Database.CreateParameter("AccessUUID", parcelAccessEntry.AgentID));
|
||||
parameters.Add(_Database.CreateParameter("Flags", parcelAccessEntry.Flags));
|
||||
parameters.Add(_Database.CreateParameter("Expires", parcelAccessEntry.Expires));
|
||||
|
||||
return parameters.ToArray();
|
||||
}
|
||||
@@ -2063,5 +2084,57 @@ VALUES
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
private void LoadSpawnPoints(RegionSettings rs)
|
||||
{
|
||||
rs.ClearSpawnPoints();
|
||||
|
||||
string sql = "SELECT Yaw, Pitch, Distance FROM spawn_points WHERE RegionUUID = @RegionUUID";
|
||||
using (SqlConnection conn = new SqlConnection(m_connectionString))
|
||||
using (SqlCommand cmd = new SqlCommand(sql, conn))
|
||||
{
|
||||
cmd.Parameters.Add(_Database.CreateParameter("@RegionUUID", rs.RegionUUID.ToString()));
|
||||
conn.Open();
|
||||
using (SqlDataReader reader = cmd.ExecuteReader())
|
||||
{
|
||||
if (reader.Read())
|
||||
{
|
||||
SpawnPoint sp = new SpawnPoint();
|
||||
|
||||
sp.Yaw = (float)reader["Yaw"];
|
||||
sp.Pitch = (float)reader["Pitch"];
|
||||
sp.Distance = (float)reader["Distance"];
|
||||
|
||||
rs.AddSpawnPoint(sp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveSpawnPoints(RegionSettings rs)
|
||||
{
|
||||
string sql = "DELETE FROM spawn_points WHERE RegionUUID = @RegionUUID";
|
||||
using (SqlConnection conn = new SqlConnection(m_connectionString))
|
||||
using (SqlCommand cmd = new SqlCommand(sql, conn))
|
||||
{
|
||||
cmd.Parameters.Add(_Database.CreateParameter("@RegionUUID", rs.RegionUUID));
|
||||
conn.Open();
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
foreach (SpawnPoint p in rs.SpawnPoints())
|
||||
{
|
||||
sql = "INSERT INTO spawn_points (RegionUUID, Yaw, Pitch, Distance) VALUES (@RegionUUID, @Yaw, @Pitch, @Distance)";
|
||||
using (SqlConnection conn = new SqlConnection(m_connectionString))
|
||||
using (SqlCommand cmd = new SqlCommand(sql, conn))
|
||||
{
|
||||
cmd.Parameters.Add(_Database.CreateParameter("@RegionUUID", rs.RegionUUID));
|
||||
cmd.Parameters.Add(_Database.CreateParameter("@Yaw", p.Yaw));
|
||||
cmd.Parameters.Add(_Database.CreateParameter("@Pitch", p.Pitch));
|
||||
cmd.Parameters.Add(_Database.CreateParameter("@Distance", p.Distance));
|
||||
conn.Open();
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1044,10 +1044,93 @@ ALTER TABLE primitems ALTER COLUMN CreatorID uniqueidentifier NOT NULL
|
||||
|
||||
COMMIT
|
||||
|
||||
:VERSION 29 #---------------------
|
||||
:VERSION 29 #----------------- Region Covenant changed time
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE regionsettings ADD covenant_datetime int NOT NULL default 0
|
||||
|
||||
COMMIT
|
||||
|
||||
:VERSION 30 #------------------Migrate creatorID storage to varchars instead of UUIDs for HG support
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
EXECUTE sp_rename N'dbo.prims.creatorid', N'creatoridold', 'COLUMN'
|
||||
EXECUTE sp_rename N'dbo.primitems.creatorid', N'creatoridold', 'COLUMN'
|
||||
|
||||
COMMIT
|
||||
|
||||
:VERSION 31 #---------------------
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE prims ADD CreatorID varchar(255)
|
||||
ALTER TABLE primitems ADD CreatorID varchar(255)
|
||||
|
||||
COMMIT
|
||||
|
||||
:VERSION 32 #---------------------
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
UPDATE prims SET prims.CreatorID = CONVERT(varchar(255), creatoridold)
|
||||
UPDATE primitems SET primitems.CreatorID = CONVERT(varchar(255), creatoridold)
|
||||
|
||||
COMMIT
|
||||
|
||||
:VERSION 33 #---------------------
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE prims
|
||||
ADD CONSTRAINT DF_prims_CreatorIDNew
|
||||
DEFAULT '00000000-0000-0000-0000-000000000000'
|
||||
FOR CreatorID
|
||||
|
||||
ALTER TABLE prims ALTER COLUMN CreatorID varchar(255) NOT NULL
|
||||
|
||||
ALTER TABLE primitems
|
||||
ADD CONSTRAINT DF_primitems_CreatorIDNew
|
||||
DEFAULT '00000000-0000-0000-0000-000000000000'
|
||||
FOR CreatorID
|
||||
|
||||
ALTER TABLE primitems ALTER COLUMN CreatorID varchar(255) NOT NULL
|
||||
|
||||
COMMIT
|
||||
|
||||
:VERSION 34 #--------------- Telehub support
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE [dbo].[Spawn_Points](
|
||||
[RegionUUID] [uniqueidentifier] NOT NULL,
|
||||
[Yaw] [float] NOT NULL,
|
||||
[Pitch] [float] NOT NULL,
|
||||
[Distance] [float] NOT NULL,
|
||||
PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[RegionUUID] ASC
|
||||
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
|
||||
ALTER TABLE regionsettings ADD TelehubObject uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
|
||||
|
||||
COMMIT
|
||||
|
||||
:VERSION 35 #---------------- Parcels for sale
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE regionsettings ADD parcel_tile_ID uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
|
||||
|
||||
COMMIT
|
||||
|
||||
:VERSION 36 #---------------- Timed bans/access
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE landaccesslist ADD Expires integer NOT NULL DEFAULT 0;
|
||||
|
||||
COMMIT
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace OpenSim
|
||||
public class VersionInfo
|
||||
{
|
||||
private const string VERSION_NUMBER = "0.7.3";
|
||||
private const Flavour VERSION_FLAVOUR = Flavour.Dev;
|
||||
private const Flavour VERSION_FLAVOUR = Flavour.Post_Fixes;
|
||||
|
||||
public enum Flavour
|
||||
{
|
||||
|
||||
@@ -150,7 +150,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile
|
||||
string skillsText = String.Empty;
|
||||
string languages = String.Empty;
|
||||
|
||||
Byte[] charterMember = Utils.StringToBytes("Avatar");
|
||||
UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, avatarID);
|
||||
|
||||
string name = "Avatar";
|
||||
int created = 0;
|
||||
if (account != null)
|
||||
{
|
||||
name = account.FirstName + " " + account.LastName;
|
||||
created = account.Created;
|
||||
}
|
||||
Byte[] charterMember = Utils.StringToBytes(name);
|
||||
|
||||
profileUrl = "No profile data";
|
||||
aboutText = string.Empty;
|
||||
@@ -160,7 +169,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile
|
||||
partner = UUID.Zero;
|
||||
|
||||
remoteClient.SendAvatarProperties(avatarID, aboutText,
|
||||
Util.ToDateTime(0).ToString(
|
||||
Util.ToDateTime(created).ToString(
|
||||
"M/d/yyyy", CultureInfo.InvariantCulture),
|
||||
charterMember, firstLifeAboutText,
|
||||
(uint)(0 & 0xff),
|
||||
|
||||
@@ -117,7 +117,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
string userAssetServer = string.Empty;
|
||||
if (IsForeignUser(avatarID, out userAssetServer) && userAssetServer != string.Empty && m_OutboundPermission)
|
||||
{
|
||||
Util.FireAndForget(delegate { m_assMapper.Post(assetID, avatarID, userAssetServer); });
|
||||
m_assMapper.Post(assetID, avatarID, userAssetServer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -86,6 +86,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain
|
||||
private volatile bool m_tainted;
|
||||
private readonly Stack<LandUndoState> m_undo = new Stack<LandUndoState>(5);
|
||||
|
||||
private String m_InitialTerrain = "pinhead-island";
|
||||
|
||||
/// <summary>
|
||||
/// Human readable list of terrain file extensions that are supported.
|
||||
/// </summary>
|
||||
@@ -109,6 +111,9 @@ namespace OpenSim.Region.CoreModules.World.Terrain
|
||||
/// <param name="config">Config for the region</param>
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
IConfig terrainConfig = config.Configs["Terrain"];
|
||||
if (terrainConfig != null)
|
||||
m_InitialTerrain = terrainConfig.GetString("InitialTerrain", m_InitialTerrain);
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
@@ -120,7 +125,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
|
||||
{
|
||||
if (m_scene.Heightmap == null)
|
||||
{
|
||||
m_channel = new TerrainChannel();
|
||||
m_channel = new TerrainChannel(m_InitialTerrain);
|
||||
m_scene.Heightmap = m_channel;
|
||||
m_revert = new TerrainChannel();
|
||||
UpdateRevertMap();
|
||||
|
||||
@@ -92,7 +92,23 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
return;
|
||||
}
|
||||
|
||||
//m_log.DebugFormat("MAP NAME=({0})", mapName);
|
||||
//m_log.DebugFormat("MAP NAME=({0})", mapName);
|
||||
|
||||
// Hack to get around the fact that ll V3 now drops the port from the
|
||||
// map name. See https://jira.secondlife.com/browse/VWR-28570
|
||||
//
|
||||
// Caller, use this magic form instead:
|
||||
// secondlife://http|!!mygrid.com|8002|Region+Name/128/128
|
||||
// or url encode if possible.
|
||||
// the hacks we do with this viewer...
|
||||
//
|
||||
string mapNameOrig = mapName;
|
||||
if (mapName.Contains("|"))
|
||||
mapName = mapName.Replace('|', ':');
|
||||
if (mapName.Contains("+"))
|
||||
mapName = mapName.Replace('+', ' ');
|
||||
if (mapName.Contains("!"))
|
||||
mapName = mapName.Replace('!', '/');
|
||||
|
||||
// try to fetch from GridServer
|
||||
List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20);
|
||||
@@ -114,7 +130,12 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
data.MapImageId = UUID.Zero;
|
||||
else
|
||||
data.MapImageId = info.TerrainImage;
|
||||
data.Name = info.RegionName;
|
||||
// ugh! V2-3 is very sensitive about the result being
|
||||
// exactly the same as the requested name
|
||||
if (regionInfos.Count == 1)
|
||||
data.Name = mapNameOrig;
|
||||
else
|
||||
data.Name = info.RegionName;
|
||||
data.RegionFlags = 0; // TODO not used?
|
||||
data.WaterHeight = 0; // not used
|
||||
data.X = (ushort)(info.RegionLocX / Constants.RegionSize);
|
||||
@@ -138,6 +159,17 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
// flags are agent flags sent from the viewer.
|
||||
// they have different values depending on different viewers, apparently
|
||||
remoteClient.SendMapBlock(blocks, flags);
|
||||
|
||||
// send extra user messages for V3
|
||||
// because the UI is very confusing
|
||||
// while we don't fix the hard-coded urls
|
||||
if (flags == 2)
|
||||
{
|
||||
if (regionInfos.Count == 0)
|
||||
remoteClient.SendAgentAlertMessage("No regions found with that name.", true);
|
||||
else if (regionInfos.Count == 1)
|
||||
remoteClient.SendAgentAlertMessage("Region found!", false);
|
||||
}
|
||||
}
|
||||
|
||||
// private Scene GetClientScene(IClientAPI client)
|
||||
|
||||
@@ -1583,8 +1583,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
double[,] map = SimulationDataService.LoadTerrain(RegionInfo.RegionID);
|
||||
if (map == null)
|
||||
{
|
||||
m_log.Info("[TERRAIN]: No default terrain. Generating a new terrain.");
|
||||
Heightmap = new TerrainChannel();
|
||||
// This should be in the Terrain module, but it isn't because
|
||||
// the heightmap is needed _way_ before the modules are initialized...
|
||||
IConfig terrainConfig = m_config.Configs["Terrain"];
|
||||
String m_InitialTerrain = "pinhead-island";
|
||||
if (terrainConfig != null)
|
||||
m_InitialTerrain = terrainConfig.GetString("InitialTerrain", m_InitialTerrain);
|
||||
|
||||
m_log.InfoFormat("[TERRAIN]: No default terrain. Generating a new terrain {0}.", m_InitialTerrain);
|
||||
Heightmap = new TerrainChannel(m_InitialTerrain);
|
||||
|
||||
SimulationDataService.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID);
|
||||
}
|
||||
|
||||
@@ -156,6 +156,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// that the region position is cached or performance will degrade
|
||||
Utils.LongToUInts(regionHandle, out x, out y);
|
||||
GridRegion dest = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y);
|
||||
|
||||
// bool v = true;
|
||||
if (!simulatorList.Contains(dest.ServerURI))
|
||||
{
|
||||
|
||||
@@ -46,23 +46,20 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
public TerrainChannel()
|
||||
{
|
||||
map = new double[Constants.RegionSize, Constants.RegionSize];
|
||||
taint = new bool[Constants.RegionSize / 16,Constants.RegionSize / 16];
|
||||
taint = new bool[Constants.RegionSize / 16, Constants.RegionSize / 16];
|
||||
|
||||
int x;
|
||||
for (x = 0; x < Constants.RegionSize; x++)
|
||||
{
|
||||
int y;
|
||||
for (y = 0; y < Constants.RegionSize; y++)
|
||||
{
|
||||
map[x, y] = TerrainUtil.PerlinNoise2D(x, y, 2, 0.125) * 10;
|
||||
double spherFacA = TerrainUtil.SphericalFactor(x, y, Constants.RegionSize / 2.0, Constants.RegionSize / 2.0, 50) * 0.01;
|
||||
double spherFacB = TerrainUtil.SphericalFactor(x, y, Constants.RegionSize / 2.0, Constants.RegionSize / 2.0, 100) * 0.001;
|
||||
if (map[x, y] < spherFacA)
|
||||
map[x, y] = spherFacA;
|
||||
if (map[x, y] < spherFacB)
|
||||
map[x, y] = spherFacB;
|
||||
}
|
||||
}
|
||||
PinHeadIsland();
|
||||
}
|
||||
|
||||
public TerrainChannel(String type)
|
||||
{
|
||||
map = new double[Constants.RegionSize, Constants.RegionSize];
|
||||
taint = new bool[Constants.RegionSize / 16, Constants.RegionSize / 16];
|
||||
|
||||
if (type.Equals("flat"))
|
||||
FlatLand();
|
||||
else
|
||||
PinHeadIsland();
|
||||
}
|
||||
|
||||
public TerrainChannel(double[,] import)
|
||||
@@ -238,5 +235,36 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void PinHeadIsland()
|
||||
{
|
||||
int x;
|
||||
for (x = 0; x < Constants.RegionSize; x++)
|
||||
{
|
||||
int y;
|
||||
for (y = 0; y < Constants.RegionSize; y++)
|
||||
{
|
||||
map[x, y] = TerrainUtil.PerlinNoise2D(x, y, 2, 0.125) * 10;
|
||||
double spherFacA = TerrainUtil.SphericalFactor(x, y, Constants.RegionSize / 2.0, Constants.RegionSize / 2.0, 50) * 0.01;
|
||||
double spherFacB = TerrainUtil.SphericalFactor(x, y, Constants.RegionSize / 2.0, Constants.RegionSize / 2.0, 100) * 0.001;
|
||||
if (map[x, y] < spherFacA)
|
||||
map[x, y] = spherFacA;
|
||||
if (map[x, y] < spherFacB)
|
||||
map[x, y] = spherFacB;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void FlatLand()
|
||||
{
|
||||
int x;
|
||||
for (x = 0; x < Constants.RegionSize; x++)
|
||||
{
|
||||
int y;
|
||||
for (y = 0; y < Constants.RegionSize; y++)
|
||||
map[x, y] = 21;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,22 +88,26 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||
|
||||
public bool SetNPCAppearance(UUID agentId, AvatarAppearance appearance, Scene scene)
|
||||
{
|
||||
ScenePresence sp = scene.GetScenePresence(agentId);
|
||||
if (sp == null || sp.IsChildAgent)
|
||||
ScenePresence npc = scene.GetScenePresence(agentId);
|
||||
if (npc == null || npc.IsChildAgent)
|
||||
return false;
|
||||
|
||||
lock (m_avatars)
|
||||
if (!m_avatars.ContainsKey(agentId))
|
||||
return false;
|
||||
|
||||
// Delete existing sp attachments
|
||||
scene.AttachmentsModule.DeleteAttachmentsFromScene(sp, false);
|
||||
// Delete existing npc attachments
|
||||
scene.AttachmentsModule.DeleteAttachmentsFromScene(npc, false);
|
||||
|
||||
// Set new sp appearance. Also sends to clients.
|
||||
scene.RequestModuleInterface<IAvatarFactoryModule>().SetAppearance(sp, new AvatarAppearance(appearance, true));
|
||||
// XXX: We can't just use IAvatarFactoryModule.SetAppearance() yet since it doesn't transfer attachments
|
||||
AvatarAppearance npcAppearance = new AvatarAppearance(appearance, true);
|
||||
npc.Appearance = npcAppearance;
|
||||
|
||||
// Rez needed sp attachments
|
||||
scene.AttachmentsModule.RezAttachments(sp);
|
||||
// Rez needed npc attachments
|
||||
scene.AttachmentsModule.RezAttachments(npc);
|
||||
|
||||
IAvatarFactoryModule module = scene.RequestModuleInterface<IAvatarFactoryModule>();
|
||||
module.SendAppearance(npc.UUID);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestAttachments()
|
||||
public void TestCreateWithAttachments()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
@@ -178,6 +178,50 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
|
||||
Assert.That(attSo.OwnerID, Is.EqualTo(npc.UUID));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestLoadAppearance()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
UUID userId = TestHelpers.ParseTail(0x1);
|
||||
UserAccountHelpers.CreateUserWithInventory(scene, userId);
|
||||
ScenePresence sp = SceneHelpers.AddScenePresence(scene, userId);
|
||||
|
||||
INPCModule npcModule = scene.RequestModuleInterface<INPCModule>();
|
||||
UUID npcId = npcModule.CreateNPC("John", "Smith", new Vector3(128, 128, 30), UUID.Zero, true, scene, sp.Appearance);
|
||||
|
||||
// Now add the attachment to the original avatar and use that to load a new appearance
|
||||
// TODO: Could also run tests loading from a notecard though this isn't much different for our purposes here
|
||||
UUID attItemId = TestHelpers.ParseTail(0x2);
|
||||
UUID attAssetId = TestHelpers.ParseTail(0x3);
|
||||
string attName = "att";
|
||||
|
||||
UserInventoryHelpers.CreateInventoryItem(scene, attName, attItemId, attAssetId, sp.UUID, InventoryType.Object);
|
||||
|
||||
am.RezSingleAttachmentFromInventory(sp, attItemId, (uint)AttachmentPoint.Chest);
|
||||
|
||||
npcModule.SetNPCAppearance(npcId, sp.Appearance, scene);
|
||||
|
||||
ScenePresence npc = scene.GetScenePresence(npcId);
|
||||
|
||||
// Check scene presence status
|
||||
Assert.That(npc.HasAttachments(), Is.True);
|
||||
List<SceneObjectGroup> attachments = npc.GetAttachments();
|
||||
Assert.That(attachments.Count, Is.EqualTo(1));
|
||||
SceneObjectGroup attSo = attachments[0];
|
||||
|
||||
// Just for now, we won't test the name since this is (wrongly) the asset part name rather than the item
|
||||
// name. TODO: Do need to fix ultimately since the item may be renamed before being passed on to an NPC.
|
||||
// Assert.That(attSo.Name, Is.EqualTo(attName));
|
||||
|
||||
Assert.That(attSo.AttachmentPoint, Is.EqualTo((byte)AttachmentPoint.Chest));
|
||||
Assert.That(attSo.IsAttachment);
|
||||
Assert.That(attSo.UsesPhysics, Is.False);
|
||||
Assert.That(attSo.IsTemporary, Is.False);
|
||||
Assert.That(attSo.OwnerID, Is.EqualTo(npc.UUID));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestMove()
|
||||
{
|
||||
|
||||
@@ -7069,10 +7069,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
shapeBlock.PathScaleX = 100;
|
||||
shapeBlock.PathScaleY = 150;
|
||||
|
||||
if (type != (int)ScriptBaseClass.PRIM_SCULPT_TYPE_CYLINDER &&
|
||||
type != (int)ScriptBaseClass.PRIM_SCULPT_TYPE_PLANE &&
|
||||
type != (int)ScriptBaseClass.PRIM_SCULPT_TYPE_SPHERE &&
|
||||
type != (int)ScriptBaseClass.PRIM_SCULPT_TYPE_TORUS)
|
||||
int flag = type & (ScriptBaseClass.PRIM_SCULPT_FLAG_INVERT | ScriptBaseClass.PRIM_SCULPT_FLAG_MIRROR);
|
||||
|
||||
if (type != (ScriptBaseClass.PRIM_SCULPT_TYPE_CYLINDER | flag) &&
|
||||
type != (ScriptBaseClass.PRIM_SCULPT_TYPE_PLANE | flag) &&
|
||||
type != (ScriptBaseClass.PRIM_SCULPT_TYPE_SPHERE | flag) &&
|
||||
type != (ScriptBaseClass.PRIM_SCULPT_TYPE_TORUS | flag))
|
||||
{
|
||||
// default
|
||||
type = (int)ScriptBaseClass.PRIM_SCULPT_TYPE_SPHERE;
|
||||
|
||||
@@ -157,12 +157,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
|
||||
public void CheckSenseRepeaterEvents()
|
||||
{
|
||||
// Nothing to do here?
|
||||
if (SenseRepeaters.Count == 0)
|
||||
return;
|
||||
|
||||
lock (SenseRepeatListLock)
|
||||
{
|
||||
// Nothing to do here?
|
||||
if (SenseRepeaters.Count == 0)
|
||||
return;
|
||||
|
||||
// Go through all timers
|
||||
foreach (SenseRepeatClass ts in SenseRepeaters)
|
||||
{
|
||||
@@ -635,7 +635,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
ts.next =
|
||||
DateTime.Now.ToUniversalTime().AddSeconds(ts.interval);
|
||||
|
||||
SenseRepeaters.Add(ts);
|
||||
lock (SenseRepeatListLock)
|
||||
SenseRepeaters.Add(ts);
|
||||
|
||||
idx += 6;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -378,6 +378,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
public const int PRIM_SCULPT_TYPE_TORUS = 2;
|
||||
public const int PRIM_SCULPT_TYPE_PLANE = 3;
|
||||
public const int PRIM_SCULPT_TYPE_CYLINDER = 4;
|
||||
public const int PRIM_SCULPT_FLAG_INVERT = 64;
|
||||
public const int PRIM_SCULPT_FLAG_MIRROR = 128;
|
||||
|
||||
public const int MASK_BASE = 0;
|
||||
public const int MASK_OWNER = 1;
|
||||
|
||||
@@ -224,13 +224,11 @@ namespace OpenSim.Region.UserStatistics
|
||||
concurrencyCounter--;
|
||||
|
||||
response_code = 200;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
strOut = MainServer.Instance.GetHTTP404("");
|
||||
}
|
||||
|
||||
|
||||
responsedata["int_response_code"] = response_code;
|
||||
responsedata["content_type"] = contenttype;
|
||||
@@ -247,43 +245,44 @@ namespace OpenSim.Region.UserStatistics
|
||||
// TODO: FIXME: implement stats migrations
|
||||
const string SQL = @"SELECT * FROM migrations LIMIT 1";
|
||||
|
||||
SqliteCommand cmd = new SqliteCommand(SQL, db);
|
||||
|
||||
try
|
||||
using (SqliteCommand cmd = new SqliteCommand(SQL, db))
|
||||
{
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
catch (SqliteSyntaxException)
|
||||
{
|
||||
CreateTables(db);
|
||||
try
|
||||
{
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
catch (SqliteSyntaxException)
|
||||
{
|
||||
CreateTables(db);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void CreateTables(SqliteConnection db)
|
||||
{
|
||||
SqliteCommand createcmd = new SqliteCommand(SQL_STATS_TABLE_CREATE, db);
|
||||
createcmd.ExecuteNonQuery();
|
||||
using (SqliteCommand createcmd = new SqliteCommand(SQL_STATS_TABLE_CREATE, db))
|
||||
{
|
||||
createcmd.ExecuteNonQuery();
|
||||
|
||||
createcmd.CommandText = SQL_MIGRA_TABLE_CREATE;
|
||||
createcmd.ExecuteNonQuery();
|
||||
createcmd.CommandText = SQL_MIGRA_TABLE_CREATE;
|
||||
createcmd.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void PostInitialise()
|
||||
{
|
||||
if (!enabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
AddHandlers();
|
||||
}
|
||||
|
||||
public virtual void Close()
|
||||
{
|
||||
if (!enabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
dbConn.Close();
|
||||
dbConn.Dispose();
|
||||
m_sessions.Clear();
|
||||
@@ -304,7 +303,8 @@ namespace OpenSim.Region.UserStatistics
|
||||
|
||||
public void OnRegisterCaps(UUID agentID, Caps caps)
|
||||
{
|
||||
m_log.DebugFormat("[WEB STATS MODULE]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps);
|
||||
// m_log.DebugFormat("[WEB STATS MODULE]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps);
|
||||
|
||||
string capsPath = "/CAPS/VS/" + UUID.Random();
|
||||
caps.RegisterHandler("ViewerStats",
|
||||
new RestStreamHandler("POST", capsPath,
|
||||
@@ -318,7 +318,6 @@ namespace OpenSim.Region.UserStatistics
|
||||
|
||||
public void OnDeRegisterCaps(UUID agentID, Caps caps)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected virtual void AddHandlers()
|
||||
@@ -368,7 +367,6 @@ namespace OpenSim.Region.UserStatistics
|
||||
|
||||
public void OnMakeChildAgent(ScenePresence agent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void OnClientClosed(UUID agentID, Scene scene)
|
||||
@@ -430,6 +428,7 @@ namespace OpenSim.Region.UserStatistics
|
||||
return scene.RegionInfo.RegionID;
|
||||
}
|
||||
}
|
||||
|
||||
return UUID.Zero;
|
||||
}
|
||||
|
||||
@@ -458,14 +457,14 @@ namespace OpenSim.Region.UserStatistics
|
||||
UserSessionData usd;
|
||||
OSD message = OSDParser.DeserializeLLSDXml(request);
|
||||
OSDMap mmap;
|
||||
|
||||
lock (m_sessions)
|
||||
{
|
||||
if (agentID != UUID.Zero)
|
||||
{
|
||||
|
||||
if (!m_sessions.ContainsKey(agentID))
|
||||
{
|
||||
m_log.Warn("[WEB STATS MODULE]: no session for stat disclosure");
|
||||
m_log.WarnFormat("[WEB STATS MODULE]: no session for stat disclosure for agent {0}", agentID);
|
||||
return new UserSessionID();
|
||||
}
|
||||
uid = m_sessions[agentID];
|
||||
@@ -585,8 +584,6 @@ namespace OpenSim.Region.UserStatistics
|
||||
usd.n_out_kb = (float)net_out["kbytes"].AsReal();
|
||||
usd.n_out_pk = net_out["packets"].AsInteger();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -602,83 +599,85 @@ namespace OpenSim.Region.UserStatistics
|
||||
|
||||
lock (db)
|
||||
{
|
||||
SqliteCommand updatecmd = new SqliteCommand(SQL_STATS_TABLE_UPDATE, db);
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":session_id", uid.session_data.session_id.ToString()));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":agent_id", uid.session_data.agent_id.ToString()));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":region_id", uid.session_data.region_id.ToString()));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":last_updated", (int) uid.session_data.last_updated));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":remote_ip", uid.session_data.remote_ip));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":name_f", uid.session_data.name_f));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":name_l", uid.session_data.name_l));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":avg_agents_in_view", uid.session_data.avg_agents_in_view));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":min_agents_in_view",
|
||||
(int) uid.session_data.min_agents_in_view));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":max_agents_in_view",
|
||||
(int) uid.session_data.max_agents_in_view));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":mode_agents_in_view",
|
||||
(int) uid.session_data.mode_agents_in_view));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":avg_fps", uid.session_data.avg_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":min_fps", uid.session_data.min_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":max_fps", uid.session_data.max_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":mode_fps", uid.session_data.mode_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":a_language", uid.session_data.a_language));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":mem_use", uid.session_data.mem_use));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":meters_traveled", uid.session_data.meters_traveled));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":avg_ping", uid.session_data.avg_ping));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":min_ping", uid.session_data.min_ping));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":max_ping", uid.session_data.max_ping));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":mode_ping", uid.session_data.mode_ping));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":regions_visited", uid.session_data.regions_visited));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":run_time", uid.session_data.run_time));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":avg_sim_fps", uid.session_data.avg_sim_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":min_sim_fps", uid.session_data.min_sim_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":max_sim_fps", uid.session_data.max_sim_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":mode_sim_fps", uid.session_data.mode_sim_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":start_time", uid.session_data.start_time));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":client_version", uid.session_data.client_version));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":s_cpu", uid.session_data.s_cpu));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":s_gpu", uid.session_data.s_gpu));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":s_os", uid.session_data.s_os));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":s_ram", uid.session_data.s_ram));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":d_object_kb", uid.session_data.d_object_kb));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":d_texture_kb", uid.session_data.d_texture_kb));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":d_world_kb", uid.session_data.d_world_kb));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":n_in_kb", uid.session_data.n_in_kb));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":n_in_pk", uid.session_data.n_in_pk));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":n_out_kb", uid.session_data.n_out_kb));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":n_out_pk", uid.session_data.n_out_pk));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":f_dropped", uid.session_data.f_dropped));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":f_failed_resends", uid.session_data.f_failed_resends));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":f_invalid", uid.session_data.f_invalid));
|
||||
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":f_off_circuit", uid.session_data.f_off_circuit));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":f_resent", uid.session_data.f_resent));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":f_send_packet", uid.session_data.f_send_packet));
|
||||
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":session_key", uid.session_data.session_id.ToString()));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":agent_key", uid.session_data.agent_id.ToString()));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":region_key", uid.session_data.region_id.ToString()));
|
||||
// m_log.Debug("UPDATE");
|
||||
|
||||
int result = updatecmd.ExecuteNonQuery();
|
||||
|
||||
if (result == 0)
|
||||
using (SqliteCommand updatecmd = new SqliteCommand(SQL_STATS_TABLE_UPDATE, db))
|
||||
{
|
||||
// m_log.Debug("INSERT");
|
||||
updatecmd.CommandText = SQL_STATS_TABLE_INSERT;
|
||||
try
|
||||
{
|
||||
updatecmd.ExecuteNonQuery();
|
||||
}
|
||||
catch (SqliteExecutionException)
|
||||
{
|
||||
m_log.Warn("[WEB STATS MODULE]: failed to write stats to storage Execution Exception");
|
||||
}
|
||||
catch (SqliteSyntaxException)
|
||||
{
|
||||
m_log.Warn("[WEB STATS MODULE]: failed to write stats to storage SQL Syntax Exception");
|
||||
}
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":session_id", uid.session_data.session_id.ToString()));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":agent_id", uid.session_data.agent_id.ToString()));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":region_id", uid.session_data.region_id.ToString()));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":last_updated", (int) uid.session_data.last_updated));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":remote_ip", uid.session_data.remote_ip));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":name_f", uid.session_data.name_f));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":name_l", uid.session_data.name_l));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":avg_agents_in_view", uid.session_data.avg_agents_in_view));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":min_agents_in_view",
|
||||
(int) uid.session_data.min_agents_in_view));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":max_agents_in_view",
|
||||
(int) uid.session_data.max_agents_in_view));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":mode_agents_in_view",
|
||||
(int) uid.session_data.mode_agents_in_view));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":avg_fps", uid.session_data.avg_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":min_fps", uid.session_data.min_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":max_fps", uid.session_data.max_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":mode_fps", uid.session_data.mode_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":a_language", uid.session_data.a_language));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":mem_use", uid.session_data.mem_use));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":meters_traveled", uid.session_data.meters_traveled));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":avg_ping", uid.session_data.avg_ping));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":min_ping", uid.session_data.min_ping));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":max_ping", uid.session_data.max_ping));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":mode_ping", uid.session_data.mode_ping));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":regions_visited", uid.session_data.regions_visited));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":run_time", uid.session_data.run_time));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":avg_sim_fps", uid.session_data.avg_sim_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":min_sim_fps", uid.session_data.min_sim_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":max_sim_fps", uid.session_data.max_sim_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":mode_sim_fps", uid.session_data.mode_sim_fps));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":start_time", uid.session_data.start_time));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":client_version", uid.session_data.client_version));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":s_cpu", uid.session_data.s_cpu));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":s_gpu", uid.session_data.s_gpu));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":s_os", uid.session_data.s_os));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":s_ram", uid.session_data.s_ram));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":d_object_kb", uid.session_data.d_object_kb));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":d_texture_kb", uid.session_data.d_texture_kb));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":d_world_kb", uid.session_data.d_world_kb));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":n_in_kb", uid.session_data.n_in_kb));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":n_in_pk", uid.session_data.n_in_pk));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":n_out_kb", uid.session_data.n_out_kb));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":n_out_pk", uid.session_data.n_out_pk));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":f_dropped", uid.session_data.f_dropped));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":f_failed_resends", uid.session_data.f_failed_resends));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":f_invalid", uid.session_data.f_invalid));
|
||||
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":f_off_circuit", uid.session_data.f_off_circuit));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":f_resent", uid.session_data.f_resent));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":f_send_packet", uid.session_data.f_send_packet));
|
||||
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":session_key", uid.session_data.session_id.ToString()));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":agent_key", uid.session_data.agent_id.ToString()));
|
||||
updatecmd.Parameters.Add(new SqliteParameter(":region_key", uid.session_data.region_id.ToString()));
|
||||
|
||||
// m_log.DebugFormat("[WEB STATS MODULE]: Database stats update for {0}", uid.session_data.agent_id);
|
||||
|
||||
int result = updatecmd.ExecuteNonQuery();
|
||||
|
||||
if (result == 0)
|
||||
{
|
||||
// m_log.DebugFormat("[WEB STATS MODULE]: Database stats insert for {0}", uid.session_data.agent_id);
|
||||
|
||||
updatecmd.CommandText = SQL_STATS_TABLE_INSERT;
|
||||
|
||||
try
|
||||
{
|
||||
updatecmd.ExecuteNonQuery();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.WarnFormat(
|
||||
"[WEB STATS MODULE]: failed to write stats for {0}, storage Execution Exception {1}{2}",
|
||||
uid.session_data.agent_id, e.Message, e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,6 +56,10 @@ namespace pCampBot
|
||||
{
|
||||
Help();
|
||||
}
|
||||
else if (config.Get("firstname") == null || config.Get("lastname") == null || config.Get("password") == null)
|
||||
{
|
||||
Console.WriteLine("ERROR: You must supply a firstname, lastname and password for the bots.");
|
||||
}
|
||||
else
|
||||
{
|
||||
int botcount = config.GetInt("botcount", 1);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
<configuration>
|
||||
<dllmap os="osx" dll="sqlite3" target="./libsqlite3.dylib" />
|
||||
<dllmap os="!windows,osx" cpu="x86-64,ia64" wordsize="64" dll="sqlite3" target="./libsqlite3_64.so" />
|
||||
<dllmap os="!windows,osx" cpu="x86" wordsize="32" dll="sqlite3" target="./libsqlite3_32.so" />
|
||||
<dllmap os="osx" dll="sqlite3" target="lib64/libsqlite3.dylib" />
|
||||
<dllmap os="!windows,osx" cpu="x86-64,ia64" wordsize="64" dll="sqlite3" target="lib64/libsqlite3_64.so" />
|
||||
<dllmap os="!windows,osx" cpu="x86" wordsize="32" dll="sqlite3" target="lib32/libsqlite3_32.so" />
|
||||
</configuration>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<configuration>
|
||||
<dllmap os="osx" dll="ode" target="libode.dylib" />
|
||||
<dllmap os="!windows,osx" cpu="x86-64,ia64" dll="ode" target="libode-x86_64" />
|
||||
<dllmap os="!windows,osx" cpu="x86" dll="ode" target="libode" />
|
||||
<dllmap os="!windows,osx" cpu="ppc64" dll="ode" target="libode-ppc64" />
|
||||
<dllmap os="!windows,osx" cpu="s390x" dll="ode" target="libode-s390x" />
|
||||
</configuration>
|
||||
<dllmap os="osx" dll="ode" target="lib64/libode.dylib" />
|
||||
<dllmap os="!windows,osx" cpu="x86-64,ia64" dll="ode" target="lib64/libode-x86_64" />
|
||||
<dllmap os="!windows,osx" cpu="x86" dll="ode" target="lib32/libode" />
|
||||
<dllmap os="!windows,osx" cpu="ppc64" dll="ode" target="lib64/libode-ppc64" />
|
||||
<dllmap os="!windows,osx" cpu="s390x" dll="ode" target="lib64/libode-s390x" />
|
||||
</configuration>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<configuration>
|
||||
<dllmap os="osx" dll="openjpeg-dotnet.dll" target="libopenjpeg-dotnet-2.1.3.0-dotnet-1.dylib" />
|
||||
<dllmap os="!windows,osx" cpu="x86-64,ia64" dll="openjpeg-dotnet.dll" target="libopenjpeg-dotnet-2.1.3.0-dotnet-1-x86_64" />
|
||||
<dllmap os="!windows,osx" cpu="x86-64,ia64" dll="openjpeg-dotnet-x86_64.dll" target="libopenjpeg-dotnet-2.1.3.0-dotnet-1-x86_64" />
|
||||
<dllmap os="!windows,osx" cpu="x86" dll="openjpeg-dotnet.dll" target="libopenjpeg-dotnet-2.1.3.0-dotnet-1-i686" />
|
||||
<dllmap os="!windows,osx" cpu="x86" dll="openjpeg-dotnet-x86_64.dll" target="libopenjpeg-dotnet-2.1.3.0-dotnet-1-i686" />
|
||||
<dllmap os="osx" dll="openjpeg-dotnet.dll" target="lib64/libopenjpeg-dotnet-2.1.3.0-dotnet-1.dylib" />
|
||||
<dllmap os="!windows,osx" cpu="x86-64,ia64" dll="openjpeg-dotnet.dll" target="lib32/libopenjpeg-dotnet-2.1.3.0-dotnet-1-x86_64" />
|
||||
<dllmap os="!windows,osx" cpu="x86-64,ia64" dll="openjpeg-dotnet-x86_64.dll" target="lib64/libopenjpeg-dotnet-2.1.3.0-dotnet-1-x86_64" />
|
||||
<dllmap os="!windows,osx" cpu="x86" dll="openjpeg-dotnet.dll" target="lib32/libopenjpeg-dotnet-2.1.3.0-dotnet-1-i686" />
|
||||
<dllmap os="!windows,osx" cpu="x86" dll="openjpeg-dotnet-x86_64.dll" target="lib64/libopenjpeg-dotnet-2.1.3.0-dotnet-1-i686" />
|
||||
</configuration>
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
|
||||
|
||||
[Startup]
|
||||
|
||||
;# {ConsolePrompt} {} {ConsolePrompt} {} "Region (\R) "
|
||||
;; Console prompt
|
||||
;; Certain special characters can be used to customize the prompt
|
||||
@@ -773,6 +772,9 @@
|
||||
;# {Enabled} {} {Enable Non Player Character (NPC) facilities} {true false} false
|
||||
; Enabled = false
|
||||
|
||||
[Terrain]
|
||||
;# {InitialTerrain} {} {Initial terrain type} {pinhead-island flat} pinhead-island
|
||||
; InitialTerrain = "pinhead-island"
|
||||
|
||||
[PrimLimitsModule]
|
||||
;# {EnforcePrimLimits} {} {Enforce parcel prim limits} {true false} false
|
||||
|
||||
@@ -1512,6 +1512,9 @@
|
||||
;; Enable Non Player Character (NPC) facilities
|
||||
Enabled = false
|
||||
|
||||
[Terrain]
|
||||
InitialTerrain = "pinhead-island"
|
||||
|
||||
;;
|
||||
;; If you are using a simian grid frontend you can enable
|
||||
;; this module to upload tile images for the mapping fn
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user