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