Simian:
* Implemented the first interface, IAvatarManager, along with automatic interface binding * Changed the way animations are tracked and sent to minimize locking/execution time/redundant packets * Fixed TimeDilation value to correct the walking animation git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@2158 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
@@ -22,6 +22,9 @@ namespace Simian
|
||||
public float[] Heightmap = new float[65536];
|
||||
public Dictionary<UUID, Asset> AssetStore = new Dictionary<UUID, Asset>();
|
||||
|
||||
// Interfaces
|
||||
public IAvatarManager AvatarManager;
|
||||
|
||||
/// <summary>All of the agents currently connected to this UDP server</summary>
|
||||
public Dictionary<IPEndPoint, Agent> Agents = new Dictionary<IPEndPoint, Agent>();
|
||||
|
||||
@@ -57,6 +60,15 @@ namespace Simian
|
||||
{
|
||||
Logger.DebugLog("Loading extension " + extension.GetType().Name);
|
||||
extension.Start();
|
||||
|
||||
// Assign to an interface if possible
|
||||
TryAssignToInterface(extension);
|
||||
}
|
||||
|
||||
if (!CheckInterfaces())
|
||||
{
|
||||
Logger.Log("Missing interfaces, shutting down", Helpers.LogLevel.Error);
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,6 +96,26 @@ namespace Simian
|
||||
}
|
||||
}
|
||||
|
||||
void TryAssignToInterface(ISimianExtension extension)
|
||||
{
|
||||
if (extension is IAvatarManager)
|
||||
{
|
||||
IAvatarManager manager = (IAvatarManager)extension;
|
||||
AvatarManager = manager;
|
||||
}
|
||||
}
|
||||
|
||||
bool CheckInterfaces()
|
||||
{
|
||||
if (AvatarManager == null)
|
||||
{
|
||||
Logger.Log("No AvatarManager interface loaded", Helpers.LogLevel.Error);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void InitUDPServer(int port)
|
||||
{
|
||||
UDPServer = new UDPServer(port, this);
|
||||
|
||||
Reference in New Issue
Block a user