diff options
author | Melanie | 2010-03-06 12:24:09 +0000 |
---|---|---|
committer | Melanie | 2010-03-06 12:24:09 +0000 |
commit | 1f7a0cf892bf23c5b8ba8e3ae1a9036de428db90 (patch) | |
tree | 69419084feb98d59888b59a643e5fa062314605d /OpenSim/Framework | |
parent | Remove a superfluous array creation (diff) | |
parent | - implementing server 1.38 functions (diff) | |
download | opensim-SC_OLD-1f7a0cf892bf23c5b8ba8e3ae1a9036de428db90.zip opensim-SC_OLD-1f7a0cf892bf23c5b8ba8e3ae1a9036de428db90.tar.gz opensim-SC_OLD-1f7a0cf892bf23c5b8ba8e3ae1a9036de428db90.tar.bz2 opensim-SC_OLD-1f7a0cf892bf23c5b8ba8e3ae1a9036de428db90.tar.xz |
Merge branch '0.6.9-post-fixes' into careminster
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/AvatarAppearance.cs | 11 | ||||
-rw-r--r-- | OpenSim/Framework/Console/LocalConsole.cs | 14 | ||||
-rw-r--r-- | OpenSim/Framework/Console/RemoteConsole.cs | 4 | ||||
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 8 | ||||
-rw-r--r-- | OpenSim/Framework/LandData.cs | 26 | ||||
-rw-r--r-- | OpenSim/Framework/PrimitiveBaseShape.cs | 34 | ||||
-rw-r--r-- | OpenSim/Framework/RegionInfo.cs | 1 | ||||
-rw-r--r-- | OpenSim/Framework/Util.cs | 18 |
8 files changed, 93 insertions, 23 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index a3ea499..a2a5c84 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs | |||
@@ -69,7 +69,7 @@ namespace OpenSim.Framework | |||
69 | private static UUID HAIR_ASSET = new UUID("d342e6c0-b9d2-11dc-95ff-0800200c9a66"); | 69 | private static UUID HAIR_ASSET = new UUID("d342e6c0-b9d2-11dc-95ff-0800200c9a66"); |
70 | private static UUID HAIR_ITEM = new UUID("d342e6c1-b9d2-11dc-95ff-0800200c9a66"); | 70 | private static UUID HAIR_ITEM = new UUID("d342e6c1-b9d2-11dc-95ff-0800200c9a66"); |
71 | 71 | ||
72 | public readonly static int VISUALPARAM_COUNT = 218; | 72 | public readonly static int VISUALPARAM_COUNT = 218; |
73 | 73 | ||
74 | protected UUID m_owner; | 74 | protected UUID m_owner; |
75 | 75 | ||
@@ -361,7 +361,7 @@ namespace OpenSim.Framework | |||
361 | // This sets Visual Params with *less* weirder values then default. Instead of a ugly alien, it looks like a fat scientist | 361 | // This sets Visual Params with *less* weirder values then default. Instead of a ugly alien, it looks like a fat scientist |
362 | SetDefaultParams(m_visualparams); | 362 | SetDefaultParams(m_visualparams); |
363 | SetDefaultWearables(); | 363 | SetDefaultWearables(); |
364 | m_texture = GetDefaultTexture(); | 364 | m_texture = GetDefaultTexture(); |
365 | } | 365 | } |
366 | 366 | ||
367 | public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, byte[] visualParams) | 367 | public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, byte[] visualParams) |
@@ -390,11 +390,12 @@ namespace OpenSim.Framework | |||
390 | + 0.08f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f // Shoe platform height | 390 | + 0.08f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f // Shoe platform height |
391 | + 0.07f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f // Shoe heel height | 391 | + 0.07f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f // Shoe heel height |
392 | + 0.076f * (float)m_visualparams[(int)VPElement.SHAPE_NECK_LENGTH] / 255.0f; // Neck length | 392 | + 0.076f * (float)m_visualparams[(int)VPElement.SHAPE_NECK_LENGTH] / 255.0f; // Neck length |
393 | m_hipOffset = (0.615385f // Half of avatar | 393 | m_hipOffset = (((1.23077f // Half of avatar |
394 | + 0.516945f * (float)m_visualparams[(int)VPElement.SHAPE_HEIGHT] / 255.0f // Body height | ||
395 | + 0.3836f * (float)m_visualparams[(int)VPElement.SHAPE_LEG_LENGTH] / 255.0f // Leg length | ||
394 | + 0.08f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f // Shoe platform height | 396 | + 0.08f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f // Shoe platform height |
395 | + 0.07f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f // Shoe heel height | 397 | + 0.07f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f // Shoe heel height |
396 | + 0.3836f * (float)m_visualparams[(int)VPElement.SHAPE_LEG_LENGTH] / 255.0f // Leg length | 398 | ) / 2) - m_avatarHeight / 2) * 0.31f - 0.0425f; |
397 | - m_avatarHeight / 2) * 0.3f - 0.04f; | ||
398 | 399 | ||
399 | 400 | ||
400 | 401 | ||
diff --git a/OpenSim/Framework/Console/LocalConsole.cs b/OpenSim/Framework/Console/LocalConsole.cs index b7e191b..be936b6 100644 --- a/OpenSim/Framework/Console/LocalConsole.cs +++ b/OpenSim/Framework/Console/LocalConsole.cs | |||
@@ -38,7 +38,7 @@ namespace OpenSim.Framework.Console | |||
38 | { | 38 | { |
39 | /// <summary> | 39 | /// <summary> |
40 | /// A console that uses cursor control and color | 40 | /// A console that uses cursor control and color |
41 | /// </summary> | 41 | /// </summary> |
42 | public class LocalConsole : CommandConsole | 42 | public class LocalConsole : CommandConsole |
43 | { | 43 | { |
44 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -100,8 +100,8 @@ namespace OpenSim.Framework.Console | |||
100 | private int SetCursorTop(int top) | 100 | private int SetCursorTop(int top) |
101 | { | 101 | { |
102 | // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try | 102 | // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try |
103 | // to set a cursor row position with a currently invalid column, mono will throw an exception. | 103 | // to set a cursor row position with a currently invalid column, mono will throw an exception. |
104 | // Therefore, we need to make sure that the column position is valid first. | 104 | // Therefore, we need to make sure that the column position is valid first. |
105 | int left = System.Console.CursorLeft; | 105 | int left = System.Console.CursorLeft; |
106 | 106 | ||
107 | if (left < 0) | 107 | if (left < 0) |
@@ -129,12 +129,12 @@ namespace OpenSim.Framework.Console | |||
129 | /// </param> | 129 | /// </param> |
130 | /// <returns> | 130 | /// <returns> |
131 | /// The new cursor column. | 131 | /// The new cursor column. |
132 | /// </returns> | 132 | /// </returns> |
133 | private int SetCursorLeft(int left) | 133 | private int SetCursorLeft(int left) |
134 | { | 134 | { |
135 | // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try | 135 | // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try |
136 | // to set a cursor column position with a currently invalid row, mono will throw an exception. | 136 | // to set a cursor column position with a currently invalid row, mono will throw an exception. |
137 | // Therefore, we need to make sure that the row position is valid first. | 137 | // Therefore, we need to make sure that the row position is valid first. |
138 | int top = System.Console.CursorTop; | 138 | int top = System.Console.CursorTop; |
139 | 139 | ||
140 | if (top < 0) | 140 | if (top < 0) |
@@ -183,7 +183,7 @@ namespace OpenSim.Framework.Console | |||
183 | System.Console.Write("{0}", prompt); | 183 | System.Console.Write("{0}", prompt); |
184 | 184 | ||
185 | SetCursorTop(new_y); | 185 | SetCursorTop(new_y); |
186 | SetCursorLeft(new_x); | 186 | SetCursorLeft(new_x); |
187 | } | 187 | } |
188 | } | 188 | } |
189 | 189 | ||
diff --git a/OpenSim/Framework/Console/RemoteConsole.cs b/OpenSim/Framework/Console/RemoteConsole.cs index 9fdd1b8..6f8348d 100644 --- a/OpenSim/Framework/Console/RemoteConsole.cs +++ b/OpenSim/Framework/Console/RemoteConsole.cs | |||
@@ -302,9 +302,9 @@ namespace OpenSim.Framework.Console | |||
302 | if (!UUID.TryParse(post["ID"].ToString(), out id)) | 302 | if (!UUID.TryParse(post["ID"].ToString(), out id)) |
303 | return reply; | 303 | return reply; |
304 | 304 | ||
305 | lock(m_Connections) | 305 | lock (m_Connections) |
306 | { | 306 | { |
307 | if(!m_Connections.ContainsKey(id)) | 307 | if (!m_Connections.ContainsKey(id)) |
308 | return reply; | 308 | return reply; |
309 | } | 309 | } |
310 | 310 | ||
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 9127054..06c5094 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -152,6 +152,8 @@ namespace OpenSim.Framework | |||
152 | 152 | ||
153 | public delegate void AgentSit(IClientAPI remoteClient, UUID agentID); | 153 | public delegate void AgentSit(IClientAPI remoteClient, UUID agentID); |
154 | 154 | ||
155 | public delegate void LandUndo(IClientAPI remoteClient); | ||
156 | |||
155 | public delegate void AvatarPickerRequest(IClientAPI remoteClient, UUID agentdata, UUID queryID, string UserQuery); | 157 | public delegate void AvatarPickerRequest(IClientAPI remoteClient, UUID agentdata, UUID queryID, string UserQuery); |
156 | 158 | ||
157 | public delegate void GrabObject( | 159 | public delegate void GrabObject( |
@@ -419,9 +421,9 @@ namespace OpenSim.Framework | |||
419 | public delegate void AcceptCallingCard(IClientAPI remoteClient, UUID transactionID, UUID folderID); | 421 | public delegate void AcceptCallingCard(IClientAPI remoteClient, UUID transactionID, UUID folderID); |
420 | 422 | ||
421 | public delegate void DeclineCallingCard(IClientAPI remoteClient, UUID transactionID); | 423 | public delegate void DeclineCallingCard(IClientAPI remoteClient, UUID transactionID); |
422 | 424 | ||
423 | public delegate void SoundTrigger( | 425 | public delegate void SoundTrigger( |
424 | UUID soundId, UUID ownerid, UUID objid, UUID parentid, double Gain, Vector3 Position, UInt64 Handle); | 426 | UUID soundId, UUID ownerid, UUID objid, UUID parentid, double Gain, Vector3 Position, UInt64 Handle, float radius); |
425 | 427 | ||
426 | public delegate void StartLure(byte lureType, string message, UUID targetID, IClientAPI client); | 428 | public delegate void StartLure(byte lureType, string message, UUID targetID, IClientAPI client); |
427 | public delegate void TeleportLureRequest(UUID lureID, uint teleportFlags, IClientAPI client); | 429 | public delegate void TeleportLureRequest(UUID lureID, uint teleportFlags, IClientAPI client); |
@@ -988,6 +990,8 @@ namespace OpenSim.Framework | |||
988 | event ScriptAnswer OnScriptAnswer; | 990 | event ScriptAnswer OnScriptAnswer; |
989 | 991 | ||
990 | event AgentSit OnUndo; | 992 | event AgentSit OnUndo; |
993 | event AgentSit OnRedo; | ||
994 | event LandUndo OnLandUndo; | ||
991 | 995 | ||
992 | event ForceReleaseControls OnForceReleaseControls; | 996 | event ForceReleaseControls OnForceReleaseControls; |
993 | event GodLandStatRequest OnLandStatRequest; | 997 | event GodLandStatRequest OnLandStatRequest; |
diff --git a/OpenSim/Framework/LandData.cs b/OpenSim/Framework/LandData.cs index 071a667..060e886 100644 --- a/OpenSim/Framework/LandData.cs +++ b/OpenSim/Framework/LandData.cs | |||
@@ -358,6 +358,32 @@ namespace OpenSim.Framework | |||
358 | } | 358 | } |
359 | } | 359 | } |
360 | 360 | ||
361 | private int[] _mediaSize = new int[2]; | ||
362 | public int[] MediaSize | ||
363 | { | ||
364 | get | ||
365 | { | ||
366 | return _mediaSize; | ||
367 | } | ||
368 | set | ||
369 | { | ||
370 | _mediaSize = value; | ||
371 | } | ||
372 | } | ||
373 | |||
374 | private string _mediaType = ""; | ||
375 | public string MediaType | ||
376 | { | ||
377 | get | ||
378 | { | ||
379 | return _mediaType; | ||
380 | } | ||
381 | set | ||
382 | { | ||
383 | _mediaType = value; | ||
384 | } | ||
385 | } | ||
386 | |||
361 | /// <summary> | 387 | /// <summary> |
362 | /// URL to the shoutcast music stream to play on the parcel | 388 | /// URL to the shoutcast music stream to play on the parcel |
363 | /// </summary> | 389 | /// </summary> |
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index fe8f020..b88f162 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs | |||
@@ -186,6 +186,40 @@ namespace OpenSim.Framework | |||
186 | PCode = (byte)PCodeEnum.Primitive; | 186 | PCode = (byte)PCodeEnum.Primitive; |
187 | ExtraParams = new byte[1]; | 187 | ExtraParams = new byte[1]; |
188 | m_textureEntry = DEFAULT_TEXTURE; | 188 | m_textureEntry = DEFAULT_TEXTURE; |
189 | } | ||
190 | |||
191 | public PrimitiveBaseShape(Primitive prim) | ||
192 | { | ||
193 | PCode = (byte)prim.PrimData.PCode; | ||
194 | ExtraParams = new byte[1]; | ||
195 | |||
196 | State = prim.PrimData.State; | ||
197 | PathBegin = Primitive.PackBeginCut(prim.PrimData.PathBegin); | ||
198 | PathEnd = Primitive.PackEndCut(prim.PrimData.PathEnd); | ||
199 | PathScaleX = Primitive.PackPathScale(prim.PrimData.PathScaleX); | ||
200 | PathScaleY = Primitive.PackPathScale(prim.PrimData.PathScaleY); | ||
201 | PathShearX = (byte)Primitive.PackPathShear(prim.PrimData.PathShearX); | ||
202 | PathShearY = (byte)Primitive.PackPathShear(prim.PrimData.PathShearY); | ||
203 | PathSkew = Primitive.PackPathTwist(prim.PrimData.PathSkew); | ||
204 | ProfileBegin = Primitive.PackBeginCut(prim.PrimData.ProfileBegin); | ||
205 | ProfileEnd = Primitive.PackEndCut(prim.PrimData.ProfileEnd); | ||
206 | Scale = prim.Scale; | ||
207 | PathCurve = (byte)prim.PrimData.PathCurve; | ||
208 | ProfileCurve = (byte)prim.PrimData.ProfileCurve; | ||
209 | ProfileHollow = Primitive.PackProfileHollow(prim.PrimData.ProfileHollow); | ||
210 | PathRadiusOffset = Primitive.PackPathTwist(prim.PrimData.PathRadiusOffset); | ||
211 | PathRevolutions = Primitive.PackPathRevolutions(prim.PrimData.PathRevolutions); | ||
212 | PathTaperX = Primitive.PackPathTaper(prim.PrimData.PathTaperX); | ||
213 | PathTaperY = Primitive.PackPathTaper(prim.PrimData.PathTaperY); | ||
214 | PathTwist = Primitive.PackPathTwist(prim.PrimData.PathTwist); | ||
215 | PathTwistBegin = Primitive.PackPathTwist(prim.PrimData.PathTwistBegin); | ||
216 | |||
217 | m_textureEntry = prim.Textures.GetBytes(); | ||
218 | |||
219 | SculptEntry = (prim.Sculpt.Type != OpenMetaverse.SculptType.None); | ||
220 | SculptData = prim.Sculpt.GetBytes(); | ||
221 | SculptTexture = prim.Sculpt.SculptTexture; | ||
222 | SculptType = (byte)prim.Sculpt.Type; | ||
189 | } | 223 | } |
190 | 224 | ||
191 | [XmlIgnore] | 225 | [XmlIgnore] |
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index 1ea08f9..99edd99 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs | |||
@@ -790,7 +790,6 @@ namespace OpenSim.Framework | |||
790 | else | 790 | else |
791 | m_externalHostName = externalName; | 791 | m_externalHostName = externalName; |
792 | 792 | ||
793 | |||
794 | // Master avatar cruft | 793 | // Master avatar cruft |
795 | // | 794 | // |
796 | string masterAvatarUUID; | 795 | string masterAvatarUUID; |
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 58a0d77..e20b322 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -589,11 +589,17 @@ namespace OpenSim.Framework | |||
589 | 589 | ||
590 | public static IPAddress GetLocalHost() | 590 | public static IPAddress GetLocalHost() |
591 | { | 591 | { |
592 | string dnsAddress = "localhost"; | 592 | IPAddress[] iplist = GetLocalHosts(); |
593 | 593 | ||
594 | IPAddress[] hosts = Dns.GetHostEntry(dnsAddress).AddressList; | 594 | if (iplist.Length == 0) // No accessible external interfaces |
595 | { | ||
596 | IPAddress[] loopback = Dns.GetHostAddresses("localhost"); | ||
597 | IPAddress localhost = loopback[0]; | ||
595 | 598 | ||
596 | foreach (IPAddress host in hosts) | 599 | return localhost; |
600 | } | ||
601 | |||
602 | foreach (IPAddress host in iplist) | ||
597 | { | 603 | { |
598 | if (!IPAddress.IsLoopback(host) && host.AddressFamily == AddressFamily.InterNetwork) | 604 | if (!IPAddress.IsLoopback(host) && host.AddressFamily == AddressFamily.InterNetwork) |
599 | { | 605 | { |
@@ -601,15 +607,15 @@ namespace OpenSim.Framework | |||
601 | } | 607 | } |
602 | } | 608 | } |
603 | 609 | ||
604 | if (hosts.Length > 0) | 610 | if (iplist.Length > 0) |
605 | { | 611 | { |
606 | foreach (IPAddress host in hosts) | 612 | foreach (IPAddress host in iplist) |
607 | { | 613 | { |
608 | if (host.AddressFamily == AddressFamily.InterNetwork) | 614 | if (host.AddressFamily == AddressFamily.InterNetwork) |
609 | return host; | 615 | return host; |
610 | } | 616 | } |
611 | // Well all else failed... | 617 | // Well all else failed... |
612 | return hosts[0]; | 618 | return iplist[0]; |
613 | } | 619 | } |
614 | 620 | ||
615 | return null; | 621 | return null; |