diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index 6541256..8033c90 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | |||
@@ -959,9 +959,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
959 | // script engine to run the next event. | 959 | // script engine to run the next event. |
960 | lock (EventQueue) | 960 | lock (EventQueue) |
961 | { | 961 | { |
962 | EventsProcessed++; | 962 | // Increase processed events counter and prevent wrap; |
963 | if (++EventsProcessed == 1000000) | ||
964 | EventsProcessed = 100000; | ||
963 | 965 | ||
964 | if ((EventsProcessed == 1000) || (EventsProcessed == 10000) || ((EventsProcessed % 100000) == 0)) | 966 | if ((EventsProcessed % 100000) == 0 && DebugLevel > 0) |
965 | { | 967 | { |
966 | m_log.DebugFormat("[SCRIPT INSTANCE]: Script \"{0}\" (Object \"{1}\" {2} @ {3}.{4}, Item ID {5}, Asset {6}) in event {7}: processed {8:n0} script events", | 968 | m_log.DebugFormat("[SCRIPT INSTANCE]: Script \"{0}\" (Object \"{1}\" {2} @ {3}.{4}, Item ID {5}, Asset {6}) in event {7}: processed {8:n0} script events", |
967 | ScriptTask.Name, | 969 | ScriptTask.Name, |