diff options
author | MW | 2007-05-30 18:03:27 +0000 |
---|---|---|
committer | MW | 2007-05-30 18:03:27 +0000 |
commit | 6e1be3931592c8d45efac59580af6c5dd35c5426 (patch) | |
tree | c8277ffe12966bc8c9997b6471c5d81b8475689f /OpenSim | |
parent | Now We need to test to see if we can login (diff) | |
download | opensim-SC_OLD-6e1be3931592c8d45efac59580af6c5dd35c5426.zip opensim-SC_OLD-6e1be3931592c8d45efac59580af6c5dd35c5426.tar.gz opensim-SC_OLD-6e1be3931592c8d45efac59580af6c5dd35c5426.tar.bz2 opensim-SC_OLD-6e1be3931592c8d45efac59580af6c5dd35c5426.tar.xz |
trying to get login to work
Diffstat (limited to '')
-rw-r--r-- | OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs | 93 | ||||
-rw-r--r-- | OpenSim/OpenSim.RegionServer/ClientView.cs | 8 | ||||
-rw-r--r-- | OpenSim/OpenSim.RegionServer/PacketServer.cs | 2 | ||||
-rw-r--r-- | OpenSim/OpenSim.World/Avatar.cs | 6 | ||||
-rw-r--r-- | OpenSim/OpenSim/OpenSimMain.cs | 2 |
5 files changed, 83 insertions, 28 deletions
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs b/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs index 54cb662..0964fc4 100644 --- a/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs +++ b/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs | |||
@@ -38,7 +38,10 @@ namespace OpenSim | |||
38 | else | 38 | else |
39 | { | 39 | { |
40 | System.Text.Encoding _enc = System.Text.Encoding.ASCII; | 40 | System.Text.Encoding _enc = System.Text.Encoding.ASCII; |
41 | 41 | if (Pack.Type != PacketType.PacketAck) | |
42 | { | ||
43 | Console.WriteLine(Pack.Type.ToString()); | ||
44 | } | ||
42 | switch (Pack.Type) | 45 | switch (Pack.Type) |
43 | { | 46 | { |
44 | case PacketType.ViewerEffect: | 47 | case PacketType.ViewerEffect: |
@@ -67,7 +70,10 @@ namespace OpenSim | |||
67 | byte type = inchatpack.ChatData.Type; | 70 | byte type = inchatpack.ChatData.Type; |
68 | LLVector3 fromPos = new LLVector3(); // ClientAvatar.Pos; | 71 | LLVector3 fromPos = new LLVector3(); // ClientAvatar.Pos; |
69 | LLUUID fromAgentID = AgentID; | 72 | LLUUID fromAgentID = AgentID; |
70 | this.OnChatFromViewer(message, type, fromPos, fromName, fromAgentID); | 73 | if (OnChatFromViewer != null) |
74 | { | ||
75 | this.OnChatFromViewer(message, type, fromPos, fromName, fromAgentID); | ||
76 | } | ||
71 | break; | 77 | break; |
72 | case PacketType.RezObject: | 78 | case PacketType.RezObject: |
73 | RezObjectPacket rezPacket = (RezObjectPacket)Pack; | 79 | RezObjectPacket rezPacket = (RezObjectPacket)Pack; |
@@ -79,40 +85,67 @@ namespace OpenSim | |||
79 | AssetBase asset = this.m_assetCache.GetAsset(inven.InventoryItems[rezPacket.InventoryData.ItemID].AssetID); | 85 | AssetBase asset = this.m_assetCache.GetAsset(inven.InventoryItems[rezPacket.InventoryData.ItemID].AssetID); |
80 | if (asset != null) | 86 | if (asset != null) |
81 | { | 87 | { |
82 | this.OnRezObject(asset, rezPacket.RezData.RayEnd); | 88 | if (OnRezObject != null) |
83 | this.m_inventoryCache.DeleteInventoryItem(this, rezPacket.InventoryData.ItemID); | 89 | { |
90 | this.OnRezObject(asset, rezPacket.RezData.RayEnd); | ||
91 | this.m_inventoryCache.DeleteInventoryItem(this, rezPacket.InventoryData.ItemID); | ||
92 | } | ||
84 | } | 93 | } |
85 | } | 94 | } |
86 | } | 95 | } |
87 | break; | 96 | break; |
88 | case PacketType.DeRezObject: | 97 | case PacketType.DeRezObject: |
89 | OnDeRezObject(Pack, this); | 98 | if (OnDeRezObject != null) |
99 | { | ||
100 | OnDeRezObject(Pack, this); | ||
101 | } | ||
90 | break; | 102 | break; |
91 | case PacketType.ModifyLand: | 103 | case PacketType.ModifyLand: |
92 | ModifyLandPacket modify = (ModifyLandPacket)Pack; | 104 | ModifyLandPacket modify = (ModifyLandPacket)Pack; |
93 | if (modify.ParcelData.Length > 0) | 105 | if (modify.ParcelData.Length > 0) |
94 | { | 106 | { |
95 | OnModifyTerrain(modify.ModifyBlock.Action, modify.ParcelData[0].North, modify.ParcelData[0].West); | 107 | if (OnModifyTerrain != null) |
108 | { | ||
109 | OnModifyTerrain(modify.ModifyBlock.Action, modify.ParcelData[0].North, modify.ParcelData[0].West); | ||
110 | } | ||
96 | } | 111 | } |
97 | break; | 112 | break; |
98 | case PacketType.RegionHandshakeReply: | 113 | case PacketType.RegionHandshakeReply: |
99 | OnRegionHandShakeReply(this); | 114 | if (OnRegionHandShakeReply != null) |
115 | { | ||
116 | OnRegionHandShakeReply(this); | ||
117 | } | ||
100 | break; | 118 | break; |
101 | case PacketType.AgentWearablesRequest: | 119 | case PacketType.AgentWearablesRequest: |
102 | OnRequestWearables(this); | 120 | if (OnRequestWearables != null) |
103 | OnRequestAvatarsData(this); | 121 | { |
122 | OnRequestWearables(this); | ||
123 | } | ||
124 | if (OnRequestAvatarsData != null) | ||
125 | { | ||
126 | OnRequestAvatarsData(this); | ||
127 | } | ||
104 | break; | 128 | break; |
105 | case PacketType.AgentSetAppearance: | 129 | case PacketType.AgentSetAppearance: |
106 | AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack; | 130 | AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack; |
107 | OnSetAppearance(appear.ObjectData.TextureEntry, appear.VisualParam); | 131 | if (OnSetAppearance != null) |
132 | { | ||
133 | OnSetAppearance(appear.ObjectData.TextureEntry, appear.VisualParam); | ||
134 | } | ||
108 | break; | 135 | break; |
109 | case PacketType.CompleteAgentMovement: | 136 | case PacketType.CompleteAgentMovement: |
110 | if (this.m_child) this.UpgradeClient(); | 137 | if (this.m_child) this.UpgradeClient(); |
111 | OnCompleteMovementToRegion(); | 138 | if (OnCompleteMovementToRegion != null) |
139 | { | ||
140 | OnCompleteMovementToRegion(); | ||
141 | } | ||
112 | this.EnableNeighbours(); | 142 | this.EnableNeighbours(); |
113 | break; | 143 | break; |
114 | case PacketType.AgentUpdate: | 144 | case PacketType.AgentUpdate: |
115 | OnAgentUpdate(Pack); | 145 | if (OnAgentUpdate != null) |
146 | { | ||
147 | OnAgentUpdate(Pack); | ||
148 | } | ||
116 | break; | 149 | break; |
117 | case PacketType.AgentAnimation: | 150 | case PacketType.AgentAnimation: |
118 | if (!m_child) | 151 | if (!m_child) |
@@ -122,7 +155,10 @@ namespace OpenSim | |||
122 | { | 155 | { |
123 | if (AgentAni.AnimationList[i].StartAnim) | 156 | if (AgentAni.AnimationList[i].StartAnim) |
124 | { | 157 | { |
125 | OnStartAnim(AgentAni.AnimationList[i].AnimID, 1); | 158 | if (OnStartAnim != null) |
159 | { | ||
160 | OnStartAnim(AgentAni.AnimationList[i].AnimID, 1); | ||
161 | } | ||
126 | } | 162 | } |
127 | } | 163 | } |
128 | } | 164 | } |
@@ -145,36 +181,53 @@ namespace OpenSim | |||
145 | childrenprims.Add(link.ObjectData[i].ObjectLocalID); | 181 | childrenprims.Add(link.ObjectData[i].ObjectLocalID); |
146 | } | 182 | } |
147 | } | 183 | } |
148 | OnLinkObjects(parentprimid, childrenprims); | 184 | if (OnLinkObjects != null) |
185 | { | ||
186 | OnLinkObjects(parentprimid, childrenprims); | ||
187 | } | ||
149 | break; | 188 | break; |
150 | case PacketType.ObjectAdd: | 189 | case PacketType.ObjectAdd: |
151 | // m_world.AddNewPrim((ObjectAddPacket)Pack, this); | 190 | // m_world.AddNewPrim((ObjectAddPacket)Pack, this); |
152 | OnAddPrim(Pack, this); | 191 | if (OnAddPrim != null) |
192 | { | ||
193 | OnAddPrim(Pack, this); | ||
194 | } | ||
153 | break; | 195 | break; |
154 | case PacketType.ObjectShape: | 196 | case PacketType.ObjectShape: |
155 | ObjectShapePacket shape = (ObjectShapePacket)Pack; | 197 | ObjectShapePacket shape = (ObjectShapePacket)Pack; |
156 | for (int i = 0; i < shape.ObjectData.Length; i++) | 198 | for (int i = 0; i < shape.ObjectData.Length; i++) |
157 | { | 199 | { |
158 | OnUpdatePrimShape(shape.ObjectData[i].ObjectLocalID, shape.ObjectData[i]); | 200 | if (OnUpdatePrimShape != null) |
201 | { | ||
202 | OnUpdatePrimShape(shape.ObjectData[i].ObjectLocalID, shape.ObjectData[i]); | ||
203 | } | ||
159 | } | 204 | } |
160 | break; | 205 | break; |
161 | case PacketType.ObjectSelect: | 206 | case PacketType.ObjectSelect: |
162 | ObjectSelectPacket incomingselect = (ObjectSelectPacket)Pack; | 207 | ObjectSelectPacket incomingselect = (ObjectSelectPacket)Pack; |
163 | for (int i = 0; i < incomingselect.ObjectData.Length; i++) | 208 | for (int i = 0; i < incomingselect.ObjectData.Length; i++) |
164 | { | 209 | { |
165 | OnObjectSelect(incomingselect.ObjectData[i].ObjectLocalID, this); | 210 | if (OnObjectSelect != null) |
211 | { | ||
212 | OnObjectSelect(incomingselect.ObjectData[i].ObjectLocalID, this); | ||
213 | } | ||
166 | } | 214 | } |
167 | break; | 215 | break; |
168 | case PacketType.ObjectFlagUpdate: | 216 | case PacketType.ObjectFlagUpdate: |
169 | ObjectFlagUpdatePacket flags = (ObjectFlagUpdatePacket)Pack; | 217 | ObjectFlagUpdatePacket flags = (ObjectFlagUpdatePacket)Pack; |
170 | OnUpdatePrimFlags(flags.AgentData.ObjectLocalID, Pack, this); | 218 | if (OnUpdatePrimFlags != null) |
219 | { | ||
220 | OnUpdatePrimFlags(flags.AgentData.ObjectLocalID, Pack, this); | ||
221 | } | ||
171 | break; | 222 | break; |
172 | case PacketType.ObjectImage: | 223 | case PacketType.ObjectImage: |
173 | ObjectImagePacket imagePack = (ObjectImagePacket)Pack; | 224 | ObjectImagePacket imagePack = (ObjectImagePacket)Pack; |
174 | for (int i = 0; i < imagePack.ObjectData.Length; i++) | 225 | for (int i = 0; i < imagePack.ObjectData.Length; i++) |
175 | { | 226 | { |
176 | OnUpdatePrimTexture(imagePack.ObjectData[i].ObjectLocalID, imagePack.ObjectData[i].TextureEntry, this); | 227 | if (OnUpdatePrimTexture != null) |
177 | 228 | { | |
229 | OnUpdatePrimTexture(imagePack.ObjectData[i].ObjectLocalID, imagePack.ObjectData[i].TextureEntry, this); | ||
230 | } | ||
178 | } | 231 | } |
179 | break; | 232 | break; |
180 | #endregion | 233 | #endregion |
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.cs b/OpenSim/OpenSim.RegionServer/ClientView.cs index 6963a0b..d7e681f 100644 --- a/OpenSim/OpenSim.RegionServer/ClientView.cs +++ b/OpenSim/OpenSim.RegionServer/ClientView.cs | |||
@@ -80,9 +80,9 @@ namespace OpenSim | |||
80 | protected AuthenticateSessionsBase m_authenticateSessionsHandler; | 80 | protected AuthenticateSessionsBase m_authenticateSessionsHandler; |
81 | 81 | ||
82 | 82 | ||
83 | public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions) | 83 | public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions) |
84 | { | 84 | { |
85 | 85 | m_world = world; | |
86 | m_clientThreads = clientThreads; | 86 | m_clientThreads = clientThreads; |
87 | m_assetCache = assetCache; | 87 | m_assetCache = assetCache; |
88 | 88 | ||
@@ -229,8 +229,8 @@ namespace OpenSim | |||
229 | 229 | ||
230 | protected virtual void InitNewClient() | 230 | protected virtual void InitNewClient() |
231 | { | 231 | { |
232 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "OpenSimClient.cs:InitNewClient() - Adding viewer agent to world"); | 232 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "OpenSimClient.cs:InitNewClient() - Adding viewer agent to world"); |
233 | OnNewAvatar(this, this.AgentID, this.m_child); | 233 | this.m_world.AddNewAvatar(this, this.AgentID, false); |
234 | } | 234 | } |
235 | 235 | ||
236 | protected virtual void AuthUser() | 236 | protected virtual void AuthUser() |
diff --git a/OpenSim/OpenSim.RegionServer/PacketServer.cs b/OpenSim/OpenSim.RegionServer/PacketServer.cs index dd8de4c..d40de47 100644 --- a/OpenSim/OpenSim.RegionServer/PacketServer.cs +++ b/OpenSim/OpenSim.RegionServer/PacketServer.cs | |||
@@ -65,7 +65,7 @@ namespace OpenSim | |||
65 | 65 | ||
66 | public virtual bool AddNewClient(EndPoint epSender, UseCircuitCodePacket useCircuit, AssetCache assetCache, InventoryCache inventoryCache, AuthenticateSessionsBase authenticateSessionsClass) | 66 | public virtual bool AddNewClient(EndPoint epSender, UseCircuitCodePacket useCircuit, AssetCache assetCache, InventoryCache inventoryCache, AuthenticateSessionsBase authenticateSessionsClass) |
67 | { | 67 | { |
68 | ClientView newuser = new ClientView(epSender, useCircuit, this.ClientThreads, assetCache, this, inventoryCache, authenticateSessionsClass); | 68 | ClientView newuser = new ClientView(epSender, useCircuit, this.ClientThreads, this._localWorld, assetCache, this, inventoryCache, authenticateSessionsClass); |
69 | this.ClientThreads.Add(useCircuit.CircuitCode.Code, newuser); | 69 | this.ClientThreads.Add(useCircuit.CircuitCode.Code, newuser); |
70 | this.ClientAPIs.Add(useCircuit.CircuitCode.Code, (IClientAPI)newuser); | 70 | this.ClientAPIs.Add(useCircuit.CircuitCode.Code, (IClientAPI)newuser); |
71 | 71 | ||
diff --git a/OpenSim/OpenSim.World/Avatar.cs b/OpenSim/OpenSim.World/Avatar.cs index 5b66fce..bbc3a58 100644 --- a/OpenSim/OpenSim.World/Avatar.cs +++ b/OpenSim/OpenSim.World/Avatar.cs | |||
@@ -41,19 +41,21 @@ namespace OpenSim.world | |||
41 | 41 | ||
42 | public Avatar(IClientAPI TheClient, World world, Dictionary<uint, IClientAPI> clientThreads, RegionInfo regionDat) | 42 | public Avatar(IClientAPI TheClient, World world, Dictionary<uint, IClientAPI> clientThreads, RegionInfo regionDat) |
43 | { | 43 | { |
44 | Console.WriteLine("avatar point 1"); | ||
44 | m_world = world; | 45 | m_world = world; |
45 | // m_clientThreads = clientThreads; | 46 | // m_clientThreads = clientThreads; |
46 | m_regionName = regionData.RegionName; | 47 | m_regionName = regionData.RegionName; |
47 | m_regionHandle = regionData.RegionHandle; | 48 | m_regionHandle = regionData.RegionHandle; |
48 | m_regionTerraform = regionData.RegionTerraform; | 49 | m_regionTerraform = regionData.RegionTerraform; |
49 | m_regionWaterHeight = regionData.RegionWaterHeight; | 50 | m_regionWaterHeight = regionData.RegionWaterHeight; |
50 | 51 | Console.WriteLine("avatar point 2"); | |
51 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Avatar.cs - Loading details from grid (DUMMY)"); | 52 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Avatar.cs - Loading details from grid (DUMMY)"); |
52 | ControllingClient = TheClient; | 53 | ControllingClient = TheClient; |
53 | this.firstname = ControllingClient.FirstName; | 54 | this.firstname = ControllingClient.FirstName; |
54 | this.lastname = ControllingClient.LastName; | 55 | this.lastname = ControllingClient.LastName; |
55 | localid = 8880000 + (this.m_world._localNumber++); | 56 | localid = 8880000 + (this.m_world._localNumber++); |
56 | Pos = ControllingClient.StartPos; | 57 | Pos = ControllingClient.StartPos; |
58 | Console.WriteLine("avatar point 3"); | ||
57 | visualParams = new byte[218]; | 59 | visualParams = new byte[218]; |
58 | for (int i = 0; i < 218; i++) | 60 | for (int i = 0; i < 218; i++) |
59 | { | 61 | { |
@@ -68,7 +70,7 @@ namespace OpenSim.world | |||
68 | this.Wearables[0].ItemID = LLUUID.Random(); | 70 | this.Wearables[0].ItemID = LLUUID.Random(); |
69 | 71 | ||
70 | this.avatarAppearanceTexture = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005")); | 72 | this.avatarAppearanceTexture = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005")); |
71 | 73 | Console.WriteLine("avatar point 4"); | |
72 | 74 | ||
73 | //register for events | 75 | //register for events |
74 | ControllingClient.OnRequestWearables += new GenericCall(this.SendOurAppearance); | 76 | ControllingClient.OnRequestWearables += new GenericCall(this.SendOurAppearance); |
diff --git a/OpenSim/OpenSim/OpenSimMain.cs b/OpenSim/OpenSim/OpenSimMain.cs index 22a5799..db17db2 100644 --- a/OpenSim/OpenSim/OpenSimMain.cs +++ b/OpenSim/OpenSim/OpenSimMain.cs | |||
@@ -121,7 +121,7 @@ namespace OpenSim | |||
121 | 121 | ||
122 | if (m_sandbox) | 122 | if (m_sandbox) |
123 | { | 123 | { |
124 | loginServer = new LoginServer(regionData[0].IPListenAddr, regionData[0].IPListenPort, regionData[0].RegionLocX, regionData[0].RegionLocY, this.user_accounts); | 124 | loginServer = new LoginServer(regionData[0].IPListenAddr, regionData[0].IPListenPort, regionData[0].RegionLocX, regionData[0].RegionLocY, false); |
125 | loginServer.Startup(); | 125 | loginServer.Startup(); |
126 | loginServer.SetSessionHandler(((AuthenticateSessionsLocal)this.AuthenticateSessionsHandler[0]).AddNewSession); | 126 | loginServer.SetSessionHandler(((AuthenticateSessionsLocal)this.AuthenticateSessionsHandler[0]).AddNewSession); |
127 | 127 | ||