Merge branch 'master' into bulletsim
commit
4cbc912375
|
@ -196,6 +196,9 @@ namespace OpenSim.Framework
|
||||||
if (appearance.VisualParams != null)
|
if (appearance.VisualParams != null)
|
||||||
m_visualparams = (byte[])appearance.VisualParams.Clone();
|
m_visualparams = (byte[])appearance.VisualParams.Clone();
|
||||||
|
|
||||||
|
m_avatarHeight = appearance.m_avatarHeight;
|
||||||
|
m_hipOffset = appearance.m_hipOffset;
|
||||||
|
|
||||||
// Copy the attachment, force append mode since that ensures consistency
|
// Copy the attachment, force append mode since that ensures consistency
|
||||||
m_attachments = new Dictionary<int, List<AvatarAttachment>>();
|
m_attachments = new Dictionary<int, List<AvatarAttachment>>();
|
||||||
foreach (AvatarAttachment attachment in appearance.GetAttachments())
|
foreach (AvatarAttachment attachment in appearance.GetAttachments())
|
||||||
|
@ -237,7 +240,6 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
m_serial = 0;
|
m_serial = 0;
|
||||||
|
|
||||||
SetDefaultParams();
|
|
||||||
SetDefaultTexture();
|
SetDefaultTexture();
|
||||||
|
|
||||||
//for (int i = 0; i < BAKE_INDICES.Length; i++)
|
//for (int i = 0; i < BAKE_INDICES.Length; i++)
|
||||||
|
|
|
@ -760,7 +760,10 @@ namespace OpenSim.Framework
|
||||||
"Clamp prims to max size", "false", true);
|
"Clamp prims to max size", "false", true);
|
||||||
|
|
||||||
configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
|
configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
|
||||||
"Max objects this sim will hold", "0", true);
|
"Max objects this sim will hold", "15000", true);
|
||||||
|
|
||||||
|
configMember.addConfigurationOption("agent_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
|
||||||
|
"Max avatars this sim will hold", "100", true);
|
||||||
|
|
||||||
configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
|
configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
|
||||||
"Scope ID for this region", UUID.Zero.ToString(), true);
|
"Scope ID for this region", UUID.Zero.ToString(), true);
|
||||||
|
|
|
@ -210,7 +210,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
changed = sp.Appearance.SetVisualParams(visualParams);
|
changed = sp.Appearance.SetVisualParams(visualParams);
|
||||||
if (sp.Appearance.AvatarHeight > 0)
|
if (sp.Appearance.AvatarHeight > 0)
|
||||||
sp.SetHeight(sp.Appearance.AvatarHeight);
|
sp.SetHeight(sp.Appearance.AvatarHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process the baked texture array
|
// Process the baked texture array
|
||||||
if (textureEntry != null)
|
if (textureEntry != null)
|
||||||
|
@ -224,12 +224,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
// update transaction. In theory, we should be able to do an immediate
|
// update transaction. In theory, we should be able to do an immediate
|
||||||
// appearance send and save here.
|
// appearance send and save here.
|
||||||
|
|
||||||
// save only if there were changes, send no matter what (doesn't hurt to send twice)
|
|
||||||
if (changed)
|
|
||||||
QueueAppearanceSave(client.AgentId);
|
|
||||||
|
|
||||||
QueueAppearanceSend(client.AgentId);
|
|
||||||
}
|
}
|
||||||
|
// save only if there were changes, send no matter what (doesn't hurt to send twice)
|
||||||
|
if (changed)
|
||||||
|
QueueAppearanceSave(client.AgentId);
|
||||||
|
|
||||||
|
QueueAppearanceSend(client.AgentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// m_log.WarnFormat("[AVFACTORY]: complete SetAppearance for {0}:\n{1}",client.AgentId,sp.Appearance.ToString());
|
// m_log.WarnFormat("[AVFACTORY]: complete SetAppearance for {0}:\n{1}",client.AgentId,sp.Appearance.ToString());
|
||||||
|
@ -387,11 +387,11 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
// m_log.WarnFormat("[AVFACTORY]: AvatarIsWearing called for {0}", client.AgentId);
|
// m_log.WarnFormat("[AVFACTORY]: AvatarIsWearing called for {0}", client.AgentId);
|
||||||
|
|
||||||
// we need to clean out the existing textures
|
// we need to clean out the existing textures
|
||||||
sp.Appearance.ResetAppearance();
|
sp.Appearance.ResetAppearance();
|
||||||
|
|
||||||
// operate on a copy of the appearance so we don't have to lock anything
|
// operate on a copy of the appearance so we don't have to lock anything yet
|
||||||
AvatarAppearance avatAppearance = new AvatarAppearance(sp.Appearance, false);
|
AvatarAppearance avatAppearance = new AvatarAppearance(sp.Appearance, false);
|
||||||
|
|
||||||
foreach (AvatarWearingArgs.Wearable wear in e.NowWearing)
|
foreach (AvatarWearingArgs.Wearable wear in e.NowWearing)
|
||||||
{
|
{
|
||||||
if (wear.Type < AvatarWearable.MAX_WEARABLES)
|
if (wear.Type < AvatarWearable.MAX_WEARABLES)
|
||||||
|
@ -403,12 +403,19 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
// This could take awhile since it needs to pull inventory
|
// This could take awhile since it needs to pull inventory
|
||||||
SetAppearanceAssets(sp.UUID, ref avatAppearance);
|
SetAppearanceAssets(sp.UUID, ref avatAppearance);
|
||||||
|
|
||||||
// could get fancier with the locks here, but in the spirit of "last write wins"
|
lock (m_setAppearanceLock)
|
||||||
// this should work correctly, also, we don't need to send the appearance here
|
{
|
||||||
// since the "iswearing" will trigger a new set of visual param and baked texture changes
|
// Update only those fields that we have changed. This is important because the viewer
|
||||||
// when those complete, the new appearance will be sent
|
// often sends AvatarIsWearing and SetAppearance packets at once, and AvatarIsWearing
|
||||||
sp.Appearance = avatAppearance;
|
// shouldn't overwrite the changes made in SetAppearance.
|
||||||
QueueAppearanceSave(client.AgentId);
|
sp.Appearance.Wearables = avatAppearance.Wearables;
|
||||||
|
sp.Appearance.Texture = avatAppearance.Texture;
|
||||||
|
|
||||||
|
// We don't need to send the appearance here since the "iswearing" will trigger a new set
|
||||||
|
// of visual param and baked texture changes. When those complete, the new appearance will be sent
|
||||||
|
|
||||||
|
QueueAppearanceSave(client.AgentId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetAppearanceAssets(UUID userID, ref AvatarAppearance appearance)
|
private void SetAppearanceAssets(UUID userID, ref AvatarAppearance appearance)
|
||||||
|
|
|
@ -1110,14 +1110,12 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
if (data == null)
|
if (data == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
UUID lastMapRegionUUID = m_scene.RegionInfo.RegionSettings.TerrainImageID;
|
|
||||||
|
|
||||||
m_log.Debug("[WORLDMAP]: STORING MAPTILE IMAGE");
|
m_log.Debug("[WORLDMAP]: STORING MAPTILE IMAGE");
|
||||||
|
|
||||||
m_scene.RegionInfo.RegionSettings.TerrainImageID = UUID.Random();
|
UUID terrainImageID = UUID.Random();
|
||||||
|
|
||||||
AssetBase asset = new AssetBase(
|
AssetBase asset = new AssetBase(
|
||||||
m_scene.RegionInfo.RegionSettings.TerrainImageID,
|
terrainImageID,
|
||||||
"terrainImage_" + m_scene.RegionInfo.RegionID.ToString(),
|
"terrainImage_" + m_scene.RegionInfo.RegionID.ToString(),
|
||||||
(sbyte)AssetType.Texture,
|
(sbyte)AssetType.Texture,
|
||||||
m_scene.RegionInfo.RegionID.ToString());
|
m_scene.RegionInfo.RegionID.ToString());
|
||||||
|
@ -1129,6 +1127,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
// Store the new one
|
// Store the new one
|
||||||
m_log.DebugFormat("[WORLDMAP]: Storing map tile {0}", asset.ID);
|
m_log.DebugFormat("[WORLDMAP]: Storing map tile {0}", asset.ID);
|
||||||
m_scene.AssetService.Store(asset);
|
m_scene.AssetService.Store(asset);
|
||||||
|
|
||||||
|
// Switch to the new one
|
||||||
|
UUID lastMapRegionUUID = m_scene.RegionInfo.RegionSettings.TerrainImageID;
|
||||||
|
m_scene.RegionInfo.RegionSettings.TerrainImageID = terrainImageID;
|
||||||
m_scene.RegionInfo.RegionSettings.Save();
|
m_scene.RegionInfo.RegionSettings.Save();
|
||||||
|
|
||||||
// Delete the old one
|
// Delete the old one
|
||||||
|
|
|
@ -1672,20 +1672,20 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
m_sceneGridService.SetScene(this);
|
m_sceneGridService.SetScene(this);
|
||||||
|
|
||||||
// If we generate maptiles internally at all, the maptile generator
|
GridRegion region = new GridRegion(RegionInfo);
|
||||||
// will register the region. If not, do it here
|
string error = GridService.RegisterRegion(RegionInfo.ScopeID, region);
|
||||||
|
if (error != String.Empty)
|
||||||
|
{
|
||||||
|
throw new Exception(error);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Generate the maptile asynchronously, because sometimes it can be very slow and we
|
||||||
|
// don't want this to delay starting the region.
|
||||||
if (m_generateMaptiles)
|
if (m_generateMaptiles)
|
||||||
{
|
{
|
||||||
RegenerateMaptile(null, null);
|
Util.FireAndForget(delegate {
|
||||||
}
|
RegenerateMaptile(null, null);
|
||||||
else
|
});
|
||||||
{
|
|
||||||
GridRegion region = new GridRegion(RegionInfo);
|
|
||||||
string error = GridService.RegisterRegion(RegionInfo.ScopeID, region);
|
|
||||||
if (error != String.Empty)
|
|
||||||
{
|
|
||||||
throw new Exception(error);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,13 @@ namespace OpenSim.Services.Connectors
|
||||||
private string m_ServerURI = String.Empty;
|
private string m_ServerURI = String.Empty;
|
||||||
private IImprovedAssetCache m_Cache = null;
|
private IImprovedAssetCache m_Cache = null;
|
||||||
|
|
||||||
|
private delegate void AssetRetrievedEx(AssetBase asset);
|
||||||
|
|
||||||
|
// Keeps track of concurrent requests for the same asset, so that it's only loaded once.
|
||||||
|
// Maps: Asset ID -> Handlers which will be called when the asset has been loaded
|
||||||
|
private Dictionary<string, AssetRetrievedEx> m_AssetHandlers = new Dictionary<string, AssetRetrievedEx>();
|
||||||
|
|
||||||
|
|
||||||
public AssetServicesConnector()
|
public AssetServicesConnector()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -178,23 +185,56 @@ namespace OpenSim.Services.Connectors
|
||||||
|
|
||||||
if (asset == null)
|
if (asset == null)
|
||||||
{
|
{
|
||||||
bool result = false;
|
lock (m_AssetHandlers)
|
||||||
|
{
|
||||||
|
AssetRetrievedEx handlerEx = new AssetRetrievedEx(delegate(AssetBase _asset) { handler(id, sender, _asset); });
|
||||||
|
|
||||||
AsynchronousRestObjectRequester.
|
AssetRetrievedEx handlers;
|
||||||
MakeRequest<int, AssetBase>("GET", uri, 0,
|
if (m_AssetHandlers.TryGetValue(id, out handlers))
|
||||||
|
{
|
||||||
|
// Someone else is already loading this asset. It will notify our handler when done.
|
||||||
|
handlers += handlerEx;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Load the asset ourselves
|
||||||
|
handlers += handlerEx;
|
||||||
|
m_AssetHandlers.Add(id, handlers);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool success = false;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
AsynchronousRestObjectRequester.MakeRequest<int, AssetBase>("GET", uri, 0,
|
||||||
delegate(AssetBase a)
|
delegate(AssetBase a)
|
||||||
{
|
{
|
||||||
if (m_Cache != null)
|
if (m_Cache != null)
|
||||||
m_Cache.Cache(a);
|
m_Cache.Cache(a);
|
||||||
handler(id, sender, a);
|
|
||||||
result = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
return result;
|
AssetRetrievedEx handlers;
|
||||||
|
lock (m_AssetHandlers)
|
||||||
|
{
|
||||||
|
handlers = m_AssetHandlers[id];
|
||||||
|
m_AssetHandlers.Remove(id);
|
||||||
|
}
|
||||||
|
handlers.Invoke(a);
|
||||||
|
});
|
||||||
|
|
||||||
|
success = true;
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
if (!success)
|
||||||
|
{
|
||||||
|
lock (m_AssetHandlers)
|
||||||
|
{
|
||||||
|
m_AssetHandlers.Remove(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//Util.FireAndForget(delegate { handler(id, sender, asset); });
|
|
||||||
handler(id, sender, asset);
|
handler(id, sender, asset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
BIN
bin/MXP.pdb
BIN
bin/MXP.pdb
Binary file not shown.
|
@ -68,15 +68,6 @@
|
||||||
;; in a <Regions> tag.
|
;; in a <Regions> tag.
|
||||||
; regionload_webserver_url = "http://example.com/regions.xml";
|
; regionload_webserver_url = "http://example.com/regions.xml";
|
||||||
|
|
||||||
;# {TextureOnMapTile} {} {Use terrain textures for map tiles?} {true false} false
|
|
||||||
;; Use terrain texture for maptiles if true, use shaded green if false
|
|
||||||
; TextureOnMapTile = false
|
|
||||||
|
|
||||||
;# {DrawPrimOnMapTile} {} {Draw prim shapes on map tiles?} {true false} false
|
|
||||||
;; Draw objects on maptile. This step might take a long time if you've
|
|
||||||
;; got a large number of objects, so you can turn it off here if you'd like.
|
|
||||||
; DrawPrimOnMapTile = true
|
|
||||||
|
|
||||||
;# {NonPhysicalPrimMax} {} {Maximum size of nonphysical prims?} {} 256
|
;# {NonPhysicalPrimMax} {} {Maximum size of nonphysical prims?} {} 256
|
||||||
;; Maximum size for non-physical prims. Affects resizing of existing prims. This can be overriden in the region config file (as NonphysicalPrimMax!).
|
;; Maximum size for non-physical prims. Affects resizing of existing prims. This can be overriden in the region config file (as NonphysicalPrimMax!).
|
||||||
; NonPhysicalPrimMax = 256
|
; NonPhysicalPrimMax = 256
|
||||||
|
@ -190,7 +181,7 @@
|
||||||
;; Map tile options. You can choose to generate no map tiles at all,
|
;; Map tile options. You can choose to generate no map tiles at all,
|
||||||
;; generate normal maptiles, or nominate an uploaded texture to
|
;; generate normal maptiles, or nominate an uploaded texture to
|
||||||
;; be the map tile
|
;; be the map tile
|
||||||
; GenerateMaptiles = "true"
|
; GenerateMaptiles = true
|
||||||
|
|
||||||
;; If desired, a running region can update the map tiles periodically
|
;; If desired, a running region can update the map tiles periodically
|
||||||
;; to reflect building activity. This names no sense of you don't have
|
;; to reflect building activity. This names no sense of you don't have
|
||||||
|
@ -200,6 +191,15 @@
|
||||||
;; If not generating maptiles, use this static texture asset ID
|
;; If not generating maptiles, use this static texture asset ID
|
||||||
; MaptileStaticUUID = "00000000-0000-0000-0000-000000000000"
|
; MaptileStaticUUID = "00000000-0000-0000-0000-000000000000"
|
||||||
|
|
||||||
|
;# {TextureOnMapTile} {} {Use terrain textures for map tiles?} {true false} true
|
||||||
|
;; Use terrain texture for maptiles if true, use shaded green if false
|
||||||
|
; TextureOnMapTile = true
|
||||||
|
|
||||||
|
;# {DrawPrimOnMapTile} {} {Draw prim shapes on map tiles?} {true false} false
|
||||||
|
;; Draw objects on maptile. This step might take a long time if you've
|
||||||
|
;; got a large number of objects, so you can turn it off here if you'd like.
|
||||||
|
; DrawPrimOnMapTile = true
|
||||||
|
|
||||||
;; Http proxy setting for llHTTPRequest and dynamic texture loading, if required
|
;; Http proxy setting for llHTTPRequest and dynamic texture loading, if required
|
||||||
; HttpProxy = "http://proxy.com:8080"
|
; HttpProxy = "http://proxy.com:8080"
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@
|
||||||
;; The SMTP server enabled the email module to send email to external
|
;; The SMTP server enabled the email module to send email to external
|
||||||
;; destinations.
|
;; destinations.
|
||||||
|
|
||||||
;# {enabled} {[Startup]emailmodule:DefaultEmailModule} {Enable SMTP service?} {true false} true
|
;# {enabled} {[Startup]emailmodule:DefaultEmailModule} {Enable SMTP service?} {true false} false
|
||||||
;; Enable sending email via SMTP
|
;; Enable sending email via SMTP
|
||||||
; enabled = false
|
; enabled = false
|
||||||
|
|
||||||
|
|
|
@ -67,12 +67,6 @@
|
||||||
; except that everything is also enclosed in a <Regions> tag.
|
; except that everything is also enclosed in a <Regions> tag.
|
||||||
; regionload_webserver_url = "http://example.com/regions.xml";
|
; regionload_webserver_url = "http://example.com/regions.xml";
|
||||||
|
|
||||||
; Draw objects on maptile. This step might take a long time if you've got a large number of
|
|
||||||
; objects, so you can turn it off here if you'd like.
|
|
||||||
DrawPrimOnMapTile = true
|
|
||||||
; Use terrain texture for maptiles if true, use shaded green if false
|
|
||||||
TextureOnMapTile = false
|
|
||||||
|
|
||||||
; Maximum size of non physical prims. Affects resizing of existing prims. This can be overriden in the region config file (as NonphysicalPrimMax!).
|
; Maximum size of non physical prims. Affects resizing of existing prims. This can be overriden in the region config file (as NonphysicalPrimMax!).
|
||||||
NonPhysicalPrimMax = 256
|
NonPhysicalPrimMax = 256
|
||||||
|
|
||||||
|
@ -216,13 +210,23 @@
|
||||||
|
|
||||||
;WorldMapModule = "WorldMap"
|
;WorldMapModule = "WorldMap"
|
||||||
;MapImageModule = "MapImageModule"
|
;MapImageModule = "MapImageModule"
|
||||||
|
|
||||||
; Set to false to not generate any maptiles
|
; Set to false to not generate any maptiles
|
||||||
;GenerateMaptiles = "true"
|
;GenerateMaptiles = true
|
||||||
|
|
||||||
; Refresh (in seconds) the map tile periodically
|
; Refresh (in seconds) the map tile periodically
|
||||||
;MaptileRefresh = 0
|
;MaptileRefresh = 0
|
||||||
|
|
||||||
; If not generating maptiles, use this static texture asset ID
|
; If not generating maptiles, use this static texture asset ID
|
||||||
;MaptileStaticUUID = "00000000-0000-0000-0000-000000000000"
|
;MaptileStaticUUID = "00000000-0000-0000-0000-000000000000"
|
||||||
|
|
||||||
|
; Draw objects on maptile. This step might take a long time if you've got a large number of
|
||||||
|
; objects, so you can turn it off here if you'd like.
|
||||||
|
DrawPrimOnMapTile = true
|
||||||
|
|
||||||
|
; Use terrain texture for maptiles if true, use shaded green if false
|
||||||
|
TextureOnMapTile = true
|
||||||
|
|
||||||
; ##
|
; ##
|
||||||
; ## EMAIL MODULE
|
; ## EMAIL MODULE
|
||||||
; ##
|
; ##
|
||||||
|
@ -273,15 +277,15 @@
|
||||||
|
|
||||||
|
|
||||||
[SMTP]
|
[SMTP]
|
||||||
enabled=false
|
enabled = false
|
||||||
|
|
||||||
;enabled=true
|
;enabled = true
|
||||||
;internal_object_host=lsl.opensim.local
|
;internal_object_host = lsl.opensim.local
|
||||||
;host_domain_header_from=127.0.0.1
|
;host_domain_header_from = 127.0.0.1
|
||||||
;SMTP_SERVER_HOSTNAME=127.0.0.1
|
;SMTP_SERVER_HOSTNAME = 127.0.0.1
|
||||||
;SMTP_SERVER_PORT=25
|
;SMTP_SERVER_PORT = 25
|
||||||
;SMTP_SERVER_LOGIN=foo
|
;SMTP_SERVER_LOGIN = foo
|
||||||
;SMTP_SERVER_PASSWORD=bar
|
;SMTP_SERVER_PASSWORD = bar
|
||||||
|
|
||||||
|
|
||||||
[Network]
|
[Network]
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue