diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Terrain')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs index 0209d16..fa357f5 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs | |||
@@ -229,11 +229,11 @@ namespace OpenSim.Region.CoreModules.World.Terrain | |||
229 | } | 229 | } |
230 | 230 | ||
231 | m_scene.RegisterModuleInterface<ITerrainModule>(this); | 231 | m_scene.RegisterModuleInterface<ITerrainModule>(this); |
232 | m_scene.EventManager.OnFrame += EventManager_OnFrame; | ||
233 | m_scene.EventManager.OnNewClient += EventManager_OnNewClient; | 232 | m_scene.EventManager.OnNewClient += EventManager_OnNewClient; |
234 | m_scene.EventManager.OnClientClosed += EventManager_OnClientClosed; | 233 | m_scene.EventManager.OnClientClosed += EventManager_OnClientClosed; |
235 | m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; | 234 | m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; |
236 | m_scene.EventManager.OnTerrainTick += EventManager_OnTerrainTick; | 235 | m_scene.EventManager.OnTerrainTick += EventManager_OnTerrainTick; |
236 | m_scene.EventManager.OnTerrainCheckUpdates += EventManager_TerrainCheckUpdates; | ||
237 | } | 237 | } |
238 | 238 | ||
239 | InstallDefaultEffects(); | 239 | InstallDefaultEffects(); |
@@ -272,7 +272,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain | |||
272 | // remove the commands | 272 | // remove the commands |
273 | m_scene.UnregisterModuleCommander(m_commander.Name); | 273 | m_scene.UnregisterModuleCommander(m_commander.Name); |
274 | // remove the event-handlers | 274 | // remove the event-handlers |
275 | m_scene.EventManager.OnFrame -= EventManager_OnFrame; | 275 | m_scene.EventManager.OnTerrainCheckUpdates -= EventManager_TerrainCheckUpdates; |
276 | m_scene.EventManager.OnTerrainTick -= EventManager_OnTerrainTick; | 276 | m_scene.EventManager.OnTerrainTick -= EventManager_OnTerrainTick; |
277 | m_scene.EventManager.OnPluginConsole -= EventManager_OnPluginConsole; | 277 | m_scene.EventManager.OnPluginConsole -= EventManager_OnPluginConsole; |
278 | m_scene.EventManager.OnClientClosed -= EventManager_OnClientClosed; | 278 | m_scene.EventManager.OnClientClosed -= EventManager_OnClientClosed; |
@@ -759,13 +759,12 @@ namespace OpenSim.Region.CoreModules.World.Terrain | |||
759 | } | 759 | } |
760 | 760 | ||
761 | /// <summary> | 761 | /// <summary> |
762 | /// Called before processing of every simulation frame. | ||
763 | /// This is used to check to see of any of the terrain is tainted and, if so, schedule | 762 | /// This is used to check to see of any of the terrain is tainted and, if so, schedule |
764 | /// updates for all the presences. | 763 | /// updates for all the presences. |
765 | /// This also checks to see if there are updates that need to be sent for each presence. | 764 | /// This also checks to see if there are updates that need to be sent for each presence. |
766 | /// This is where the logic is to send terrain updates to clients. | 765 | /// This is where the logic is to send terrain updates to clients. |
767 | /// </summary> | 766 | /// </summary> |
768 | private void EventManager_OnFrame() | 767 | private void EventManager_TerrainCheckUpdates() |
769 | { | 768 | { |
770 | // this needs fixing | 769 | // this needs fixing |
771 | TerrainData terrData = m_channel.GetTerrainData(); | 770 | TerrainData terrData = m_channel.GetTerrainData(); |
@@ -775,7 +774,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain | |||
775 | { | 774 | { |
776 | for (int y = 0; y < terrData.SizeY; y += Constants.TerrainPatchSize) | 775 | for (int y = 0; y < terrData.SizeY; y += Constants.TerrainPatchSize) |
777 | { | 776 | { |
778 | if (terrData.IsTaintedAt(x, y)) | 777 | if (terrData.IsTaintedAt(x, y,true)) |
779 | { | 778 | { |
780 | // Found a patch that was modified. Push this flag into the clients. | 779 | // Found a patch that was modified. Push this flag into the clients. |
781 | SendToClients(terrData, x, y); | 780 | SendToClients(terrData, x, y); |