Compare commits

...

21 Commits

Author SHA1 Message Date
lbsa71 8acb60df0d * Added "show queues" command that shows throttling queues for all clients.
*** This only works for LLCLientView at the moment ***
2008-12-18 13:02:26 +00:00
MW 9eced15408 Merged Trunk Revisions 7738, 7739 and 7740 to 0.6.0-stable branch. Fix some permission bugs 2008-12-17 13:46:39 +00:00
MW 17673df6f7 Merged Revision 7654 from Trunk to 0.6.0-stable branch. A patch from jonc to correct the loading of Raw terrain files. 2008-12-16 14:09:59 +00:00
MW 8c19809ed2 Merged Revision 7650 from Trunk to 0.6.0-stable branch. A patch from jonc to add a "terrain flip x/y" command. 2008-12-16 13:57:48 +00:00
MW d19212c3e4 Applied the changes to PermissionsModule.cs from trunk revision 7301 (which was a patch from Christopher Yeoh's (IBM)) so that permissions are propagated when giving Inventory items to other users. 2008-12-15 18:45:02 +00:00
MW 648de85737 Merged Trunk Revision 7203 to 0.6.0 stable branch , a MSSQL fix from Ruud Lathrop. Mantis #2591 2008-12-08 17:17:29 +00:00
MW 58f3fa71c2 Made BaseOpenSimServer.ShutdownSpecific() public. As the OpenSimBase.Shutdown() includes a Environment.Exit(0); which is not always wanted when shutting down, like from a windows service.
Again not really a bug fix per se, but its not going to change stablebility.
2008-12-02 11:26:38 +00:00
MW 66737b9c0c Added two new "trusted" url handlers to the Inventory server, to allow the user server to get a list of items in a folder and add a new item.
Not really bug fixes but as trunk is so unstable at the moment am adding them to 0.6.0-stable branch as well
2008-12-02 10:43:01 +00:00
MW 4295c125aa Applying Trunk revision 7562 to the 0.6.0 stable branch
Added a Catch(InvalidOperationException) to BaseHttpServer.HandleRequest(). Which is thrown due to errors in the XML deserializing. Without this catch is it easy to bring down any of the opensim servers on purpose by just sending corrupt xml to them.
2008-12-01 11:28:41 +00:00
MW a2c55d7fdb applied Melanie's Avatar hip offset changes from Trunk revision 7286 to the 0.6 stable branch 2008-11-25 19:44:50 +00:00
MW fdbe41926b made the messaging server OpenMessage_Main constructor public (from private) so it can be subclassed. Not exactly a bug fix per se but makes is a small change that makes this branch more usable. 2008-11-25 15:21:51 +00:00
Justin Clarke Casey f9530eb0c7 * Apply http://opensimulator.org/mantis/view.php?id=2633 to stable branch
* This stops object persistence at shutdown persisting objects that should not be saved.
* Thanks idb.
2008-11-17 20:39:54 +00:00
MW c3bb6643e8 Applied melanie's changes from Trunk Revision 7239 to 0.6 stable branch. To fix avatar crossing issues. 2008-11-14 10:54:19 +00:00
MW af4ff8686b Applied Diva's patch from mantis #2590/ Trunk Revision 7200 to 0.6 stable branch 2008-11-14 10:38:47 +00:00
MW 9cf75f649d Applied idb's patch to fix avatar height from Trunk Revision 7218 to the 0.6 stable branch 2008-11-14 10:07:55 +00:00
MW afc2ddaaec applying Mysql inventory fixes from Trunk revision 7285 to 0.6 stable branch 2008-11-14 09:58:36 +00:00
MW 335cffbfed applying AvatarFactory fix from trunk revision 7284 to the 0.6 stable branch 2008-11-14 09:55:03 +00:00
MW 8f0bf406fb Applying Mantis patch 2597 (applied to trunk in revision 7274) to 0.6 stable branch 2008-11-13 15:42:19 +00:00
lbsa71 f888656bca * Re-applied r7223 2008-11-13 13:32:15 +00:00
lbsa71 e762d9b612 * Copied 0.6.0-release to 0.6.0-stable in accordance with the 'fortification' discussion on opensim-dev.
* 'stable' should be used only for stability fixes.
2008-11-13 12:55:57 +00:00
Charles Krinke fbafaab342 made a copy 2008-11-08 14:33:51 +00:00
31 changed files with 473 additions and 195 deletions

View File

@ -54,6 +54,7 @@ Patches
* jhurliman
* jimbo2120 (IBM)
* John R Sohn (XenReborn)
* jonc
* Junta Kohime
* Kayne
* Kevin Cozens
@ -63,6 +64,7 @@ Patches
* M.Igarashi
* Mic Bowman
* mikkopa/_someone - RealXtend
* Mircea Kitsune
* nlin
* nornalbion
* openlifegrid.com
@ -79,7 +81,6 @@ Patches
* Y. Nitta
* YZh
* Zha Ewry
* Mircea Kitsune
LSL Devs

View File

@ -0,0 +1,25 @@
BEGIN TRANSACTION
ALTER TABLE dbo.estate_managers DROP CONSTRAINT PK_estate_managers
CREATE NONCLUSTERED INDEX IX_estate_managers ON dbo.estate_managers
(
EstateID
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
ALTER TABLE dbo.estate_groups DROP CONSTRAINT PK_estate_groups
CREATE NONCLUSTERED INDEX IX_estate_groups ON dbo.estate_groups
(
EstateID
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
ALTER TABLE dbo.estate_users DROP CONSTRAINT PK_estate_users
CREATE NONCLUSTERED INDEX IX_estate_users ON dbo.estate_users
(
EstateID
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
COMMIT

View File

@ -0,0 +1,25 @@
BEGIN TRANSACTION
CREATE TABLE dbo.Tmp_estateban
(
EstateID int NOT NULL,
bannedUUID varchar(36) NOT NULL,
bannedIp varchar(16) NULL,
bannedIpHostMask varchar(16) NULL,
bannedNameMask varchar(64) NULL
) ON [PRIMARY]
IF EXISTS(SELECT * FROM dbo.estateban)
EXEC('INSERT INTO dbo.Tmp_estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask)
SELECT EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask FROM dbo.estateban')
DROP TABLE dbo.estateban
EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT'
CREATE NONCLUSTERED INDEX IX_estateban ON dbo.estateban
(
EstateID
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
COMMIT

View File

@ -142,7 +142,12 @@ namespace OpenSim.Data.MySQL
MySqlDataReader reader = result.ExecuteReader();
while (reader.Read())
items.Add(readInventoryItem(reader));
{
// A null item (because something went wrong) breaks everything in the folder
InventoryItemBase item = readInventoryItem(reader);
if (item != null)
items.Add(item);
}
reader.Close();
result.Dispose();
@ -301,24 +306,36 @@ namespace OpenSim.Data.MySQL
try
{
InventoryItemBase item = new InventoryItemBase();
// Be a bit safer in parsing these because the
// database doesn't enforce them to be not null, and
// the inventory still works if these are weird in the
// db
UUID Owner = UUID.Zero;
UUID Creator = UUID.Zero;
UUID GroupID = UUID.Zero;
UUID.TryParse((string)reader["avatarID"], out Owner);
UUID.TryParse((string)reader["creatorID"], out Creator);
UUID.TryParse((string)reader["groupID"], out GroupID);
item.Owner = Owner;
item.Creator = Creator;
item.GroupID = GroupID;
// Rest of the parsing. If these UUID's fail, we're dead anyway
item.ID = new UUID((string) reader["inventoryID"]);
item.AssetID = new UUID((string) reader["assetID"]);
item.AssetType = (int) reader["assetType"];
item.Folder = new UUID((string) reader["parentFolderID"]);
item.Owner = new UUID((string) reader["avatarID"]);
item.Name = (string) reader["inventoryName"];
item.Description = (string) reader["inventoryDescription"];
item.NextPermissions = (uint) reader["inventoryNextPermissions"];
item.CurrentPermissions = (uint) reader["inventoryCurrentPermissions"];
item.InvType = (int) reader["invType"];
item.Creator = new UUID((string) reader["creatorID"]);
item.BasePermissions = (uint) reader["inventoryBasePermissions"];
item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"];
item.SalePrice = (int) reader["salePrice"];
item.SaleType = Convert.ToByte(reader["saleType"]);
item.CreationDate = (int) reader["creationDate"];
item.GroupID = new UUID(reader["groupID"].ToString());
item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]);
item.Flags = (uint) reader["flags"];
@ -814,8 +831,11 @@ namespace OpenSim.Data.MySQL
List<InventoryItemBase> list = new List<InventoryItemBase>();
while (result.Read())
list.Add(readInventoryItem(result));
{
InventoryItemBase item = readInventoryItem(result);
if (item != null)
list.Add(item);
}
return list;
}
catch (Exception e)

View File

@ -231,6 +231,7 @@ namespace OpenSim.Framework
}
protected float m_avatarHeight = 0;
protected float m_hipOffset = 0;
public virtual float AvatarHeight
{
@ -238,6 +239,11 @@ namespace OpenSim.Framework
set { m_avatarHeight = value; }
}
public virtual float HipOffset
{
get { return m_hipOffset; }
}
public AvatarAppearance()
{
m_wearables = new AvatarWearable[MAX_WEARABLES];
@ -271,22 +277,20 @@ namespace OpenSim.Framework
{
Primitive.TextureEntry textureEnt = new Primitive.TextureEntry(texture, 0, texture.Length);
m_texture = textureEnt;
// m_log.DebugFormat("[APPEARANCE]: Setting an avatar appearance with {0} faces", m_texture.FaceTextures.Length);
// for (int i = 0; i < m_texture.FaceTextures.Length; i++)
// {
// Primitive.TextureEntryFace face = m_texture.FaceTextures[i];
// String textureIdString = (face != null ? face.TextureID.ToString() : "none");
// m_log.DebugFormat("[APPEARANCE]: Texture {0} is {1}", i, textureIdString);
// }
m_visualparams = visualParam.ToArray();
// Teravus : Nifty AV Height Getting Maaaaagical formula. Oh how we love turning 0-255 into meters.
// (float)m_visualParams[25] = Height
// (float)m_visualParams[125] = LegLength
m_avatarHeight = (1.50856f + (((float) m_visualparams[25]/255.0f)*(2.525506f - 1.50856f)))
+ (((float) m_visualparams[125]/255.0f)/1.5f);
m_avatarHeight = 1.23077f // Shortest possible avatar height
+ 0.516945f * (float)m_visualparams[25] / 255.0f // Body height
+ 0.072514f * (float)m_visualparams[120] / 255.0f // Head size
+ 0.3836f * (float)m_visualparams[125] / 255.0f // Leg length
+ 0.08f * (float)m_visualparams[77] / 255.0f // Shoe heel height
+ 0.07f * (float)m_visualparams[78] / 255.0f // Shoe platform height
+ 0.076f * (float)m_visualparams[148] / 255.0f; // Neck length
m_hipOffset = (0.615385f // Half of avatar
+ 0.08f * (float)m_visualparams[77] / 255.0f // Shoe heel height
+ 0.07f * (float)m_visualparams[78] / 255.0f // Shoe platform height
+ 0.3836f * (float)m_visualparams[125] / 255.0f // Leg length
- m_avatarHeight / 2) * 0.3f - 0.04f;
System.Console.WriteLine("Height {0} Hip offset {1}", m_avatarHeight, m_hipOffset);
}
public virtual void SetWearable(int wearableId, AvatarWearable wearable)

View File

@ -330,10 +330,11 @@ namespace OpenSim.Framework.Communications.Cache
/// <summary>
/// Create a folder in this agent's inventory.
/// </summary>
///
/// If the inventory service has not yet delievered the inventory
/// for this user then the request will be queued.
/// </summary>
///
/// <param name="parentID"></param>
/// <returns></returns>
public bool CreateFolder(string folderName, UUID folderID, ushort folderType, UUID parentID)

View File

@ -224,11 +224,12 @@ namespace OpenSim.Framework.Communications.Cache
/// <summary>
/// Handle a client request to update the inventory folder
/// </summary>
///
/// FIXME: We call add new inventory folder because in the data layer, we happen to use an SQL REPLACE
/// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing,
/// and needs to be changed.
/// </summary>
///
/// <param name="remoteClient"></param>
/// <param name="folderID"></param>
/// <param name="type"></param>

View File

@ -45,6 +45,7 @@ namespace OpenSim.Framework
public interface IScene
{
RegionInfo RegionInfo { get; }
uint NextAvatarLocalId { get; }
RegionStatus Region_Status { get; set; }
ClientManager ClientManager { get; }

View File

@ -470,6 +470,11 @@ namespace OpenSim.Framework.Servers
{
m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw {0}", e);
}
catch (InvalidOperationException e)
{
m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw {0}", e);
SendHTML500(response);
}
}
private bool TryGetStreamHandler(string handlerKey, out IRequestHandler streamHandler)

View File

@ -103,7 +103,7 @@ namespace OpenSim.Framework.Servers
/// <summary>
/// Should be overriden and referenced by descendents if they need to perform extra shutdown processing
/// </summary>
protected virtual void ShutdownSpecific() {}
public virtual void ShutdownSpecific() {}
/// <summary>
/// Print statistics to the logfile, if they are active
@ -373,7 +373,7 @@ namespace OpenSim.Framework.Servers
/// That is something that cannot be determined within this class. So
/// all attempts to use the console MUST be verified.
/// </summary>
private void Notice(string msg)
protected void Notice(string msg)
{
if (m_console != null)
{

View File

@ -195,7 +195,7 @@ namespace OpenSim.Grid.GridServer
*/
}
protected override void ShutdownSpecific()
public override void ShutdownSpecific()
{
foreach (IGridPlugin plugin in m_plugins) plugin.Dispose();
}

View File

@ -209,6 +209,23 @@ namespace OpenSim.Grid.InventoryServer
return invCollection;
}
public List<InventoryItemBase> GetFolderItems(Guid folderID)
{
List<InventoryItemBase> allItems = new List<InventoryItemBase>();
List<InventoryItemBase> items = RequestFolderItems(new UUID(folderID));
if (items != null)
{
allItems.InsertRange(0, items);
}
m_log.InfoFormat(
"[GRID AGENT INVENTORY]: Sending back inventory response containing {0} items", allItems.Count.ToString());
return allItems;
}
/// <summary>
/// Guid to UUID wrapper for same name IInventoryServices method
/// </summary>

View File

@ -105,10 +105,18 @@ namespace OpenSim.Grid.InventoryServer
new RestDeserialiseSecureHandler<InventoryFolderBase, bool>(
"POST", "/PurgeFolder/", m_inventoryService.PurgeFolder, m_inventoryService.CheckAuthSession));
m_httpServer.AddStreamHandler(
new RestDeserialiseTrustedHandler<Guid, List<InventoryItemBase>>(
"POST", "/GetItems/", m_inventoryService.GetFolderItems, m_inventoryService.CheckTrustSource));
m_httpServer.AddStreamHandler(
new RestDeserialiseSecureHandler<InventoryItemBase, bool>(
"POST", "/NewItem/", m_inventoryService.AddItem, m_inventoryService.CheckAuthSession));
m_httpServer.AddStreamHandler(
new RestDeserialiseTrustedHandler<InventoryItemBase, bool>(
"POST", "/AddNewItem/", m_inventoryService.AddItem, m_inventoryService.CheckTrustSource));
m_httpServer.AddStreamHandler(
new RestDeserialiseSecureHandler<InventoryItemBase, bool>(
"POST", "/DeleteItem/", m_inventoryService.DeleteItem, m_inventoryService.CheckAuthSession));

View File

@ -62,7 +62,7 @@ namespace OpenSim.Grid.MessagingServer
messageserver.Work();
}
private OpenMessage_Main()
public OpenMessage_Main()
{
m_console = new ConsoleBase("Messaging", this);
MainConsole.Instance = m_console;
@ -174,7 +174,7 @@ namespace OpenSim.Grid.MessagingServer
m_console.Notice("register - (Re-)registers with user-server. This might be necessary if the userserver crashed/restarted");
}
protected override void ShutdownSpecific()
public override void ShutdownSpecific()
{
msgsvc.deregisterWithUserServer();
}

View File

@ -393,7 +393,7 @@ namespace OpenSim.Grid.UserServer
}
protected override void ShutdownSpecific()
public override void ShutdownSpecific()
{
m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation;
}

View File

@ -41,7 +41,7 @@ using OpenSim.Framework.Statistics;
using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.Scenes;
using OpenSim.Region.Environment.Modules.Avatar.Inventory.Archiver;
using Timer=System.Timers.Timer;
using Timer = System.Timers.Timer;
namespace OpenSim
{
@ -63,7 +63,8 @@ namespace OpenSim
/// </summary>
private static List<ConsolePluginCommand> m_PluginCommandInfos = new List<ConsolePluginCommand>();
public OpenSim(IConfigSource configSource) : base(configSource)
public OpenSim(IConfigSource configSource)
: base(configSource)
{
}
@ -98,7 +99,7 @@ namespace OpenSim
base.StartupSpecific();
//Run Startup Commands
if (String.IsNullOrEmpty( m_startupCommandsFile ))
if (String.IsNullOrEmpty(m_startupCommandsFile))
{
m_log.Info("[STARTUP]: No startup command script specified. Moving on...");
}
@ -121,7 +122,7 @@ namespace OpenSim
RegisterCmd("kickuser", KickUserCommand, "kickuser [first] [last] - attempts to log off a user from any region we are serving");
// For now, start at the 'root' level by default
ChangeSelectedRegion(new string[] {"root"});
ChangeSelectedRegion(new string[] { "root" });
}
private void RunAutoTimerScript(object sender, EventArgs e)
@ -138,7 +139,7 @@ namespace OpenSim
{
for (int i = 0; i < cmdparams.Length; i++)
{
m_log.Info("[EchoTest]: <arg" + i + ">"+cmdparams[i]+"</arg" + i + ">");
m_log.Info("[EchoTest]: <arg" + i + ">" + cmdparams[i] + "</arg" + i + ">");
}
}
@ -216,7 +217,7 @@ namespace OpenSim
public override void RunCmd(string command, string[] cmdparams)
{
base.RunCmd(command, cmdparams);
RunPluginCommands(command , cmdparams);
RunPluginCommands(command, cmdparams);
switch (command)
{
@ -373,9 +374,9 @@ namespace OpenSim
}
else
{
// IConfig c = DefaultConfig().Configs[cmdparams[1]];
// if (c == null)
// c = DefaultConfig().AddConfig(cmdparams[1]);
// IConfig c = DefaultConfig().Configs[cmdparams[1]];
// if (c == null)
// c = DefaultConfig().AddConfig(cmdparams[1]);
IConfig c;
IConfigSource source = new IniConfigSource();
c = source.AddConfig(cmdparams[1]);
@ -728,9 +729,49 @@ namespace OpenSim
scene.RegionInfo.RegionLocY + " , Region Port: " + scene.RegionInfo.InternalEndPoint.Port.ToString());
});
break;
case "queues":
Notice(GetQueuesReport());
break;
}
}
private string GetQueuesReport()
{
string report = String.Empty;
m_sceneManager.ForEachScene(delegate(Scene scene)
{
scene.ForEachClient(delegate(IClientAPI client)
{
if (client is IStatsCollector)
{
report = report + client.FirstName +
" " + client.LastName + "\n";
IStatsCollector stats =
(IStatsCollector)client;
report = report + string.Format("{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7}\n",
"Send",
"In",
"Out",
"Resend",
"Land",
"Wind",
"Cloud",
"Task",
"Texture",
"Asset");
report = report + stats.Report() +
"\n\n";
}
});
});
return report;
}
/// <summary>
/// Create a new user
/// </summary>
@ -747,19 +788,19 @@ namespace OpenSim
firstName = MainConsole.Instance.CmdPrompt("First name", "Default");
else firstName = cmdparams[1];
if ( cmdparams.Length < 3 )
if (cmdparams.Length < 3)
lastName = MainConsole.Instance.CmdPrompt("Last name", "User");
else lastName = cmdparams[2];
if ( cmdparams.Length < 4 )
if (cmdparams.Length < 4)
password = MainConsole.Instance.PasswdPrompt("Password");
else password = cmdparams[3];
if ( cmdparams.Length < 5 )
if (cmdparams.Length < 5)
regX = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region X", regX.ToString()));
else regX = Convert.ToUInt32(cmdparams[4]);
if ( cmdparams.Length < 6 )
if (cmdparams.Length < 6)
regY = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region Y", regY.ToString()));
else regY = Convert.ToUInt32(cmdparams[5]);
@ -787,11 +828,11 @@ namespace OpenSim
firstName = MainConsole.Instance.CmdPrompt("First name");
else firstName = cmdparams[2];
if ( cmdparams.Length < 4 )
if (cmdparams.Length < 4)
lastName = MainConsole.Instance.CmdPrompt("Last name");
else lastName = cmdparams[3];
if ( cmdparams.Length < 5 )
if (cmdparams.Length < 5)
newPassword = MainConsole.Instance.PasswdPrompt("New password");
else newPassword = cmdparams[4];
@ -828,14 +869,14 @@ namespace OpenSim
}
if (cmdparams.Length > 2)
{
loadOffset.X = (float) Convert.ToDecimal(cmdparams[2]);
loadOffset.X = (float)Convert.ToDecimal(cmdparams[2]);
if (cmdparams.Length > 3)
{
loadOffset.Y = (float) Convert.ToDecimal(cmdparams[3]);
loadOffset.Y = (float)Convert.ToDecimal(cmdparams[3]);
}
if (cmdparams.Length > 4)
{
loadOffset.Z = (float) Convert.ToDecimal(cmdparams[4]);
loadOffset.Z = (float)Convert.ToDecimal(cmdparams[4]);
}
m_console.Error("loadOffsets <X,Y,Z> = <" + loadOffset.X + "," + loadOffset.Y + "," +
loadOffset.Z + ">");
@ -947,7 +988,7 @@ namespace OpenSim
string savePath = (cmdparams.Length > 3 ? cmdparams[3] : DEFAULT_INV_BACKUP_FILENAME);
new InventoryArchiveWriteRequest(
m_sceneManager.CurrentOrFirstScene,m_commsManager).execute(
m_sceneManager.CurrentOrFirstScene, m_commsManager).execute(
firstName, lastName, invPath, savePath);
}
@ -971,7 +1012,7 @@ namespace OpenSim
{
ConsolePluginCommand bestMatch = null;
int bestLength = 0;
String cmdWithParams = cmd + " " + String.Join(" ",withParams);
String cmdWithParams = cmd + " " + String.Join(" ", withParams);
foreach (ConsolePluginCommand cmdinfo in m_PluginCommandInfos)
{
int matchLen = cmdinfo.matchLength(cmdWithParams);
@ -982,7 +1023,7 @@ namespace OpenSim
}
}
if (bestMatch == null) return false;
bestMatch.Run(cmd,withParams);//.Substring(bestLength));
bestMatch.Run(cmd, withParams);//.Substring(bestLength));
return true;
}

View File

@ -542,7 +542,7 @@ namespace OpenSim
/// <summary>
/// Performs any last-minute sanity checking and shuts down the region server
/// </summary>
protected override void ShutdownSpecific()
public override void ShutdownSpecific()
{
if (proxyUrl.Length > 0)
{

View File

@ -51,7 +51,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// Handles new client connections
/// Constructor takes a single Packet and authenticates everything
/// </summary>
public class LLClientView : IClientAPI
public class LLClientView : IClientAPI, IStatsCollector
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@ -116,7 +116,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
protected UUID m_activeGroupID = UUID.Zero;
protected string m_activeGroupName = String.Empty;
protected ulong m_activeGroupPowers;
protected Dictionary<UUID,ulong> m_groupPowers = new Dictionary<UUID, ulong>();
protected Dictionary<UUID, ulong> m_groupPowers = new Dictionary<UUID, ulong>();
/* Instantiated Designated Event Delegates */
//- used so we don't create new objects for each incoming packet and then toss it out later */
@ -2224,9 +2224,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
awb.ItemID = wearables[i].ItemID;
aw.WearableData[i] = awb;
// m_log.DebugFormat(
// "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}",
// awb.ItemID, awb.AssetID, i, Name);
// m_log.DebugFormat(
// "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}",
// awb.ItemID, awb.AssetID, i, Name);
}
OutPacket(aw, ThrottleOutPacketType.Task);
@ -2732,7 +2732,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public void SendBannedUserList(UUID invoice, EstateBan[] bl, uint estateID)
{
List<UUID>BannedUsers = new List<UUID>();
List<UUID> BannedUsers = new List<UUID>();
for (int i = 0; i < bl.Length; i++)
{
@ -3475,7 +3475,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public bool HandleGenericMessage(IClientAPI sender, Packet pack)
{
GenericMessagePacket gmpack = (GenericMessagePacket) pack;
GenericMessagePacket gmpack = (GenericMessagePacket)pack;
handlerGenericMessage = OnGenericMessage;
List<string> msg = new List<string>();
@ -3888,7 +3888,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public virtual void InPacket(object NewPack)
{
// Cast NewPack to Packet.
m_PacketHandler.InPacket((Packet) NewPack);
m_PacketHandler.InPacket((Packet)NewPack);
}
@ -3981,7 +3981,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// Main packet processing conditional
switch (Pack.Type)
{
#region Scene/Avatar
#region Scene/Avatar
case PacketType.GenericMessage:
GenericMessagePacket gmpack = (GenericMessagePacket)Pack;
@ -4143,7 +4143,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
break;
case PacketType.DeRezObject:
DeRezObjectPacket DeRezPacket = (DeRezObjectPacket) Pack;
DeRezObjectPacket DeRezPacket = (DeRezObjectPacket)Pack;
handlerDeRezObject = OnDeRezObject;
if (handlerDeRezObject != null)
{
@ -4494,9 +4494,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
#endregion
#endregion
#region Objects/m_sceneObjects
#region Objects/m_sceneObjects
case PacketType.ObjectLink:
ObjectLinkPacket link = (ObjectLinkPacket)Pack;
@ -4950,9 +4950,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
#endregion
#endregion
#region Inventory/Asset/Other related packets
#region Inventory/Asset/Other related packets
case PacketType.RequestImage:
RequestImagePacket imageRequest = (RequestImagePacket)Pack;
@ -5009,7 +5009,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (ti.OwnerID != AgentId)
break;
if ((ti.CurrentPermissions & ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer))
if ((ti.CurrentPermissions & ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer))
break;
if (ti.AssetID != requestID)
@ -5565,7 +5565,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
#endregion
#endregion
case PacketType.UUIDNameRequest:
UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack;
@ -5579,7 +5579,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
#region Parcel related packets
#region Parcel related packets
case PacketType.RegionHandleRequest:
RegionHandleRequestPacket rhrPack = (RegionHandleRequestPacket)Pack;
@ -5774,9 +5774,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
#endregion
#endregion
#region Estate Packets
#region Estate Packets
case PacketType.EstateOwnerMessage:
EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack;
@ -5802,21 +5802,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
// case "texturebase":
// if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
// {
// foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
// {
// string s = Utils.BytesToString(block.Parameter);
// string[] splitField = s.Split(' ');
// if (splitField.Length == 2)
// {
// UUID tempUUID = new UUID(splitField[1]);
// OnSetEstateTerrainBaseTexture(this, Convert.ToInt16(splitField[0]), tempUUID);
// }
// }
// }
// break;
// case "texturebase":
// if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
// {
// foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
// {
// string s = Utils.BytesToString(block.Parameter);
// string[] splitField = s.Split(' ');
// if (splitField.Length == 2)
// {
// UUID tempUUID = new UUID(splitField[1]);
// OnSetEstateTerrainBaseTexture(this, Convert.ToInt16(splitField[0]), tempUUID);
// }
// }
// }
// break;
case "texturedetail":
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
{
@ -6066,9 +6066,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
#endregion
#endregion
#region GodPackets
#region GodPackets
case PacketType.RequestGodlikePowers:
RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack;
@ -6114,9 +6114,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
//OutPacket(kupack, ThrottleOutPacketType.Task);
break;
#endregion
#endregion
#region Economy/Transaction Packets
#region Economy/Transaction Packets
case PacketType.MoneyBalanceRequest:
MoneyBalanceRequestPacket moneybalancerequestpacket = (MoneyBalanceRequestPacket)Pack;
@ -6187,9 +6187,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
#endregion
#endregion
#region Script Packets
#region Script Packets
case PacketType.GetScriptRunning:
GetScriptRunningPacket scriptRunning = (GetScriptRunningPacket)Pack;
@ -6218,9 +6218,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
#endregion
#endregion
#region Gesture Managment
#region Gesture Managment
case PacketType.ActivateGestures:
ActivateGesturesPacket activateGesturePacket = (ActivateGesturesPacket)Pack;
@ -6258,10 +6258,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
#endregion
#endregion
#region unimplemented handlers
#region unimplemented handlers
case PacketType.StartPingCheck:
// Send the client the ping response back
@ -6279,10 +6279,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
//m_log.Warn("[CLIENT]: unhandled ViewerStats packet");
break;
//case PacketType.GenericMessage:
// TODO: handle this packet
//m_log.Warn("[CLIENT]: unhandled GenericMessage packet");
//break;
//case PacketType.GenericMessage:
// TODO: handle this packet
//m_log.Warn("[CLIENT]: unhandled GenericMessage packet");
//break;
case PacketType.MapItemRequest:
// TODO: handle this packet
MapItemRequestPacket mirpk = (MapItemRequestPacket)Pack;
@ -6290,8 +6290,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handlerMapItemRequest = OnMapItemRequest;
if (handlerMapItemRequest != null)
{
handlerMapItemRequest(this,mirpk.AgentData.Flags, mirpk.AgentData.EstateID,
mirpk.AgentData.Godlike,mirpk.RequestData.ItemType,
handlerMapItemRequest(this, mirpk.AgentData.Flags, mirpk.AgentData.EstateID,
mirpk.AgentData.Godlike, mirpk.RequestData.ItemType,
mirpk.RequestData.RegionHandle);
}
@ -6894,7 +6894,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_log.Warn("[CLIENT]: unhandled packet " + Pack);
break;
#endregion
#endregion
}
PacketPool.Instance.ReturnPacket(Pack);
@ -7209,7 +7209,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
ParcelMediaCommandMessagePacket commandMessagePacket = new ParcelMediaCommandMessagePacket();
commandMessagePacket.CommandBlock.Flags = flags;
commandMessagePacket.CommandBlock.Command =(uint) command;
commandMessagePacket.CommandBlock.Command = (uint)command;
commandMessagePacket.CommandBlock.Time = time;
OutPacket(commandMessagePacket, ThrottleOutPacketType.Unknown);
@ -7238,7 +7238,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#region Camera
public void SendSetFollowCamProperties (UUID objectID, SortedDictionary<int, float> parameters)
public void SendSetFollowCamProperties(UUID objectID, SortedDictionary<int, float> parameters)
{
SetFollowCamPropertiesPacket packet = (SetFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.SetFollowCamProperties);
packet.ObjectData.ObjectID = objectID;
@ -7256,7 +7256,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(packet, ThrottleOutPacketType.Task);
}
public void SendClearFollowCamProperties (UUID objectID)
public void SendClearFollowCamProperties(UUID objectID)
{
ClearFollowCamPropertiesPacket packet = (ClearFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ClearFollowCamProperties);
packet.ObjectData.ObjectID = objectID;
@ -7265,7 +7265,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#endregion
public void SendRegionHandle(UUID regionID, ulong handle) {
public void SendRegionHandle(UUID regionID, ulong handle)
{
RegionIDAndHandleReplyPacket reply = (RegionIDAndHandleReplyPacket)PacketPool.Instance.GetPacket(PacketType.RegionIDAndHandleReply);
reply.ReplyBlock.RegionID = regionID;
reply.ReplyBlock.RegionHandle = handle;
@ -7321,14 +7322,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
switch (option)
{
case "ReliableIsImportant":
bool val;
case "ReliableIsImportant":
bool val;
if (bool.TryParse(value, out val))
m_PacketHandler.ReliableIsImportant = val;
break;
default:
break;
if (bool.TryParse(value, out val))
m_PacketHandler.ReliableIsImportant = val;
break;
default:
break;
}
}
@ -7586,7 +7587,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
mirplk.AgentData.AgentID = AgentId;
mirplk.RequestData.ItemType = mapitemtype;
mirplk.Data = new MapItemReplyPacket.DataBlock[replies.Length];
for (int i = 0; i < replies.Length; i++ )
for (int i = 0; i < replies.Length; i++)
{
MapItemReplyPacket.DataBlock mrdata = new MapItemReplyPacket.DataBlock();
mrdata.X = replies[i].x;
@ -7676,5 +7677,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
KillPacket kp = new KillPacket();
OutPacket(kp, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority);
}
public string Report()
{
LLPacketHandler handler = (LLPacketHandler)m_PacketHandler;
return handler.PacketQueue.GetStats();
}
}
}

View File

@ -576,7 +576,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// See IPullStatsProvider
public string GetStats()
{
return string.Format("{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7}",
return string.Format("{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7}",
SendQueue.Count(),
IncomingPacketQueue.Count,
OutgoingPacketQueue.Count,

View File

@ -1547,7 +1547,16 @@ namespace OpenSim.Region.Communications.OGS1
IPAddress ia;
IPAddress.TryParse(address, out ia);
IPEndPoint m_EndPoint = new IPEndPoint(ia, (int)port);
IPEndPoint m_EndPoint;
try
{
m_EndPoint = new IPEndPoint(ia, (int)port);
}
catch (Exception)
{
m_log.Debug("[OGS1 GRID SERVICES]: Invalid remoting address: " + address);
return false;
}
AsyncCallback callback = delegate(IAsyncResult iar)
{

View File

@ -105,7 +105,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.AvatarFactory
public bool IsSharedModule
{
get { return true; }
get { return false; }
}
public void NewClient(IClientAPI client)

View File

@ -64,6 +64,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
// Bypasses the permissions engine
private bool m_bypassPermissions = false;
private bool m_bypassPermissionsValue = true;
private bool m_propagatePermissions = false;
private bool m_debugPermissions = false;
private bool m_allowGridGods = false;
private bool m_RegionOwnerIsGod = false;
@ -144,6 +145,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
m_allowGridGods = myConfig.GetBoolean("allow_grid_gods", false);
m_bypassPermissions = !myConfig.GetBoolean("serverside_object_permissions", true);
m_propagatePermissions = myConfig.GetBoolean("propagate_permissions", true);
m_RegionOwnerIsGod = myConfig.GetBoolean("region_owner_is_god", true);
m_ParcelOwnerIsGod = myConfig.GetBoolean("parcel_owner_is_god", true);
@ -276,7 +278,10 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
public bool PropagatePermissions()
{
return false;
if (m_bypassPermissions)
return false;
return m_propagatePermissions;
}
public bool BypassPermissions()
@ -586,6 +591,17 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
//They can't even edit the object
return false;
}
SceneObjectPart part = scene.GetSceneObjectPart(objectID);
if (part == null)
return false;
if ((part.OwnerMask & PERM_COPY) == 0)
return false;
if ((part.ParentGroup.GetEffectivePermissions() & PERM_COPY) == 0)
return false;
//If they can rez, they can duplicate
return CanRezObject(objectCount, owner, objectPosition, scene);
}
@ -983,7 +999,18 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
if ((task.RootPart.EveryoneMask & PERM_COPY) != 0)
permission = true;
if ((task.GetEffectivePermissions() & PERM_COPY) == 0)
permission = false;
}
else
{
SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID];
if ((task.GetEffectivePermissions() & PERM_COPY) == 0)
permission = false;
}
return permission;
}

View File

@ -88,23 +88,23 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
FileStream s = file.Open(FileMode.Open, FileAccess.Read);
BinaryReader bs = new BinaryReader(s);
int currFileYOffset = 0;
int currFileYOffset = fileHeight - 1;
// if our region isn't on the first Y section of the areas to be landscaped, then
// advance to our section of the file
while (currFileYOffset < offsetY)
while (currFileYOffset > offsetY)
{
// read a whole strip of regions
int heightsToRead = sectionHeight * (fileWidth * sectionWidth);
bs.ReadBytes(heightsToRead * 13); // because there are 13 fun channels
currFileYOffset++;
currFileYOffset--;
}
// got to the Y start offset within the file of our region
// so read the file bits associated with our region
int y;
// for each Y within our Y offset
for (y = 0; y < sectionHeight; y++)
for (y = sectionHeight - 1; y >= 0; y--)
{
int currFileXOffset = 0;
@ -155,7 +155,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
int x;
for (x = 0; x < retval.Width; x++)
{
retval[x, y] = bs.ReadByte() * (bs.ReadByte() / 128.0);
retval[x, (retval.Height - 1) - y] = bs.ReadByte() * (bs.ReadByte() / 128.0);
bs.ReadBytes(11); // Advance the stream to next bytes.
}
}
@ -183,7 +183,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
{
for (int x = 0; x < map.Width; x++)
{
double t = map[x, y];
double t = map[x, (map.Height - 1) - y];
int index = 0;
// The lookup table is pre-sorted, so we either find an exact match or

View File

@ -752,6 +752,47 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
CheckForTerrainUpdates();
}
private void InterfaceFlipTerrain(Object[] args)
{
String direction = (String)args[0];
if( direction.ToLower().StartsWith("y"))
{
for (int x = 0; x < Constants.RegionSize; x++)
{
for (int y = 0; y < Constants.RegionSize / 2; y++)
{
double height = m_channel[x, y];
double flippedHeight = m_channel[x, (int)Constants.RegionSize - 1 - y];
m_channel[x, y] = flippedHeight;
m_channel[x, (int)Constants.RegionSize - 1 - y] = height;
}
}
}
else if (direction.ToLower().StartsWith("x"))
{
for (int y = 0; y < Constants.RegionSize; y++)
{
for (int x = 0; x < Constants.RegionSize / 2; x++)
{
double height = m_channel[x, y];
double flippedHeight = m_channel[(int)Constants.RegionSize - 1 - x, y];
m_channel[x, y] = flippedHeight;
m_channel[(int)Constants.RegionSize - 1 - x, y] = height;
}
}
}
else
{
m_log.Error("Unrecognised direction - need x or y");
}
CheckForTerrainUpdates();
}
private void InterfaceElevateTerrain(Object[] args)
{
int x, y;
@ -910,6 +951,10 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
Command revertRegionCommand =
new Command("revert", CommandIntentions.COMMAND_HAZARDOUS, InterfaceRevertTerrain, "Loads the revert map terrain into the regions heightmap.");
Command flipCommand =
new Command("flip", CommandIntentions.COMMAND_HAZARDOUS, InterfaceFlipTerrain, "Flips the current terrain about the X or Y axis");
flipCommand.AddArgument("direction", "[x|y] the direction to flip the terrain in", "String");
// Debug
Command showDebugStatsCommand =
new Command("stats", CommandIntentions.COMMAND_STATISTICAL, InterfaceShowDebugStats,
@ -937,6 +982,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
m_commander.RegisterCommand("newbrushes", experimentalBrushesCommand);
m_commander.RegisterCommand("stats", showDebugStatsCommand);
m_commander.RegisterCommand("effect", pluginRunCommand);
m_commander.RegisterCommand("flip", flipCommand);
// Add this to our scene so scripts can call these functions
m_scene.RegisterModuleCommander("Terrain", m_commander);

View File

@ -163,6 +163,8 @@ namespace OpenSim.Region.Environment.Scenes
private Thread HeartbeatThread;
private volatile bool shuttingdown = false;
private object m_deleting_scene_object = new object();
#endregion
#region Properties
@ -639,6 +641,17 @@ namespace OpenSim.Region.Environment.Scenes
// Stop updating the scene objects and agents.
//m_heartbeatTimer.Close();
shuttingdown = true;
m_log.Debug("[SCENE]: Persisting changed objects");
List<EntityBase> entities = GetEntities();
foreach (EntityBase entity in entities)
{
if (!entity.IsDeleted && entity is SceneObjectGroup && ((SceneObjectGroup)entity).HasGroupChanged)
{
((SceneObjectGroup)entity).ProcessBackup(m_storageManager.DataStore);
}
}
// close the inner scene
m_innerScene.Close();
// De-register with region communications (events cleanup)
@ -1823,7 +1836,11 @@ namespace OpenSim.Region.Environment.Scenes
{
//SceneObjectPart rootPart = group.GetChildPart(group.UUID);
group.RemoveScriptInstances();
// Serialise calls to RemoveScriptInstances to avoid
// deadlocking on m_parts inside SceneObjectGroup
lock (m_deleting_scene_object) {
group.RemoveScriptInstances();
}
foreach (SceneObjectPart part in group.Children.Values)
{
@ -4030,7 +4047,7 @@ namespace OpenSim.Region.Environment.Scenes
return m_innerScene.TryGetAvatarByName(avatarName, out avatar);
}
internal void ForEachClient(Action<IClientAPI> action)
public void ForEachClient(Action<IClientAPI> action)
{
m_innerScene.ForEachClient(action);
}

View File

@ -80,6 +80,7 @@ namespace OpenSim.Region.Environment.Scenes
get { return m_eventManager; }
}
protected SceneExternalChecks m_externalChecks;
public SceneExternalChecks ExternalChecks
{
@ -88,6 +89,8 @@ namespace OpenSim.Region.Environment.Scenes
protected string m_datastore;
private uint m_nextAvatarLocalId = 8880000;
private AssetCache m_assetCache;
public AssetCache AssetCache
@ -161,6 +164,11 @@ namespace OpenSim.Region.Environment.Scenes
get { return m_regInfo; }
}
public uint NextAvatarLocalId
{
get { return m_nextAvatarLocalId++; }
}
#region admin stuff
/// <summary>

View File

@ -1192,6 +1192,9 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="datastore"></param>
public void ProcessBackup(IRegionDataStore datastore)
{
if (!m_isBackedUp)
return;
// Since this is the top of the section of call stack for backing up a particular scene object, don't let
// any exception propogate upwards.

View File

@ -492,7 +492,7 @@ namespace OpenSim.Region.Environment.Scenes
m_scene = world;
m_uuid = client.AgentId;
m_regionInfo = reginfo;
m_localId = m_scene.AllocateLocalId();
m_localId = m_scene.NextAvatarLocalId;
IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>();
if (gm != null)
@ -758,7 +758,7 @@ namespace OpenSim.Region.Environment.Scenes
}
float posZLimit = (float)m_scene.GetLandHeight((int)pos.X, (int)pos.Y);
float newPosZ = posZLimit + localAVHeight;
float newPosZ = posZLimit + localAVHeight / 2;
if (posZLimit >= (pos.Z - (localAVHeight / 2)) && !(Single.IsInfinity(newPosZ) || Single.IsNaN(newPosZ)))
{
pos.Z = newPosZ;
@ -1751,6 +1751,7 @@ namespace OpenSim.Region.Environment.Scenes
Vector3 pos = m_pos;
Vector3 vel = Velocity;
Quaternion rot = m_bodyRot;
pos.Z -= m_appearance.HipOffset;
remoteClient.SendAvatarTerseUpdate(m_regionHandle, (ushort)(m_scene.TimeDilation * (float)ushort.MaxValue), LocalId, new Vector3(pos.X, pos.Y, pos.Z),
new Vector3(vel.X, vel.Y, vel.Z), rot);
@ -1834,6 +1835,9 @@ namespace OpenSim.Region.Environment.Scenes
// Note: because Quaternion is a struct, it can't be null
Quaternion rot = m_bodyRot;
Vector3 pos = m_pos;
pos.Z -= m_appearance.HipOffset;
remoteAvatar.m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid,
LocalId, m_pos, m_appearance.Texture.ToBytes(),
m_parentID, rot);
@ -1899,6 +1903,9 @@ namespace OpenSim.Region.Environment.Scenes
// Note: because Quaternion is a struct, it can't be null
Quaternion rot = m_bodyRot;
Vector3 pos = m_pos;
pos.Z -= m_appearance.HipOffset;
m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, LocalId,
m_pos, m_appearance.Texture.ToBytes(), m_parentID, rot);
@ -2214,6 +2221,8 @@ namespace OpenSim.Region.Environment.Scenes
CrossAttachmentsIntoNewRegion(neighbourHandle, true);
// m_scene.SendKillObject(m_localId);
m_scene.NotifyMyCoarseLocationChange();
// the user may change their profile information in other region,
// so the userinfo in UserProfileCache is not reliable any more, delete it
@ -2263,6 +2272,7 @@ namespace OpenSim.Region.Environment.Scenes
/// </summary>
public void ChildAgentDataUpdate(ChildAgentDataUpdate cAgentData, uint tRegionX, uint tRegionY, uint rRegionX, uint rRegionY)
{
//
if (!IsChildAgent)
return;

View File

@ -55,7 +55,7 @@ namespace OpenSim.Region.Physics.OdePlugin
}
public class OdeCharacter : PhysicsActor
{
//private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
private PhysicsVector _position;
private d.Vector3 _zeroPosition;
@ -145,7 +145,8 @@ namespace OpenSim.Region.Physics.OdePlugin
{
m_colliderarr[i] = false;
}
CAPSULE_LENGTH = (size.Z - ((size.Z * height_fudge_factor)));
CAPSULE_LENGTH = (size.Z * 1.15f) - CAPSULE_RADIUS * 2.0f;
//m_log.Info("[SIZE]: " + CAPSULE_LENGTH.ToString());
lock (_parent_scene.OdeLock)
{
@ -395,7 +396,7 @@ namespace OpenSim.Region.Physics.OdePlugin
// float capsuleradius = CAPSULE_RADIUS;
//capsuleradius = 0.2f;
CAPSULE_LENGTH = (SetSize.Z - ((SetSize.Z * heightFudgeFactor))); // subtract 43% of the size
CAPSULE_LENGTH = (SetSize.Z * 1.15f) - CAPSULE_RADIUS * 2.0f;
//m_log.Info("[SIZE]: " + CAPSULE_LENGTH.ToString());
d.BodyDestroy(Body);

View File

@ -2589,6 +2589,7 @@
<Reference name="OpenSim.Framework"/>
<Reference name="OpenSim.Data"/>
<Reference name="OpenSim.Framework.Servers"/>
<Reference name="OpenSim.Framework.Statistics"/>
<Reference name="OpenSim.Framework.Console"/>
<Reference name="OpenSim.Region.Environment"/>
<Reference name="OpenSim.Region.ClientStack"/>