diff --git a/libsecondlife-cs/NetworkManager.cs b/libsecondlife-cs/NetworkManager.cs
index c81674e6..4d0b1d30 100644
--- a/libsecondlife-cs/NetworkManager.cs
+++ b/libsecondlife-cs/NetworkManager.cs
@@ -274,6 +274,7 @@ namespace libsecondlife
private System.Timers.Timer AckTimer;
private ManualResetEvent ConnectedEvent = new ManualResetEvent(false);
+ public float Dilation = 0;
///
/// Constructor for Simulator
///
@@ -578,7 +579,7 @@ namespace libsecondlife
if (now - packet.TickCount > Client.Settings.RESEND_TIMEOUT)
{
Client.Log("Resending " + packet.Type.ToString() + " packet, " +
- (now - packet.TickCount) + "ms have passed", Helpers.LogLevel.Info);
+ (now - packet.TickCount) + "ms have passed", Helpers.LogLevel.Debug);
packet.Header.Resent = true;
SendPacket(packet, false);
@@ -709,6 +710,7 @@ namespace libsecondlife
}
}
+
// Fire the registered packet events
#region FireCallbacks
if (Callbacks.ContainsKey(packet.Type))
diff --git a/libsecondlife-cs/ObjectManager.cs b/libsecondlife-cs/ObjectManager.cs
index 308d13f7..cda73a2f 100644
--- a/libsecondlife-cs/ObjectManager.cs
+++ b/libsecondlife-cs/ObjectManager.cs
@@ -162,7 +162,7 @@ namespace libsecondlife
/// The local ID of the object that is being sat
/// on. If this is zero the avatar is not sitting on an object
public delegate void AvatarSitChanged(Simulator simulator, uint sittingOn);
-
+
#endregion
#region Object/Prim Enums
@@ -423,16 +423,14 @@ namespace libsecondlife
/// from the simulator
///
public event ObjectPropertiesFamilyCallback OnObjectProperties;
+ #endregion
///
/// If true, when a cached object check is received from the server
/// the full object info will automatically be requested.
///
///
-
- #endregion
-
public bool RequestAllObjects = false;
-
+
protected SecondLife Client;
///
@@ -916,6 +914,7 @@ namespace libsecondlife
if (OnNewPrim != null || OnNewAttachment != null || OnNewAvatar != null || OnNewFoliage != null)
{
ObjectUpdatePacket update = (ObjectUpdatePacket)packet;
+ UpdateDilation(simulator, update.RegionData.TimeDilation);
foreach (ObjectUpdatePacket.ObjectDataBlock block in update.ObjectData)
{
@@ -1076,6 +1075,8 @@ namespace libsecondlife
ImprovedTerseObjectUpdatePacket update = (ImprovedTerseObjectUpdatePacket)packet;
+ UpdateDilation(simulator, update.RegionData.TimeDilation);
+
foreach (ImprovedTerseObjectUpdatePacket.ObjectDataBlock block in update.ObjectData)
{
int i = 0;
@@ -1474,6 +1475,10 @@ namespace libsecondlife
{
av.sittingOn = localid;
}
+ protected void UpdateDilation(Simulator s, uint dilation)
+ {
+ s.Dilation = (float) dilation / 65535;
+ }
protected void ParseAvName(string name, ref string firstName, ref string lastName, ref string groupName)
{
diff --git a/libsecondlife-cs/Settings.cs b/libsecondlife-cs/Settings.cs
index 0d459bd4..f0a65f37 100644
--- a/libsecondlife-cs/Settings.cs
+++ b/libsecondlife-cs/Settings.cs
@@ -69,8 +69,8 @@ namespace libsecondlife
/// Maximum number of ACKs to append to a packet
public int MAX_APPENDED_ACKS = 10;
/// Cost of uploading an asset
- public int UPLOAD_COST { get { return priceUpload; } }
- /// Enable/disable debugging log messages
+ public int UPLOAD_COST { get { return priceUpload; } }
+ /// Enable/disable debugging log messages
public bool DEBUG = true;
private SecondLife Client;
diff --git a/libsecondlife-cs/examples/TestClient/Commands/DilationCommand.cs b/libsecondlife-cs/examples/TestClient/Commands/DilationCommand.cs
new file mode 100644
index 00000000..c1d3c043
--- /dev/null
+++ b/libsecondlife-cs/examples/TestClient/Commands/DilationCommand.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using libsecondlife;
+using libsecondlife.Packets;
+
+namespace libsecondlife.TestClient
+{
+ public class DilationCommand : Command
+ {
+ public DilationCommand(TestClient testClient)
+ {
+ Name = "dilation";
+ Description = "Shows time dilation for current sim.";
+ }
+
+ public override string Execute(string[] args, LLUUID fromAgentID)
+ {
+ return "Dilation is " + Client.Network.CurrentSim.Dilation.ToString();
+ }
+ }
+}
\ No newline at end of file
diff --git a/libsecondlife-cs/examples/TestClient/Program.cs b/libsecondlife-cs/examples/TestClient/Program.cs
index d3b8a890..20524223 100644
--- a/libsecondlife-cs/examples/TestClient/Program.cs
+++ b/libsecondlife-cs/examples/TestClient/Program.cs
@@ -23,7 +23,6 @@ namespace libsecondlife.TestClient
LoginDetails account;
string master = "";
string file = "";
- string startpos = "";
string contact = "";
if (arguments["master"] != null)
@@ -31,10 +30,6 @@ namespace libsecondlife.TestClient
master = arguments["master"];
}
- if ( arguments["start"] != null)
- {
- startpos = arguments["start"];
- }
if (arguments["contact"] != null)
{
contact = arguments["contact"];
@@ -112,8 +107,8 @@ namespace libsecondlife.TestClient
a.Master = master;
// Login the accounts and run the input loop
- if ( startpos != null ) {
- manager = new ClientManager(accounts, contact, startpos);
+ if ( arguments["start"] != null ) {
+ manager = new ClientManager(accounts, contact, arguments["start"]);
} else {
manager = new ClientManager(accounts, contact);
}
diff --git a/libsecondlife.xcodeproj/project.pbxproj b/libsecondlife.xcodeproj/project.pbxproj
index 8362345b..65369893 100644
--- a/libsecondlife.xcodeproj/project.pbxproj
+++ b/libsecondlife.xcodeproj/project.pbxproj
@@ -11,11 +11,11 @@
40147FEC0B59A1190070ABA4 /* JasperWrapper.cs in Sources */ = {isa = PBXBuildFile; fileRef = 40147FE30B59A0D50070ABA4 /* JasperWrapper.cs */; };
40147FF40B59A1580070ABA4 /* AssemblyInfo.cs in Sources */ = {isa = PBXBuildFile; fileRef = 40147FD70B59988C0070ABA4 /* AssemblyInfo.cs */; };
40147FF50B59A1580070ABA4 /* ImageTool.cs in Sources */ = {isa = PBXBuildFile; fileRef = 40147FD40B59988C0070ABA4 /* ImageTool.cs */; };
- 40147FF60B59A1580070ABA4 /* KakaduWrap.cs in Sources */ = {isa = PBXBuildFile; fileRef = 40147FD50B59988C0070ABA4 /* KakaduWrap.cs */; };
40147FF70B59A1620070ABA4 /* libsecondlife.dll in Frameworks */ = {isa = PBXBuildFile; fileRef = 4054E3050B57345B00B0667D /* libsecondlife.dll */; };
40147FF80B59A1620070ABA4 /* libjaspernet.dll in Frameworks */ = {isa = PBXBuildFile; fileRef = 40147FE90B59A0E60070ABA4 /* libjaspernet.dll */; };
401480080B59A3180070ABA4 /* IA_SimpleInventory.cs in Sources */ = {isa = PBXBuildFile; fileRef = 4054E4590B575BD600B0667D /* IA_SimpleInventory.cs */; };
- 4054E30B0B57351700B0667D /* _BodyShapeParams_.cs in Sources */ = {isa = PBXBuildFile; fileRef = 4054E2B90B57343500B0667D /* _BodyShapeParams_.cs */; };
+ 401D8B160B6AF98000CF8C2F /* DebugCommand.cs in Sources */ = {isa = PBXBuildFile; fileRef = 401D8B150B6AF98000CF8C2F /* DebugCommand.cs */; };
+ 402E14E30B699BB400A17C19 /* _VisualParam_.cs in Sources */ = {isa = PBXBuildFile; fileRef = 402E14E20B699BB400A17C19 /* _VisualParam_.cs */; };
4054E30C0B57351700B0667D /* _Packets_.cs in Sources */ = {isa = PBXBuildFile; fileRef = 4054E2B60B57343500B0667D /* _Packets_.cs */; };
4054E30D0B57351700B0667D /* AppearanceManager.cs in Sources */ = {isa = PBXBuildFile; fileRef = 4054E2BA0B57343500B0667D /* AppearanceManager.cs */; };
4054E30E0B57351700B0667D /* AssemblyInfo.cs in Sources */ = {isa = PBXBuildFile; fileRef = 4054E2B70B57343500B0667D /* AssemblyInfo.cs */; };
@@ -188,6 +188,7 @@
40E9A5E90B60726900D8BA3C /* LLSD.cs in Sources */ = {isa = PBXBuildFile; fileRef = 40E9A5E80B60726900D8BA3C /* LLSD.cs */; };
40E9A5EB0B60729800D8BA3C /* Assets.cs in Sources */ = {isa = PBXBuildFile; fileRef = 40E9A5EA0B60729800D8BA3C /* Assets.cs */; };
40F258A30B586E8D003B627A /* AssetRequest.cs in Sources */ = {isa = PBXBuildFile; fileRef = 40F258A20B586E8D003B627A /* AssetRequest.cs */; };
+ 40F44B900B6B59A40087EEC9 /* DilationCommand.cs in Sources */ = {isa = PBXBuildFile; fileRef = 40F44B8F0B6B59A40087EEC9 /* DilationCommand.cs */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -258,16 +259,16 @@
/* Begin PBXFileReference section */
40147FD40B59988C0070ABA4 /* ImageTool.cs */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.csharp; name = ImageTool.cs; path = "libsecondlife-cs/examples/IA_ImageTool/ImageTool.cs"; sourceTree = ""; };
- 40147FD50B59988C0070ABA4 /* KakaduWrap.cs */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.csharp; name = KakaduWrap.cs; path = "libsecondlife-cs/examples/IA_ImageTool/KakaduWrap.cs"; sourceTree = ""; };
40147FD70B59988C0070ABA4 /* AssemblyInfo.cs */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.csharp; path = AssemblyInfo.cs; sourceTree = ""; };
40147FDB0B599B2D0070ABA4 /* IA_ImageTool.exe */ = {isa = PBXFileReference; explicitFileType = compiled.mono.executable; includeInIndex = 0; path = IA_ImageTool.exe; sourceTree = BUILT_PRODUCTS_DIR; };
40147FE30B59A0D50070ABA4 /* JasperWrapper.cs */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.csharp; name = JasperWrapper.cs; path = libjaspernet/JasperWrapper.cs; sourceTree = ""; };
40147FE50B59A0D50070ABA4 /* AssemblyInfo.cs */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.csharp; path = AssemblyInfo.cs; sourceTree = ""; };
40147FE90B59A0E60070ABA4 /* libjaspernet.dll */ = {isa = PBXFileReference; explicitFileType = compiled.mono.library; includeInIndex = 0; path = libjaspernet.dll; sourceTree = BUILT_PRODUCTS_DIR; };
40147FED0B59A1310070ABA4 /* libjasper.dll */ = {isa = PBXFileReference; lastKnownFileType = compiled.mono.library; name = libjasper.dll; path = libjaspernet/libjasper.dll; sourceTree = ""; };
+ 401D8B150B6AF98000CF8C2F /* DebugCommand.cs */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.csharp; path = DebugCommand.cs; sourceTree = ""; };
+ 402E14E20B699BB400A17C19 /* _VisualParam_.cs */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.csharp; name = _VisualParam_.cs; path = "libsecondlife-cs/_VisualParam_.cs"; sourceTree = ""; };
4054E2B60B57343500B0667D /* _Packets_.cs */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.csharp; name = _Packets_.cs; path = "libsecondlife-cs/_Packets_.cs"; sourceTree = ""; };
4054E2B70B57343500B0667D /* AssemblyInfo.cs */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.csharp; name = AssemblyInfo.cs; path = "libsecondlife-cs/AssemblyInfo.cs"; sourceTree = ""; };
- 4054E2B90B57343500B0667D /* _BodyShapeParams_.cs */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.csharp; path = _BodyShapeParams_.cs; sourceTree = ""; };
4054E2BA0B57343500B0667D /* AppearanceManager.cs */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.csharp; path = AppearanceManager.cs; sourceTree = ""; };
4054E2BB0B57343500B0667D /* Asset.cs */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.csharp; path = Asset.cs; sourceTree = ""; };
4054E2BC0B57343500B0667D /* AssetImage.cs */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.csharp; path = AssetImage.cs; sourceTree = ""; };
@@ -438,6 +439,7 @@
40E9A5E80B60726900D8BA3C /* LLSD.cs */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.csharp; name = LLSD.cs; path = "libsecondlife-cs/LLSD.cs"; sourceTree = ""; };
40E9A5EA0B60729800D8BA3C /* Assets.cs */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.csharp; name = Assets.cs; path = "libsecondlife-cs/libsecondlife.Utilities/Assets.cs"; sourceTree = ""; };
40F258A20B586E8D003B627A /* AssetRequest.cs */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.csharp; name = AssetRequest.cs; path = "libsecondlife-cs/AssetSystem/AssetRequest.cs"; sourceTree = ""; };
+ 40F44B8F0B6B59A40087EEC9 /* DilationCommand.cs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.csharp; path = DilationCommand.cs; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -535,7 +537,6 @@
isa = PBXGroup;
children = (
40147FD40B59988C0070ABA4 /* ImageTool.cs */,
- 40147FD50B59988C0070ABA4 /* KakaduWrap.cs */,
40147FD60B59988C0070ABA4 /* Properties */,
);
name = IA_ImageTool;
@@ -584,6 +585,7 @@
4054E2B50B5733D200B0667D /* libsecondlife-cs */ = {
isa = PBXGroup;
children = (
+ 402E14E20B699BB400A17C19 /* _VisualParam_.cs */,
40E9A5E80B60726900D8BA3C /* LLSD.cs */,
40F258A20B586E8D003B627A /* AssetRequest.cs */,
4054E2B60B57343500B0667D /* _Packets_.cs */,
@@ -620,7 +622,6 @@
4054E2B80B57343500B0667D /* AssetSystem */ = {
isa = PBXGroup;
children = (
- 4054E2B90B57343500B0667D /* _BodyShapeParams_.cs */,
4054E2BA0B57343500B0667D /* AppearanceManager.cs */,
4054E2BB0B57343500B0667D /* Asset.cs */,
4054E2BC0B57343500B0667D /* AssetImage.cs */,
@@ -778,6 +779,7 @@
4054E3B60B573A9700B0667D /* Commands */ = {
isa = PBXGroup;
children = (
+ 401D8B150B6AF98000CF8C2F /* DebugCommand.cs */,
40AAAB9B0B60CC7300EC04F0 /* Commands */,
4054E3B70B573A9700B0667D /* AppearanceCommand.cs */,
4054E3B80B573A9700B0667D /* CloneProfileCommand.cs */,
@@ -799,6 +801,7 @@
4054E3D80B573A9700B0667D /* SetMasterCommand.cs */,
4054E3D90B573A9700B0667D /* TreeCommand.cs */,
4054E3DA0B573A9700B0667D /* UptimeCommand.cs */,
+ 40F44B8F0B6B59A40087EEC9 /* DilationCommand.cs */,
4054E3DB0B573A9700B0667D /* WhoCommand.cs */,
);
name = Commands;
@@ -1217,7 +1220,6 @@
40147FF50B59A1580070ABA4 /* ImageTool.cs in Sources */,
401480080B59A3180070ABA4 /* IA_SimpleInventory.cs in Sources */,
40147FF40B59A1580070ABA4 /* AssemblyInfo.cs in Sources */,
- 40147FF60B59A1580070ABA4 /* KakaduWrap.cs in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1234,7 +1236,6 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 4054E30B0B57351700B0667D /* _BodyShapeParams_.cs in Sources */,
4054E30C0B57351700B0667D /* _Packets_.cs in Sources */,
4054E30D0B57351700B0667D /* AppearanceManager.cs in Sources */,
4054E30E0B57351700B0667D /* AssemblyInfo.cs in Sources */,
@@ -1307,6 +1308,7 @@
4054E3520B57351700B0667D /* XmlRpcXmlTokens.cs in Sources */,
40F258A30B586E8D003B627A /* AssetRequest.cs in Sources */,
40E9A5E90B60726900D8BA3C /* LLSD.cs in Sources */,
+ 402E14E30B699BB400A17C19 /* _VisualParam_.cs in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1341,6 +1343,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 401D8B160B6AF98000CF8C2F /* DebugCommand.cs in Sources */,
4054E3DF0B573A9700B0667D /* Arguments.cs in Sources */,
4054E3E00B573A9700B0667D /* ClientManager.cs in Sources */,
4054E3E10B573A9700B0667D /* Command.cs in Sources */,
@@ -1418,6 +1421,7 @@
40AAABEB0B60CC7400EC04F0 /* UptimeCommand.cs in Sources */,
40AAABEC0B60CC7400EC04F0 /* WhoCommand.cs in Sources */,
40AAAC250B60CE5300EC04F0 /* Parsing.cs in Sources */,
+ 40F44B900B6B59A40087EEC9 /* DilationCommand.cs in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};