diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-11-28 15:41:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-11-28 15:42:39 +0300 |
commit | 905642f167858017e1fa1582f6253da3c9a8ff97 (patch) | |
tree | 792d0cd12bab53cb03addb634ec0baa1cc2171ea /src/map/script.c | |
parent | 1ea90a6de5d0dc506b4be96ded4fe50e27df7e2b (diff) | |
download | plugin-905642f167858017e1fa1582f6253da3c9a8ff97.tar.gz plugin-905642f167858017e1fa1582f6253da3c9a8ff97.tar.bz2 plugin-905642f167858017e1fa1582f6253da3c9a8ff97.tar.xz plugin-905642f167858017e1fa1582f6253da3c9a8ff97.zip |
Send map mask to clients.
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 10 |
1 files changed, 10 insertions, 0 deletions
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; } |