diff options
Diffstat (limited to 'npc/functions/weather.txt')
-rw-r--r-- | npc/functions/weather.txt | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/npc/functions/weather.txt b/npc/functions/weather.txt index bdf58b191..0dacd8874 100644 --- a/npc/functions/weather.txt +++ b/npc/functions/weather.txt @@ -68,16 +68,19 @@ OnMinute45: .@hti = htiterator(.wcore); for(.@key$ = htinextkey(.@hti); hticheck(.@hti); .@key$ = htinextkey(.@hti)) { - - // PvP Maps are immune to weather changes (eg. during sieges) - // I could use getmapmask, but this is simpler. - if (getmapflag(.@key$, mf_pvp)) - continue; - // Local variables: .@key$ .@type .@r .@type$=htget(.wcore, .@key$); .@r=rand(0,10000); - .@mk=MASK_NONE; + + // Clear weather map masks + .@mk=getmapmask(.@key$); + + if (.@mk & MASK_RAIN) + .@mk=.@mk^MASK_RAIN; + if (.@mk & MASK_SANDSTORM) + .@mk=.@mk^MASK_SANDSTORM; + if (.@mk & MASK_SNOW) + .@mk=.@mk^MASK_SNOW; // Remove all current masks, and add rain/snow/sand if (.@type$ == "desert") { @@ -107,10 +110,6 @@ OnMinute45: if (!(.@mk & MASK_NONE)) .@mk=.@mk|MASK_NONE; - // Christmas Decor should not be here - if ($EVENT$ == "Christmas" && .@key$ == "009-1") - .@mk=.@mk|MASK_CHRISTMAS; - setmapmask .@key$, .@mk; // Is it night time? |