diff options
author | Jonathan Freedman | 2010-10-20 20:26:37 -0400 |
---|---|---|
committer | Jonathan Freedman | 2010-10-20 20:26:37 -0400 |
commit | 335f2ddad2c7fb8be2f6a4f420270209493cf1fc (patch) | |
tree | 97978c1c3b2b108cc96161681141d135eabd1bc1 /OpenSim/Region/CoreModules | |
parent | * remove some spurious debug info (diff) | |
parent | Deleted verbose debug messages that are bringing sims to an halt. Increased t... (diff) | |
download | opensim-SC-335f2ddad2c7fb8be2f6a4f420270209493cf1fc.zip opensim-SC-335f2ddad2c7fb8be2f6a4f420270209493cf1fc.tar.gz opensim-SC-335f2ddad2c7fb8be2f6a4f420270209493cf1fc.tar.bz2 opensim-SC-335f2ddad2c7fb8be2f6a4f420270209493cf1fc.tar.xz |
Merge branch 'master' of git://opensimulator.org/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/ObjectCaps/UploadObjectAssetModule.cs | 82 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs | 4 |
2 files changed, 67 insertions, 19 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/ObjectCaps/UploadObjectAssetModule.cs b/OpenSim/Region/CoreModules/Avatar/ObjectCaps/UploadObjectAssetModule.cs index d5c6e9d..09b9719 100644 --- a/OpenSim/Region/CoreModules/Avatar/ObjectCaps/UploadObjectAssetModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/ObjectCaps/UploadObjectAssetModule.cs | |||
@@ -47,6 +47,7 @@ using Caps = OpenSim.Framework.Capabilities.Caps; | |||
47 | using OSD = OpenMetaverse.StructuredData.OSD; | 47 | using OSD = OpenMetaverse.StructuredData.OSD; |
48 | using OSDMap = OpenMetaverse.StructuredData.OSDMap; | 48 | using OSDMap = OpenMetaverse.StructuredData.OSDMap; |
49 | using OpenSim.Framework.Capabilities; | 49 | using OpenSim.Framework.Capabilities; |
50 | using ExtraParamType = OpenMetaverse.ExtraParamType; | ||
50 | 51 | ||
51 | namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps | 52 | namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps |
52 | { | 53 | { |
@@ -188,25 +189,74 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps | |||
188 | rootrot = obj.Rotation; | 189 | rootrot = obj.Rotation; |
189 | 190 | ||
190 | } | 191 | } |
192 | |||
193 | |||
191 | // Combine the extraparams data into it's ugly blob again.... | 194 | // Combine the extraparams data into it's ugly blob again.... |
192 | int bytelength = 0; | 195 | //int bytelength = 0; |
193 | for (int extparams = 0; extparams < obj.ExtraParams.Length; extparams++) | 196 | //for (int extparams = 0; extparams < obj.ExtraParams.Length; extparams++) |
194 | { | 197 | //{ |
195 | bytelength += obj.ExtraParams[extparams].ExtraParamData.Length; | 198 | // bytelength += obj.ExtraParams[extparams].ExtraParamData.Length; |
196 | } | 199 | //} |
197 | byte[] extraparams = new byte[bytelength]; | 200 | //byte[] extraparams = new byte[bytelength]; |
198 | int position = 0; | 201 | //int position = 0; |
199 | 202 | ||
200 | for (int extparams = 0; extparams < obj.ExtraParams.Length; extparams++) | ||
201 | { | ||
202 | Buffer.BlockCopy(obj.ExtraParams[extparams].ExtraParamData, 0, extraparams, position, | ||
203 | obj.ExtraParams[extparams].ExtraParamData.Length); | ||
204 | 203 | ||
205 | position += obj.ExtraParams[extparams].ExtraParamData.Length; | ||
206 | } | ||
207 | 204 | ||
208 | pbs.ExtraParams = extraparams; | 205 | //for (int extparams = 0; extparams < obj.ExtraParams.Length; extparams++) |
206 | //{ | ||
207 | // Buffer.BlockCopy(obj.ExtraParams[extparams].ExtraParamData, 0, extraparams, position, | ||
208 | // obj.ExtraParams[extparams].ExtraParamData.Length); | ||
209 | // | ||
210 | // position += obj.ExtraParams[extparams].ExtraParamData.Length; | ||
211 | // } | ||
209 | 212 | ||
213 | //pbs.ExtraParams = extraparams; | ||
214 | for (int extparams = 0; extparams < obj.ExtraParams.Length; extparams++) | ||
215 | { | ||
216 | UploadObjectAssetMessage.Object.ExtraParam extraParam = obj.ExtraParams[extparams]; | ||
217 | switch ((ushort)extraParam.Type) | ||
218 | { | ||
219 | case (ushort)ExtraParamType.Sculpt: | ||
220 | Primitive.SculptData sculpt = new Primitive.SculptData(extraParam.ExtraParamData, 0); | ||
221 | |||
222 | pbs.SculptEntry = true; | ||
223 | |||
224 | pbs.SculptTexture = obj.SculptID; | ||
225 | pbs.SculptType = (byte)sculpt.Type; | ||
226 | |||
227 | break; | ||
228 | case (ushort)ExtraParamType.Flexible: | ||
229 | Primitive.FlexibleData flex = new Primitive.FlexibleData(extraParam.ExtraParamData, 0); | ||
230 | pbs.FlexiEntry = true; | ||
231 | pbs.FlexiDrag = flex.Drag; | ||
232 | pbs.FlexiForceX = flex.Force.X; | ||
233 | pbs.FlexiForceY = flex.Force.Y; | ||
234 | pbs.FlexiForceZ = flex.Force.Z; | ||
235 | pbs.FlexiGravity = flex.Gravity; | ||
236 | pbs.FlexiSoftness = flex.Softness; | ||
237 | pbs.FlexiTension = flex.Tension; | ||
238 | pbs.FlexiWind = flex.Wind; | ||
239 | break; | ||
240 | case (ushort)ExtraParamType.Light: | ||
241 | Primitive.LightData light = new Primitive.LightData(extraParam.ExtraParamData, 0); | ||
242 | pbs.LightColorA = light.Color.A; | ||
243 | pbs.LightColorB = light.Color.B; | ||
244 | pbs.LightColorG = light.Color.G; | ||
245 | pbs.LightColorR = light.Color.R; | ||
246 | pbs.LightCutoff = light.Cutoff; | ||
247 | pbs.LightEntry = true; | ||
248 | pbs.LightFalloff = light.Falloff; | ||
249 | pbs.LightIntensity = light.Intensity; | ||
250 | pbs.LightRadius = light.Radius; | ||
251 | break; | ||
252 | case 0x40: | ||
253 | pbs.ReadProjectionData(extraParam.ExtraParamData, 0); | ||
254 | break; | ||
255 | |||
256 | } | ||
257 | |||
258 | |||
259 | } | ||
210 | pbs.PathBegin = (ushort) obj.PathBegin; | 260 | pbs.PathBegin = (ushort) obj.PathBegin; |
211 | pbs.PathCurve = (byte) obj.PathCurve; | 261 | pbs.PathCurve = (byte) obj.PathCurve; |
212 | pbs.PathEnd = (ushort) obj.PathEnd; | 262 | pbs.PathEnd = (ushort) obj.PathEnd; |
@@ -269,9 +319,7 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps | |||
269 | pbs.TextureEntry = tmp.GetBytes(); | 319 | pbs.TextureEntry = tmp.GetBytes(); |
270 | prim.Shape = pbs; | 320 | prim.Shape = pbs; |
271 | prim.Scale = obj.Scale; | 321 | prim.Scale = obj.Scale; |
272 | prim.Shape.SculptEntry = true; | 322 | |
273 | prim.Shape.SculptTexture = obj.SculptID; | ||
274 | prim.Shape.SculptType = (byte) SculptType.Mesh; | ||
275 | 323 | ||
276 | SceneObjectGroup grp = new SceneObjectGroup(); | 324 | SceneObjectGroup grp = new SceneObjectGroup(); |
277 | 325 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs index e7cfda1..155335b 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs | |||
@@ -36,7 +36,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts | |||
36 | { | 36 | { |
37 | public class UserAccountCache | 37 | public class UserAccountCache |
38 | { | 38 | { |
39 | private const double CACHE_EXPIRATION_SECONDS = 120.0; | 39 | private const double CACHE_EXPIRATION_SECONDS = 120000.0; // 33 hours! |
40 | 40 | ||
41 | private static readonly ILog m_log = | 41 | private static readonly ILog m_log = |
42 | LogManager.GetLogger( | 42 | LogManager.GetLogger( |
@@ -57,7 +57,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts | |||
57 | if (account != null) | 57 | if (account != null) |
58 | m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, CACHE_EXPIRATION_SECONDS); | 58 | m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, CACHE_EXPIRATION_SECONDS); |
59 | 59 | ||
60 | m_log.DebugFormat("[USER CACHE]: cached user {0}", userID); | 60 | //m_log.DebugFormat("[USER CACHE]: cached user {0}", userID); |
61 | } | 61 | } |
62 | 62 | ||
63 | public UserAccount Get(UUID userID, out bool inCache) | 63 | public UserAccount Get(UUID userID, out bool inCache) |