diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index a3f3d8f..8788ced 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1159,8 +1159,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1159 | while (!shuttingdown) | 1159 | while (!shuttingdown) |
1160 | { | 1160 | { |
1161 | TimeSpan SinceLastFrame = DateTime.UtcNow - m_lastupdate; | 1161 | TimeSpan SinceLastFrame = DateTime.UtcNow - m_lastupdate; |
1162 | physicsFPS = 0f; | 1162 | physicsFPS = 0f; |
1163 | 1163 | ||
1164 | maintc = Util.EnvironmentTickCount(); | 1164 | maintc = Util.EnvironmentTickCount(); |
1165 | int tmpFrameMS = maintc; | 1165 | int tmpFrameMS = maintc; |
1166 | tempOnRezMS = eventMS = backupMS = terrainMS = landMS = 0; | 1166 | tempOnRezMS = eventMS = backupMS = terrainMS = landMS = 0; |
@@ -1189,8 +1189,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1189 | physicsMS2 = Util.EnvironmentTickCountSubtract(tmpPhysicsMS2); | 1189 | physicsMS2 = Util.EnvironmentTickCountSubtract(tmpPhysicsMS2); |
1190 | 1190 | ||
1191 | if (m_frame % m_update_entitymovement == 0) | 1191 | if (m_frame % m_update_entitymovement == 0) |
1192 | m_sceneGraph.UpdateScenePresenceMovement(); | 1192 | m_sceneGraph.UpdateScenePresenceMovement(); |
1193 | 1193 | ||
1194 | int tmpPhysicsMS = Util.EnvironmentTickCount(); | 1194 | int tmpPhysicsMS = Util.EnvironmentTickCount(); |
1195 | if (m_frame % m_update_physics == 0) | 1195 | if (m_frame % m_update_physics == 0) |
1196 | { | 1196 | { |
@@ -1198,49 +1198,49 @@ namespace OpenSim.Region.Framework.Scenes | |||
1198 | physicsFPS = m_sceneGraph.UpdatePhysics(Math.Max(SinceLastFrame.TotalSeconds, m_timespan)); | 1198 | physicsFPS = m_sceneGraph.UpdatePhysics(Math.Max(SinceLastFrame.TotalSeconds, m_timespan)); |
1199 | if (SynchronizeScene != null) | 1199 | if (SynchronizeScene != null) |
1200 | SynchronizeScene(this); | 1200 | SynchronizeScene(this); |
1201 | } | 1201 | } |
1202 | physicsMS = Util.EnvironmentTickCountSubtract(tmpPhysicsMS); | 1202 | physicsMS = Util.EnvironmentTickCountSubtract(tmpPhysicsMS); |
1203 | 1203 | ||
1204 | // Delete temp-on-rez stuff | 1204 | // Delete temp-on-rez stuff |
1205 | if (m_frame % m_update_backup == 0) | 1205 | if (m_frame % m_update_backup == 0) |
1206 | { | 1206 | { |
1207 | int tmpTempOnRezMS = Util.EnvironmentTickCount(); | 1207 | int tmpTempOnRezMS = Util.EnvironmentTickCount(); |
1208 | CleanTempObjects(); | 1208 | CleanTempObjects(); |
1209 | tempOnRezMS = Util.EnvironmentTickCountSubtract(tmpTempOnRezMS); | 1209 | tempOnRezMS = Util.EnvironmentTickCountSubtract(tmpTempOnRezMS); |
1210 | } | 1210 | } |
1211 | 1211 | ||
1212 | if (RegionStatus != RegionStatus.SlaveScene) | 1212 | if (RegionStatus != RegionStatus.SlaveScene) |
1213 | { | 1213 | { |
1214 | if (m_frame % m_update_events == 0) | 1214 | if (m_frame % m_update_events == 0) |
1215 | { | 1215 | { |
1216 | int evMS = Util.EnvironmentTickCount(); | 1216 | int evMS = Util.EnvironmentTickCount(); |
1217 | UpdateEvents(); | 1217 | UpdateEvents(); |
1218 | eventMS = Util.EnvironmentTickCountSubtract(evMS); ; | 1218 | eventMS = Util.EnvironmentTickCountSubtract(evMS); ; |
1219 | } | 1219 | } |
1220 | 1220 | ||
1221 | if (m_frame % m_update_backup == 0) | 1221 | if (m_frame % m_update_backup == 0) |
1222 | { | 1222 | { |
1223 | int backMS = Util.EnvironmentTickCount(); | 1223 | int backMS = Util.EnvironmentTickCount(); |
1224 | UpdateStorageBackup(); | 1224 | UpdateStorageBackup(); |
1225 | backupMS = Util.EnvironmentTickCountSubtract(backMS); | 1225 | backupMS = Util.EnvironmentTickCountSubtract(backMS); |
1226 | } | 1226 | } |
1227 | 1227 | ||
1228 | if (m_frame % m_update_terrain == 0) | 1228 | if (m_frame % m_update_terrain == 0) |
1229 | { | 1229 | { |
1230 | int terMS = Util.EnvironmentTickCount(); | 1230 | int terMS = Util.EnvironmentTickCount(); |
1231 | UpdateTerrain(); | 1231 | UpdateTerrain(); |
1232 | terrainMS = Util.EnvironmentTickCountSubtract(terMS); | 1232 | terrainMS = Util.EnvironmentTickCountSubtract(terMS); |
1233 | } | 1233 | } |
1234 | 1234 | ||
1235 | if (m_frame % m_update_land == 0) | 1235 | if (m_frame % m_update_land == 0) |
1236 | { | 1236 | { |
1237 | int ldMS = Util.EnvironmentTickCount(); | 1237 | int ldMS = Util.EnvironmentTickCount(); |
1238 | UpdateLand(); | 1238 | UpdateLand(); |
1239 | landMS = Util.EnvironmentTickCountSubtract(ldMS); | 1239 | landMS = Util.EnvironmentTickCountSubtract(ldMS); |
1240 | } | 1240 | } |
1241 | 1241 | ||
1242 | frameMS = Util.EnvironmentTickCountSubtract(tmpFrameMS); | 1242 | frameMS = Util.EnvironmentTickCountSubtract(tmpFrameMS); |
1243 | otherMS = tempOnRezMS + eventMS + backupMS + terrainMS + landMS; | 1243 | otherMS = tempOnRezMS + eventMS + backupMS + terrainMS + landMS; |
1244 | lastCompletedFrame = Util.EnvironmentTickCount(); | 1244 | lastCompletedFrame = Util.EnvironmentTickCount(); |
1245 | 1245 | ||
1246 | // if (m_frame%m_update_avatars == 0) | 1246 | // if (m_frame%m_update_avatars == 0) |
@@ -1293,8 +1293,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1293 | finally | 1293 | finally |
1294 | { | 1294 | { |
1295 | m_lastupdate = DateTime.UtcNow; | 1295 | m_lastupdate = DateTime.UtcNow; |
1296 | } | 1296 | } |
1297 | 1297 | ||
1298 | maintc = Util.EnvironmentTickCountSubtract(maintc); | 1298 | maintc = Util.EnvironmentTickCountSubtract(maintc); |
1299 | maintc = (int)(m_timespan * 1000) - maintc; | 1299 | maintc = (int)(m_timespan * 1000) - maintc; |
1300 | 1300 | ||
@@ -2581,8 +2581,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2581 | sp.IsChildAgent = false; | 2581 | sp.IsChildAgent = false; |
2582 | Util.FireAndForget(delegate(object o) { sp.RezAttachments(); }); | 2582 | Util.FireAndForget(delegate(object o) { sp.RezAttachments(); }); |
2583 | } | 2583 | } |
2584 | } | 2584 | } |
2585 | 2585 | ||
2586 | m_LastLogin = Util.EnvironmentTickCount(); | 2586 | m_LastLogin = Util.EnvironmentTickCount(); |
2587 | EventManager.TriggerOnNewClient(client); | 2587 | EventManager.TriggerOnNewClient(client); |
2588 | } | 2588 | } |
@@ -4650,15 +4650,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
4650 | // 3 = We have seen a new user enter within the past 4 minutes | 4650 | // 3 = We have seen a new user enter within the past 4 minutes |
4651 | // which can be seen as positive confirmation of sim health | 4651 | // which can be seen as positive confirmation of sim health |
4652 | // | 4652 | // |
4653 | int health=1; // Start at 1, means we're up | 4653 | int health=1; // Start at 1, means we're up |
4654 | 4654 | ||
4655 | if ((Util.EnvironmentTickCountSubtract(m_lastUpdate)) < 1000) | 4655 | if ((Util.EnvironmentTickCountSubtract(m_lastUpdate)) < 1000) |
4656 | health+=1; | 4656 | health+=1; |
4657 | else | 4657 | else |
4658 | return health; | 4658 | return health; |
4659 | 4659 | ||
4660 | // A login in the last 4 mins? We can't be doing too badly | 4660 | // A login in the last 4 mins? We can't be doing too badly |
4661 | // | 4661 | // |
4662 | if ((Util.EnvironmentTickCountSubtract(m_LastLogin)) < 240000) | 4662 | if ((Util.EnvironmentTickCountSubtract(m_LastLogin)) < 240000) |
4663 | health++; | 4663 | health++; |
4664 | else | 4664 | else |
@@ -4855,8 +4855,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4855 | private void CheckHeartbeat() | 4855 | private void CheckHeartbeat() |
4856 | { | 4856 | { |
4857 | if (m_firstHeartbeat) | 4857 | if (m_firstHeartbeat) |
4858 | return; | 4858 | return; |
4859 | 4859 | ||
4860 | if (Util.EnvironmentTickCountSubtract(m_lastUpdate) > 2000) | 4860 | if (Util.EnvironmentTickCountSubtract(m_lastUpdate) > 2000) |
4861 | StartTimer(); | 4861 | StartTimer(); |
4862 | } | 4862 | } |