summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-02-11 21:15:53 -0300
committerJesusaves <cpntb1@ymail.com>2021-02-11 21:15:53 -0300
commit0bba734d881344214a54cba2e707393e0acc0f11 (patch)
treed8ae4fb49e0d94e528efe4a6663fd3a5f825799b
parent3acfc3ab2250b821f520c9db2687b90290f26921 (diff)
downloadserverdata-0bba734d881344214a54cba2e707393e0acc0f11.tar.gz
serverdata-0bba734d881344214a54cba2e707393e0acc0f11.tar.bz2
serverdata-0bba734d881344214a54cba2e707393e0acc0f11.tar.xz
serverdata-0bba734d881344214a54cba2e707393e0acc0f11.zip
Disable Weather & Event Cycles on Test Server.
Save some RAM, CPU and Chat Logs.
-rw-r--r--npc/functions/event.txt7
-rw-r--r--npc/functions/weather.txt6
2 files changed, 11 insertions, 2 deletions
diff --git a/npc/functions/event.txt b/npc/functions/event.txt
index 8e8fbb1ce..733658c91 100644
--- a/npc/functions/event.txt
+++ b/npc/functions/event.txt
@@ -365,6 +365,11 @@ OnInit:
// Check for events every midnight
OnClock0000:
+ // No events on test server
+ if (debug && !$@GM_OVERRIDE)
+ end;
+
+ // Prepare variables
.@d=gettime(GETTIME_DAYOFMONTH);
.@m=gettime(GETTIME_MONTH);
.@o=gettime(GETTIME_WEEKDAY); // Resets at 0 (sunday)
@@ -381,7 +386,7 @@ OnClock0000:
debugmes "EVENT CORE, the %02d/%02d", .@d, .@m;
// Is there another event this week?
- if (!debug && !$HARDCORE && .@o == MONDAY && !.@isinit) {
+ if (!$HARDCORE && .@o == MONDAY && !.@isinit) {
.@dofy=true;
.@confname$=".conf_"+.@m;
diff --git a/npc/functions/weather.txt b/npc/functions/weather.txt
index db73f93e5..729c639ba 100644
--- a/npc/functions/weather.txt
+++ b/npc/functions/weather.txt
@@ -113,6 +113,10 @@ OnMinute00:
OnMinute15:
OnMinute30:
OnMinute45:
+ // There is no weather in test servers
+ if (debug && !$@GM_OVERRIDE)
+ end;
+
//debugmes "[Weather.sys] Starting to regen";
.@hti = htiterator(.wcore);
@@ -200,7 +204,7 @@ OnMinute45:
//debugmes "[Weather.sys] Regenerated";
// Hardcore: Skip day/night cycles
- if ($HARDCORE || debug) {
+ if ($HARDCORE || $@GM_OVERRIDE) {
$@WEATHER_NIGHT=is_night(true);
end;
}