From 905642f167858017e1fa1582f6253da3c9a8ff97 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 28 Nov 2014 15:41:01 +0300 Subject: Send map mask to clients. --- src/map/script.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/map/script.c') diff --git a/src/map/script.c b/src/map/script.c index 93ca052..676d598 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -445,7 +445,10 @@ BUILDIN(setMapMask) getMapData(m); const int val = script_getnum(st, 3); + const unsigned int old = mapData->mask; mapData->mask = val; + if (old != mapData->mask) + send_mapmask_brodcast(m, mapData->mask); return true; } @@ -478,7 +481,11 @@ BUILDIN(addMapMask) return false; getMapData(m); const int val = script_getnum(st, 3); + const unsigned int old = mapData->mask; mapData->mask |= val; + if (old != mapData->mask) + send_mapmask_brodcast(m, mapData->mask); + return true; } @@ -492,7 +499,10 @@ BUILDIN(removeMapMask) return false; getMapData(m); const int val = script_getnum(st, 3); + const unsigned int old = mapData->mask; mapData->mask |= val; mapData->mask ^= val; + if (old != mapData->mask) + send_mapmask_brodcast(m, mapData->mask); return true; } -- cgit v1.2.3-70-g09d2