summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c10
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;
}