Skip to content

Commit

Permalink
- Working on update to libomv 0.7
Browse files Browse the repository at this point in the history
- Changed all tabs to spaces
  • Loading branch information
Katharine committed Jan 23, 2010
1 parent 6d67db1 commit 7f873cc
Show file tree
Hide file tree
Showing 20 changed files with 545 additions and 542 deletions.
3 changes: 1 addition & 2 deletions client/AjaxLife.LSL.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ AjaxLife.InventoryDialogs.Script = function(inventoryid, name) {
}
var win = false;
var callback = false;
var transferid = AjaxLife.Utils.UUID.Zero;

// Create the window.
win = new Ext.BasicDialog("dlg_script_"+inventoryid, {
Expand Down Expand Up @@ -66,7 +65,7 @@ AjaxLife.InventoryDialogs.Script = function(inventoryid, name) {
// Set up callback for receiving the script.
callback = AjaxLife.Network.MessageQueue.RegisterCallback('AssetReceived', function(data) {
// Ignore it if it's not ours.
if(data.TransferID != transferid) return;
if(data.InventoryID != inventoryid) return;

AjaxLife.Debug("InventoryDialogs: Received script asset "+data.AssetID);
// Unregister the callback, since we don't need it any more.
Expand Down
21 changes: 9 additions & 12 deletions server/AjaxLife.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand All @@ -20,24 +20,17 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<OutputType>Exe</OutputType>
<AssemblyName>AjaxLife</AssemblyName>
<RootNamespace>AjaxLife</RootNamespace>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>
</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<OutputType>Exe</OutputType>
<AssemblyName>AjaxLife</AssemblyName>
<DebugSymbols>false</DebugSymbols>
<RootNamespace>AjaxLife</RootNamespace>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
Expand All @@ -53,10 +46,6 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>dependencies\Affirma.ThreeSharp.dll</HintPath>
</Reference>
<Reference Include="libsecondlife, Version=0.5.0.0, Culture=neutral, PublicKeyToken=null">
<SpecificVersion>False</SpecificVersion>
<HintPath>dependencies\libsecondlife.dll</HintPath>
</Reference>
<Reference Include="MiniHttpd, Version=1.2.0.35930, Culture=neutral, PublicKeyToken=null">
<SpecificVersion>False</SpecificVersion>
<HintPath>dependencies\MiniHttpd.dll</HintPath>
Expand All @@ -70,6 +59,14 @@
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Xml" />
<Reference Include="OpenMetaverse, Version=0.7.0.20533, Culture=neutral, PublicKeyToken=null">
<SpecificVersion>False</SpecificVersion>
<HintPath>dependencies\OpenMetaverse.dll</HintPath>
</Reference>
<Reference Include="OpenMetaverseTypes, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<SpecificVersion>False</SpecificVersion>
<HintPath>dependencies\OpenMetaverseTypes.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AvatarTracker.cs" />
Expand Down
20 changes: 10 additions & 10 deletions server/AvatarTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,25 @@
using System;
using System.Collections.Generic;
using System.Text;
using libsecondlife;
using OpenMetaverse;

namespace AjaxLife
{
public class AvatarTracker
{
// These define the events that are called when avatar-related events occur.
// These define the events that are called when avatar-related events occur.
public delegate void Added(Avatar avatar);
public event Added OnAvatarAdded;
public delegate void Removed(Avatar avatar);
public event Removed OnAvatarRemoved;
public delegate void Updated(Avatar avatar);
public event Updated OnAvatarUpdated;
public Dictionary<uint, Avatar> Avatars { get { return this.avatars; } }

private SecondLife Client;
private GridClient Client;
private Dictionary<uint, Avatar> avatars = new Dictionary<uint, Avatar>();

public AvatarTracker(SecondLife client)
public AvatarTracker(GridClient client)
{
this.Client = client;
this.Client.Objects.OnNewAvatar += new ObjectManager.NewAvatarCallback(Objects_OnNewAvatar);
Expand All @@ -57,9 +57,9 @@ public AvatarTracker(SecondLife client)
// this.Client.Objects.OnObjectUpdated += new ObjectManager.ObjectUpdatedCallback(Objects_OnObjectUpdated);
}

void Self_OnTeleport(string message, AgentManager.TeleportStatus status, AgentManager.TeleportFlags flags)
void Self_OnTeleport(string message, TeleportStatus status, TeleportFlags flags)
{
if (status == AgentManager.TeleportStatus.Finished)
if (status == TeleportStatus.Finished)
{
this.avatars.Clear();
}
Expand All @@ -80,7 +80,7 @@ void Objects_OnNewAvatar(Simulator simulator, Avatar avatar, ulong regionHandle,
}
}

/*
/*
void Objects_OnObjectUpdated(Simulator simulator, ObjectUpdate update, ulong regionHandle, ushort timeDilation)
{
// If we know of this avatar, update its position and rotation, and send an AvatarUpdated callback.
Expand All @@ -93,8 +93,8 @@ void Objects_OnObjectUpdated(Simulator simulator, ObjectUpdate update, ulong reg
if(OnAvatarUpdated != null) OnAvatarUpdated(avatar);
}
}
*/
*/
void Objects_OnObjectKilled(Simulator simulator, uint objectID)
{
// If we know of this avatar, remove it and announce its loss.
Expand Down
10 changes: 5 additions & 5 deletions server/Converters/LLUUIDConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@
namespace AjaxLife.Converters
{
// Inherit from the generic JsonConverter.
class LLUUIDConverter : JsonConverter
class UUIDConverter : JsonConverter
{
// Convert JSON using LLUUID::ToStringHyphenated, which outputs as follows:
// Convert JSON using UUID::ToStringHyphenated, which outputs as follows:
// 00000000-0000-0000-0000-000000000000
public override void WriteJson(JsonWriter writer, object value)
{
base.WriteJson(writer, ((libsecondlife.LLUUID)value).ToString());
base.WriteJson(writer, ((OpenMetaverse.UUID)value).ToString());
}

// Check if we can created an LLUUID from whatever we're being given.
// Check if we can created an UUID from whatever we're being given.
public override bool CanConvert(Type objectType)
{
return typeof(libsecondlife.LLUUID).IsAssignableFrom(objectType);
return typeof(OpenMetaverse.UUID).IsAssignableFrom(objectType);
}
}
}
Loading

0 comments on commit 7f873cc

Please sign in to comment.