diff options
author | lbsa71 | 2007-06-09 21:45:58 +0000 |
---|---|---|
committer | lbsa71 | 2007-06-09 21:45:58 +0000 |
commit | 4224b695acc2e1ad0199dc0ad7f560494182ed54 (patch) | |
tree | 8fae1cf25a058bc4e378ef2b6ce264d7f9f0b910 /OpenSim/OpenSim.World/WorldBase.cs | |
parent | *Fixed casting mishap in last commit - client now starts up without crashing (diff) | |
download | opensim-SC_OLD-4224b695acc2e1ad0199dc0ad7f560494182ed54.zip opensim-SC_OLD-4224b695acc2e1ad0199dc0ad7f560494182ed54.tar.gz opensim-SC_OLD-4224b695acc2e1ad0199dc0ad7f560494182ed54.tar.bz2 opensim-SC_OLD-4224b695acc2e1ad0199dc0ad7f560494182ed54.tar.xz |
* LogFile now defaults to "{apptype}.log"
* cleaned away suo and user files.
* added handy string chat variety to the API
* Moved LockPhysicsEngine on World to SyncRoot on IWorld
* Introduced NextLocalId instead of World fuggliness.
* Transformed GetRegionInfo to Property on IWorld for great justice
* Extracted default wearables (good to have)
* Deleted unused BaseServer
* Used IWorld instead of World wherever possible
* The client constructor's not getting unused port any longer.
* Extracted ClientView factoring so PacketServer can be tweaked.
* Added SendLayerData to World
* Made WorldBase abstract and cleaned it up a bit
* added OpenGrid.Framework.Communications.dll.build and OpenSim.World.dll.build to svn
* Added code for two examples (but not in prebuild yet)
Diffstat (limited to '')
-rw-r--r-- | OpenSim/OpenSim.World/WorldBase.cs | 91 |
1 files changed, 27 insertions, 64 deletions
diff --git a/OpenSim/OpenSim.World/WorldBase.cs b/OpenSim/OpenSim.World/WorldBase.cs index 19a8fb5..92bc6a3 100644 --- a/OpenSim/OpenSim.World/WorldBase.cs +++ b/OpenSim/OpenSim.World/WorldBase.cs | |||
@@ -15,61 +15,25 @@ using OpenSim.Terrain; | |||
15 | 15 | ||
16 | namespace OpenSim.world | 16 | namespace OpenSim.world |
17 | { | 17 | { |
18 | public class WorldBase : IWorld | 18 | public abstract class WorldBase : IWorld |
19 | { | 19 | { |
20 | public Dictionary<libsecondlife.LLUUID, Entity> Entities; | 20 | public Dictionary<libsecondlife.LLUUID, Entity> Entities; |
21 | protected Dictionary<uint, IClientAPI> m_clientThreads; | 21 | protected Dictionary<uint, IClientAPI> m_clientThreads; |
22 | protected ulong m_regionHandle; | 22 | protected ulong m_regionHandle; |
23 | protected string m_regionName; | 23 | protected string m_regionName; |
24 | // protected InventoryCache _inventoryCache; | ||
25 | // protected AssetCache _assetCache; | ||
26 | protected RegionInfo m_regInfo; | 24 | protected RegionInfo m_regInfo; |
27 | 25 | ||
28 | public TerrainEngine Terrain; //TODO: Replace TerrainManager with this. | 26 | public TerrainEngine Terrain; //TODO: Replace TerrainManager with this. |
29 | protected libsecondlife.TerrainManager TerrainManager; // To be referenced via TerrainEngine | 27 | protected libsecondlife.TerrainManager TerrainManager; // To be referenced via TerrainEngine |
30 | 28 | protected object m_syncRoot = new object(); | |
31 | #region Properties | 29 | private uint m_nextLocalId = 8880000; |
32 | /* | ||
33 | public InventoryCache InventoryCache | ||
34 | { | ||
35 | set | ||
36 | { | ||
37 | this._inventoryCache = value; | ||
38 | } | ||
39 | } | ||
40 | |||
41 | public AssetCache AssetCache | ||
42 | { | ||
43 | set | ||
44 | { | ||
45 | this._assetCache = value; | ||
46 | } | ||
47 | } | ||
48 | */ | ||
49 | #endregion | ||
50 | |||
51 | #region Constructors | ||
52 | /// <summary> | ||
53 | /// | ||
54 | /// </summary> | ||
55 | public WorldBase() | ||
56 | { | ||
57 | |||
58 | } | ||
59 | #endregion | ||
60 | |||
61 | #region Setup Methods | ||
62 | |||
63 | #endregion | ||
64 | 30 | ||
65 | #region Update Methods | 31 | #region Update Methods |
66 | /// <summary> | 32 | /// <summary> |
67 | /// Normally called once every frame/tick to let the world preform anything required (like running the physics simulation) | 33 | /// Normally called once every frame/tick to let the world preform anything required (like running the physics simulation) |
68 | /// </summary> | 34 | /// </summary> |
69 | public virtual void Update() | 35 | public abstract void Update(); |
70 | { | ||
71 | 36 | ||
72 | } | ||
73 | #endregion | 37 | #endregion |
74 | 38 | ||
75 | #region Terrain Methods | 39 | #region Terrain Methods |
@@ -77,11 +41,8 @@ namespace OpenSim.world | |||
77 | /// <summary> | 41 | /// <summary> |
78 | /// Loads the World heightmap | 42 | /// Loads the World heightmap |
79 | /// </summary> | 43 | /// </summary> |
80 | public virtual void LoadWorldMap() | 44 | public abstract void LoadWorldMap(); |
81 | { | 45 | |
82 | |||
83 | } | ||
84 | |||
85 | /// <summary> | 46 | /// <summary> |
86 | /// Send the region heightmap to the client | 47 | /// Send the region heightmap to the client |
87 | /// </summary> | 48 | /// </summary> |
@@ -97,10 +58,8 @@ namespace OpenSim.world | |||
97 | /// <param name="px">Patch coordinate (x) 0..16</param> | 58 | /// <param name="px">Patch coordinate (x) 0..16</param> |
98 | /// <param name="py">Patch coordinate (y) 0..16</param> | 59 | /// <param name="py">Patch coordinate (y) 0..16</param> |
99 | /// <param name="RemoteClient">The client to send to</param> | 60 | /// <param name="RemoteClient">The client to send to</param> |
100 | public void SendLayerData(int px, int py, IClientAPI RemoteClient) | 61 | public abstract void SendLayerData(int px, int py, IClientAPI RemoteClient); |
101 | { | 62 | |
102 | |||
103 | } | ||
104 | #endregion | 63 | #endregion |
105 | 64 | ||
106 | #region Add/Remove Agent/Avatar | 65 | #region Add/Remove Agent/Avatar |
@@ -110,39 +69,43 @@ namespace OpenSim.world | |||
110 | /// <param name="remoteClient"></param> | 69 | /// <param name="remoteClient"></param> |
111 | /// <param name="agentID"></param> | 70 | /// <param name="agentID"></param> |
112 | /// <param name="child"></param> | 71 | /// <param name="child"></param> |
113 | public virtual void AddNewAvatar(IClientAPI remoteClient, LLUUID agentID, bool child) | 72 | public abstract void AddNewAvatar(IClientAPI remoteClient, LLUUID agentID, bool child); |
114 | { | 73 | |
115 | return ; | ||
116 | } | ||
117 | |||
118 | /// <summary> | 74 | /// <summary> |
119 | /// | 75 | /// |
120 | /// </summary> | 76 | /// </summary> |
121 | /// <param name="agentID"></param> | 77 | /// <param name="agentID"></param> |
122 | public virtual void RemoveAvatar(LLUUID agentID) | 78 | public abstract void RemoveAvatar(LLUUID agentID); |
123 | { | 79 | |
124 | return ; | ||
125 | } | ||
126 | |||
127 | #endregion | 80 | #endregion |
128 | 81 | ||
129 | /// <summary> | 82 | /// <summary> |
130 | /// | 83 | /// |
131 | /// </summary> | 84 | /// </summary> |
132 | /// <returns></returns> | 85 | /// <returns></returns> |
133 | public virtual RegionInfo GetRegionInfo() | 86 | public virtual RegionInfo RegionInfo |
87 | { | ||
88 | get { return null; } | ||
89 | } | ||
90 | |||
91 | public object SyncRoot | ||
92 | { | ||
93 | get { return m_syncRoot; } | ||
94 | } | ||
95 | |||
96 | public uint NextLocalId | ||
134 | { | 97 | { |
135 | return null; | 98 | get { return m_nextLocalId++; } |
136 | } | 99 | } |
137 | 100 | ||
138 | #region Shutdown | 101 | #region Shutdown |
139 | /// <summary> | 102 | /// <summary> |
140 | /// Tidy before shutdown | 103 | /// Tidy before shutdown |
141 | /// </summary> | 104 | /// </summary> |
142 | public virtual void Close() | 105 | public abstract void Close(); |
143 | { | ||
144 | 106 | ||
145 | } | ||
146 | #endregion | 107 | #endregion |
108 | |||
109 | |||
147 | } | 110 | } |
148 | } | 111 | } |