diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SimStatsReporter.cs | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs index d82c09b..bfdacfe 100644 --- a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs | |||
@@ -101,17 +101,35 @@ namespace OpenSim.Region.Environment.Scenes | |||
101 | } | 101 | } |
102 | statpack.Region.ObjectCapacity = (uint)15000; | 102 | statpack.Region.ObjectCapacity = (uint)15000; |
103 | 103 | ||
104 | #region various statistic googly moogly | ||
105 | float simfps = (int)(m_fps * 5); | ||
106 | |||
107 | if (simfps > 45) | ||
108 | simfps = simfps - (simfps - 45); | ||
109 | if (simfps < 0) | ||
110 | simfps = 0; | ||
111 | |||
112 | float physfps = (m_pfps / statsUpdatesEveryMS); | ||
113 | |||
114 | if (physfps > 50) | ||
115 | physfps = physfps - (physfps - 50); | ||
116 | |||
117 | if (physfps < 0) | ||
118 | physfps = 0; | ||
119 | |||
120 | #endregion | ||
121 | |||
104 | sb[0] = new SimStatsPacket.StatBlock(); | 122 | sb[0] = new SimStatsPacket.StatBlock(); |
105 | sb[0].StatID = (uint)Stats.TimeDilation; | 123 | sb[0].StatID = (uint)Stats.TimeDilation; |
106 | sb[0].StatValue = (m_timeDilation); | 124 | sb[0].StatValue = (m_timeDilation); |
107 | 125 | ||
108 | sb[1] = new SimStatsPacket.StatBlock(); | 126 | sb[1] = new SimStatsPacket.StatBlock(); |
109 | sb[1].StatID = (uint)Stats.SimFPS; | 127 | sb[1].StatID = (uint)Stats.SimFPS; |
110 | sb[1].StatValue = (int)(m_fps * 5); | 128 | sb[1].StatValue = simfps; |
111 | 129 | ||
112 | sb[2] = new SimStatsPacket.StatBlock(); | 130 | sb[2] = new SimStatsPacket.StatBlock(); |
113 | sb[2].StatID = (uint)Stats.PhysicsFPS; | 131 | sb[2].StatID = (uint)Stats.PhysicsFPS; |
114 | sb[2].StatValue = (m_pfps / statsUpdatesEveryMS); | 132 | sb[2].StatValue = physfps; |
115 | 133 | ||
116 | sb[3] = new SimStatsPacket.StatBlock(); | 134 | sb[3] = new SimStatsPacket.StatBlock(); |
117 | sb[3].StatID = (uint)Stats.AgentUpdates; | 135 | sb[3].StatID = (uint)Stats.AgentUpdates; |
@@ -168,6 +186,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
168 | public void SetTimeDilation(float td) | 186 | public void SetTimeDilation(float td) |
169 | { | 187 | { |
170 | m_timeDilation = td; | 188 | m_timeDilation = td; |
189 | if (m_timeDilation > 1.0f) | ||
190 | m_timeDilation = (m_timeDilation - (m_timeDilation - 0.91f)); | ||
191 | |||
192 | if (m_timeDilation < 0) | ||
193 | m_timeDilation = 0.0f; | ||
194 | |||
171 | } | 195 | } |
172 | public void SetRootAgents(int rootAgents) | 196 | public void SetRootAgents(int rootAgents) |
173 | { | 197 | { |