summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-04-25 17:22:28 +0200
committerGitHub <noreply@github.com>2018-04-25 17:22:28 +0200
commitd8c6912572f60284d61d819b20031a75f3d9b25f (patch)
tree7c89401bd80b69f8a4221c343fd73234e02d50b7 /src/map/script.c
parentefeb386abc51baffa561f32d7d3b30868af767cd (diff)
parentc45d7f983bfe8034e11f1d3e5b9b4404afec6b31 (diff)
downloadhercules-d8c6912572f60284d61d819b20031a75f3d9b25f.tar.gz
hercules-d8c6912572f60284d61d819b20031a75f3d9b25f.tar.bz2
hercules-d8c6912572f60284d61d819b20031a75f3d9b25f.tar.xz
hercules-d8c6912572f60284d61d819b20031a75f3d9b25f.zip
Merge pull request #2017 from AnnieRuru/32_delwall
*delwall now give a friendly warning to remind non-existent wall
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c
index d11b6741a..3c5f4a232 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -13998,9 +13998,15 @@ BUILDIN(setwall) {
map->iwall_set(m, x, y, size, dir, shootable, name);
return true;
}
-BUILDIN(delwall) {
+
+BUILDIN(delwall)
+{
const char *name = script_getstr(st,2);
- map->iwall_remove(name);
+
+ if (!map->iwall_remove(name)) {
+ ShowWarning("buildin_delwall: Non-existent '%s' provided.\n", name);
+ return false;
+ }
return true;
}