trying to get login to work
parent
b2f16fd4e1
commit
6e1be39315
|
@ -38,7 +38,10 @@ namespace OpenSim
|
|||
else
|
||||
{
|
||||
System.Text.Encoding _enc = System.Text.Encoding.ASCII;
|
||||
|
||||
if (Pack.Type != PacketType.PacketAck)
|
||||
{
|
||||
Console.WriteLine(Pack.Type.ToString());
|
||||
}
|
||||
switch (Pack.Type)
|
||||
{
|
||||
case PacketType.ViewerEffect:
|
||||
|
@ -67,7 +70,10 @@ namespace OpenSim
|
|||
byte type = inchatpack.ChatData.Type;
|
||||
LLVector3 fromPos = new LLVector3(); // ClientAvatar.Pos;
|
||||
LLUUID fromAgentID = AgentID;
|
||||
if (OnChatFromViewer != null)
|
||||
{
|
||||
this.OnChatFromViewer(message, type, fromPos, fromName, fromAgentID);
|
||||
}
|
||||
break;
|
||||
case PacketType.RezObject:
|
||||
RezObjectPacket rezPacket = (RezObjectPacket)Pack;
|
||||
|
@ -78,41 +84,68 @@ namespace OpenSim
|
|||
{
|
||||
AssetBase asset = this.m_assetCache.GetAsset(inven.InventoryItems[rezPacket.InventoryData.ItemID].AssetID);
|
||||
if (asset != null)
|
||||
{
|
||||
if (OnRezObject != null)
|
||||
{
|
||||
this.OnRezObject(asset, rezPacket.RezData.RayEnd);
|
||||
this.m_inventoryCache.DeleteInventoryItem(this, rezPacket.InventoryData.ItemID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case PacketType.DeRezObject:
|
||||
if (OnDeRezObject != null)
|
||||
{
|
||||
OnDeRezObject(Pack, this);
|
||||
}
|
||||
break;
|
||||
case PacketType.ModifyLand:
|
||||
ModifyLandPacket modify = (ModifyLandPacket)Pack;
|
||||
if (modify.ParcelData.Length > 0)
|
||||
{
|
||||
if (OnModifyTerrain != null)
|
||||
{
|
||||
OnModifyTerrain(modify.ModifyBlock.Action, modify.ParcelData[0].North, modify.ParcelData[0].West);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case PacketType.RegionHandshakeReply:
|
||||
if (OnRegionHandShakeReply != null)
|
||||
{
|
||||
OnRegionHandShakeReply(this);
|
||||
}
|
||||
break;
|
||||
case PacketType.AgentWearablesRequest:
|
||||
if (OnRequestWearables != null)
|
||||
{
|
||||
OnRequestWearables(this);
|
||||
}
|
||||
if (OnRequestAvatarsData != null)
|
||||
{
|
||||
OnRequestAvatarsData(this);
|
||||
}
|
||||
break;
|
||||
case PacketType.AgentSetAppearance:
|
||||
AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack;
|
||||
if (OnSetAppearance != null)
|
||||
{
|
||||
OnSetAppearance(appear.ObjectData.TextureEntry, appear.VisualParam);
|
||||
}
|
||||
break;
|
||||
case PacketType.CompleteAgentMovement:
|
||||
if (this.m_child) this.UpgradeClient();
|
||||
if (OnCompleteMovementToRegion != null)
|
||||
{
|
||||
OnCompleteMovementToRegion();
|
||||
}
|
||||
this.EnableNeighbours();
|
||||
break;
|
||||
case PacketType.AgentUpdate:
|
||||
if (OnAgentUpdate != null)
|
||||
{
|
||||
OnAgentUpdate(Pack);
|
||||
}
|
||||
break;
|
||||
case PacketType.AgentAnimation:
|
||||
if (!m_child)
|
||||
|
@ -121,11 +154,14 @@ namespace OpenSim
|
|||
for (int i = 0; i < AgentAni.AnimationList.Length; i++)
|
||||
{
|
||||
if (AgentAni.AnimationList[i].StartAnim)
|
||||
{
|
||||
if (OnStartAnim != null)
|
||||
{
|
||||
OnStartAnim(AgentAni.AnimationList[i].AnimID, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
#endregion
|
||||
|
@ -145,36 +181,53 @@ namespace OpenSim
|
|||
childrenprims.Add(link.ObjectData[i].ObjectLocalID);
|
||||
}
|
||||
}
|
||||
if (OnLinkObjects != null)
|
||||
{
|
||||
OnLinkObjects(parentprimid, childrenprims);
|
||||
}
|
||||
break;
|
||||
case PacketType.ObjectAdd:
|
||||
// m_world.AddNewPrim((ObjectAddPacket)Pack, this);
|
||||
if (OnAddPrim != null)
|
||||
{
|
||||
OnAddPrim(Pack, this);
|
||||
}
|
||||
break;
|
||||
case PacketType.ObjectShape:
|
||||
ObjectShapePacket shape = (ObjectShapePacket)Pack;
|
||||
for (int i = 0; i < shape.ObjectData.Length; i++)
|
||||
{
|
||||
if (OnUpdatePrimShape != null)
|
||||
{
|
||||
OnUpdatePrimShape(shape.ObjectData[i].ObjectLocalID, shape.ObjectData[i]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case PacketType.ObjectSelect:
|
||||
ObjectSelectPacket incomingselect = (ObjectSelectPacket)Pack;
|
||||
for (int i = 0; i < incomingselect.ObjectData.Length; i++)
|
||||
{
|
||||
if (OnObjectSelect != null)
|
||||
{
|
||||
OnObjectSelect(incomingselect.ObjectData[i].ObjectLocalID, this);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case PacketType.ObjectFlagUpdate:
|
||||
ObjectFlagUpdatePacket flags = (ObjectFlagUpdatePacket)Pack;
|
||||
if (OnUpdatePrimFlags != null)
|
||||
{
|
||||
OnUpdatePrimFlags(flags.AgentData.ObjectLocalID, Pack, this);
|
||||
}
|
||||
break;
|
||||
case PacketType.ObjectImage:
|
||||
ObjectImagePacket imagePack = (ObjectImagePacket)Pack;
|
||||
for (int i = 0; i < imagePack.ObjectData.Length; i++)
|
||||
{
|
||||
if (OnUpdatePrimTexture != null)
|
||||
{
|
||||
OnUpdatePrimTexture(imagePack.ObjectData[i].ObjectLocalID, imagePack.ObjectData[i].TextureEntry, this);
|
||||
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endregion
|
||||
|
|
|
@ -80,9 +80,9 @@ namespace OpenSim
|
|||
protected AuthenticateSessionsBase m_authenticateSessionsHandler;
|
||||
|
||||
|
||||
public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions)
|
||||
public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions)
|
||||
{
|
||||
|
||||
m_world = world;
|
||||
m_clientThreads = clientThreads;
|
||||
m_assetCache = assetCache;
|
||||
|
||||
|
@ -230,7 +230,7 @@ namespace OpenSim
|
|||
protected virtual void InitNewClient()
|
||||
{
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "OpenSimClient.cs:InitNewClient() - Adding viewer agent to world");
|
||||
OnNewAvatar(this, this.AgentID, this.m_child);
|
||||
this.m_world.AddNewAvatar(this, this.AgentID, false);
|
||||
}
|
||||
|
||||
protected virtual void AuthUser()
|
||||
|
|
|
@ -65,7 +65,7 @@ namespace OpenSim
|
|||
|
||||
public virtual bool AddNewClient(EndPoint epSender, UseCircuitCodePacket useCircuit, AssetCache assetCache, InventoryCache inventoryCache, AuthenticateSessionsBase authenticateSessionsClass)
|
||||
{
|
||||
ClientView newuser = new ClientView(epSender, useCircuit, this.ClientThreads, assetCache, this, inventoryCache, authenticateSessionsClass);
|
||||
ClientView newuser = new ClientView(epSender, useCircuit, this.ClientThreads, this._localWorld, assetCache, this, inventoryCache, authenticateSessionsClass);
|
||||
this.ClientThreads.Add(useCircuit.CircuitCode.Code, newuser);
|
||||
this.ClientAPIs.Add(useCircuit.CircuitCode.Code, (IClientAPI)newuser);
|
||||
|
||||
|
|
|
@ -41,19 +41,21 @@ namespace OpenSim.world
|
|||
|
||||
public Avatar(IClientAPI TheClient, World world, Dictionary<uint, IClientAPI> clientThreads, RegionInfo regionDat)
|
||||
{
|
||||
Console.WriteLine("avatar point 1");
|
||||
m_world = world;
|
||||
// m_clientThreads = clientThreads;
|
||||
m_regionName = regionData.RegionName;
|
||||
m_regionHandle = regionData.RegionHandle;
|
||||
m_regionTerraform = regionData.RegionTerraform;
|
||||
m_regionWaterHeight = regionData.RegionWaterHeight;
|
||||
|
||||
Console.WriteLine("avatar point 2");
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Avatar.cs - Loading details from grid (DUMMY)");
|
||||
ControllingClient = TheClient;
|
||||
this.firstname = ControllingClient.FirstName;
|
||||
this.lastname = ControllingClient.LastName;
|
||||
localid = 8880000 + (this.m_world._localNumber++);
|
||||
Pos = ControllingClient.StartPos;
|
||||
Console.WriteLine("avatar point 3");
|
||||
visualParams = new byte[218];
|
||||
for (int i = 0; i < 218; i++)
|
||||
{
|
||||
|
@ -68,7 +70,7 @@ namespace OpenSim.world
|
|||
this.Wearables[0].ItemID = LLUUID.Random();
|
||||
|
||||
this.avatarAppearanceTexture = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005"));
|
||||
|
||||
Console.WriteLine("avatar point 4");
|
||||
|
||||
//register for events
|
||||
ControllingClient.OnRequestWearables += new GenericCall(this.SendOurAppearance);
|
||||
|
|
|
@ -121,7 +121,7 @@ namespace OpenSim
|
|||
|
||||
if (m_sandbox)
|
||||
{
|
||||
loginServer = new LoginServer(regionData[0].IPListenAddr, regionData[0].IPListenPort, regionData[0].RegionLocX, regionData[0].RegionLocY, this.user_accounts);
|
||||
loginServer = new LoginServer(regionData[0].IPListenAddr, regionData[0].IPListenPort, regionData[0].RegionLocX, regionData[0].RegionLocY, false);
|
||||
loginServer.Startup();
|
||||
loginServer.SetSessionHandler(((AuthenticateSessionsLocal)this.AuthenticateSessionsHandler[0]).AddNewSession);
|
||||
|
||||
|
|
Loading…
Reference in New Issue