diff options
author | Jeff Ames | 2008-05-14 05:11:23 +0000 |
---|---|---|
committer | Jeff Ames | 2008-05-14 05:11:23 +0000 |
commit | c995d60d37032db3198b8496e186aa7a892dc7a8 (patch) | |
tree | 826147e66f61c812897d9b0acdb16ebfeb30d4d3 /OpenSim/Region/Environment/Modules | |
parent | * Added 3 warnings in response to the warnings. Adam, read the warnings. (diff) | |
download | opensim-SC-c995d60d37032db3198b8496e186aa7a892dc7a8.zip opensim-SC-c995d60d37032db3198b8496e186aa7a892dc7a8.tar.gz opensim-SC-c995d60d37032db3198b8496e186aa7a892dc7a8.tar.bz2 opensim-SC-c995d60d37032db3198b8496e186aa7a892dc7a8.tar.xz |
Formatting cleanup.
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
4 files changed, 36 insertions, 42 deletions
diff --git a/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs b/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs index c7ee233..1b50bbd 100644 --- a/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs +++ b/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs | |||
@@ -171,7 +171,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.Xfer | |||
171 | { | 171 | { |
172 | if (Data.Length < 1000) | 172 | if (Data.Length < 1000) |
173 | { | 173 | { |
174 | // for now (testing ) we only support files under 1000 bytes | 174 | // for now (testing) we only support files under 1000 bytes |
175 | byte[] transferData = new byte[Data.Length + 4]; | 175 | byte[] transferData = new byte[Data.Length + 4]; |
176 | Array.Copy(Helpers.IntToBytes(Data.Length), 0, transferData, 0, 4); | 176 | Array.Copy(Helpers.IntToBytes(Data.Length), 0, transferData, 0, 4); |
177 | Array.Copy(Data, 0, transferData, 4, Data.Length); | 177 | Array.Copy(Data, 0, transferData, 4, Data.Length); |
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs index 0236e5f..b319370 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs | |||
@@ -278,7 +278,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
278 | list.Add(entry.AgentID); | 278 | list.Add(entry.AgentID); |
279 | } | 279 | } |
280 | } | 280 | } |
281 | if(list.Count == 0) | 281 | if (list.Count == 0) |
282 | { | 282 | { |
283 | list.Add(LLUUID.Zero); | 283 | list.Add(LLUUID.Zero); |
284 | } | 284 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs index 2900b8c..44f5c2d 100644 --- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs | |||
@@ -220,7 +220,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions | |||
220 | } | 220 | } |
221 | protected void DebugPermissionInformation(string permissionCalled) | 221 | protected void DebugPermissionInformation(string permissionCalled) |
222 | { | 222 | { |
223 | if(m_debugPermissions) | 223 | if (m_debugPermissions) |
224 | m_log.Info("[PERMISSIONS]: " + permissionCalled + " was called from " + m_scene.RegionInfo.RegionName); | 224 | m_log.Info("[PERMISSIONS]: " + permissionCalled + " was called from " + m_scene.RegionInfo.RegionName); |
225 | } | 225 | } |
226 | 226 | ||
@@ -240,7 +240,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions | |||
240 | if (user != LLUUID.Zero) | 240 | if (user != LLUUID.Zero) |
241 | { | 241 | { |
242 | LLUUID[] estatemanagers = m_scene.RegionInfo.EstateSettings.estateManagers; | 242 | LLUUID[] estatemanagers = m_scene.RegionInfo.EstateSettings.estateManagers; |
243 | foreach(LLUUID estatemanager in estatemanagers) | 243 | foreach (LLUUID estatemanager in estatemanagers) |
244 | { | 244 | { |
245 | if (estatemanager == user) | 245 | if (estatemanager == user) |
246 | return true; | 246 | return true; |
diff --git a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs index 0314562..beb74ce 100644 --- a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs | |||
@@ -65,7 +65,7 @@ namespace OpenSim.Region.Environment.Modules | |||
65 | private double d_day_length = 4; // A VW day is 4 RW hours long | 65 | private double d_day_length = 4; // A VW day is 4 RW hours long |
66 | private int d_year_length = 60; // There are 60 VW days in a VW year | 66 | private int d_year_length = 60; // There are 60 VW days in a VW year |
67 | private double d_day_night = 0.45; // axis offset: ratio of light-to-dark, approx 1:3 | 67 | private double d_day_night = 0.45; // axis offset: ratio of light-to-dark, approx 1:3 |
68 | private double d_longitude = -73.53; | 68 | private double d_longitude = -73.53; |
69 | private double d_latitude = 41.29; | 69 | private double d_latitude = 41.29; |
70 | 70 | ||
71 | // Frame counter | 71 | // Frame counter |
@@ -155,48 +155,44 @@ namespace OpenSim.Region.Environment.Modules | |||
155 | m_longitude = d_longitude; | 155 | m_longitude = d_longitude; |
156 | } | 156 | } |
157 | 157 | ||
158 | switch(m_mode) | 158 | switch (m_mode) |
159 | { | 159 | { |
160 | case "T1": | ||
161 | default: | ||
162 | case "SL": | ||
163 | // Time taken to complete a cycle (day and season) | ||
160 | 164 | ||
161 | case "T1" : | 165 | SecondsPerSunCycle = (uint) (m_day_length * 60 * 60); |
166 | SecondsPerYear = (uint) (SecondsPerSunCycle*m_year_length); | ||
162 | 167 | ||
163 | default : | 168 | // Ration of real-to-virtual time |
164 | 169 | ||
165 | case "SL" : | 170 | VWTimeRatio = 24/m_day_length; |
166 | // Time taken to complete a cycle (day and season) | ||
167 | 171 | ||
168 | SecondsPerSunCycle = (uint) (m_day_length * 60 * 60); | 172 | // Speed of rotation needed to complete a cycle in the |
169 | SecondsPerYear = (uint) (SecondsPerSunCycle*m_year_length); | 173 | // designated period (day and season) |
170 | 174 | ||
171 | // Ration of real-to-virtual time | 175 | SunSpeed = SunCycle/SecondsPerSunCycle; |
176 | SeasonSpeed = SeasonalCycle/SecondsPerYear; | ||
172 | 177 | ||
173 | VWTimeRatio = 24/m_day_length; | 178 | // Horizon translation |
174 | 179 | ||
175 | // Speed of rotation needed to complete a cycle in the | 180 | HorizonShift = m_day_night; // Z axis translation |
176 | // designated period (day and season) | 181 | HoursToRadians = (SunCycle/24)*VWTimeRatio; |
177 | 182 | ||
178 | SunSpeed = SunCycle/SecondsPerSunCycle; | 183 | // Insert our event handling hooks |
179 | SeasonSpeed = SeasonalCycle/SecondsPerYear; | ||
180 | 184 | ||
181 | // Horizon translation | 185 | scene.EventManager.OnFrame += SunUpdate; |
186 | scene.EventManager.OnNewClient += SunToClient; | ||
182 | 187 | ||
183 | HorizonShift = m_day_night; // Z axis translation | 188 | ready = true; |
184 | HoursToRadians = (SunCycle/24)*VWTimeRatio; | ||
185 | 189 | ||
186 | // Insert our event handling hooks | 190 | m_log.Debug("[SUN] Mode is "+m_mode); |
187 | 191 | m_log.Debug("[SUN] Initialization completed. Day is "+SecondsPerSunCycle+" seconds, and year is "+m_year_length+" days"); | |
188 | scene.EventManager.OnFrame += SunUpdate; | 192 | m_log.Debug("[SUN] Axis offset is "+m_day_night); |
189 | scene.EventManager.OnNewClient += SunToClient; | 193 | m_log.Debug("[SUN] Positional data updated every "+m_frame_mod+" frames"); |
190 | |||
191 | ready = true; | ||
192 | |||
193 | m_log.Debug("[SUN] Mode is "+m_mode); | ||
194 | m_log.Debug("[SUN] Initialization completed. Day is "+SecondsPerSunCycle+" seconds, and year is "+m_year_length+" days"); | ||
195 | m_log.Debug("[SUN] Axis offset is "+m_day_night); | ||
196 | m_log.Debug("[SUN] Positional data updated every "+m_frame_mod+" frames"); | ||
197 | 194 | ||
198 | break; | 195 | break; |
199 | |||
200 | } | 196 | } |
201 | } | 197 | } |
202 | 198 | ||
@@ -224,21 +220,20 @@ namespace OpenSim.Region.Environment.Modules | |||
224 | 220 | ||
225 | public void SunToClient(IClientAPI client) | 221 | public void SunToClient(IClientAPI client) |
226 | { | 222 | { |
227 | if(m_mode != "T1") | 223 | if (m_mode != "T1") |
228 | { | 224 | { |
229 | if(ready) | 225 | if (ready) |
230 | { | 226 | { |
231 | GenSunPos(); // Generate shared values once | 227 | GenSunPos(); // Generate shared values once |
232 | client.SendSunPos(Position, Velocity, CurrentTime, SecondsPerSunCycle, SecondsPerYear, OrbitalPosition); | 228 | client.SendSunPos(Position, Velocity, CurrentTime, SecondsPerSunCycle, SecondsPerYear, OrbitalPosition); |
233 | m_log.Debug("[SUN] Initial update for new client"); | 229 | m_log.Debug("[SUN] Initial update for new client"); |
234 | } | 230 | } |
235 | } | 231 | } |
236 | } | 232 | } |
237 | 233 | ||
238 | public void SunUpdate() | 234 | public void SunUpdate() |
239 | { | 235 | { |
240 | 236 | if (((m_frame++%m_frame_mod) != 0) || !ready) | |
241 | if(((m_frame++%m_frame_mod) != 0) || !ready) | ||
242 | { | 237 | { |
243 | return; | 238 | return; |
244 | } | 239 | } |
@@ -253,7 +248,6 @@ namespace OpenSim.Region.Environment.Modules | |||
253 | 248 | ||
254 | // set estate settings for region access to sun position | 249 | // set estate settings for region access to sun position |
255 | m_scene.RegionInfo.EstateSettings.sunPosition = Position; | 250 | m_scene.RegionInfo.EstateSettings.sunPosition = Position; |
256 | |||
257 | } | 251 | } |
258 | 252 | ||
259 | /// <summary> | 253 | /// <summary> |