summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mapmark.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-08-18 19:19:21 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-08-18 19:19:21 +0000
commit2380cbb78d346fa9413c739eeaf20e3171b04221 (patch)
tree76fbad894e146ddffd6015a300da8460679044f5 /crawl-ref/source/mapmark.cc
parent31998f2e74c5d677c4880447131a45ef7d4abc73 (diff)
downloadcrawl-ref-2380cbb78d346fa9413c739eeaf20e3171b04221.tar.gz
crawl-ref-2380cbb78d346fa9413c739eeaf20e3171b04221.zip
Fixed crash when using travel to waypoint or Lugonu's Corruption on a level
with a Lua marker. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2016 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mapmark.cc')
-rw-r--r--crawl-ref/source/mapmark.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/crawl-ref/source/mapmark.cc b/crawl-ref/source/mapmark.cc
index ea8325f264..a761568772 100644
--- a/crawl-ref/source/mapmark.cc
+++ b/crawl-ref/source/mapmark.cc
@@ -43,7 +43,7 @@ map_marker::~map_marker()
{
}
-void map_marker::activate()
+void map_marker::activate(bool)
{
}
@@ -184,6 +184,7 @@ map_lua_marker::~map_lua_marker()
map_marker *map_lua_marker::clone() const
{
map_lua_marker *copy = new map_lua_marker();
+ copy->pos = pos;
if (get_table())
copy->check_register_table();
return copy;
@@ -309,10 +310,12 @@ bool map_lua_marker::callfn(const char *fn, bool warn_err, int args) const
return (res);
}
-void map_lua_marker::activate()
+void map_lua_marker::activate(bool verbose)
{
lua_stack_cleaner clean(dlua);
- callfn("activate", true);
+ push_fn_args("activate");
+ lua_pushboolean(dlua, verbose);
+ callfn("activate", true, 4);
}
void map_lua_marker::notify_dgn_event(const dgn_event &e)
@@ -456,12 +459,12 @@ void map_markers::init_from(const map_markers &c)
}
}
-void map_markers::activate_all()
+void map_markers::activate_all(bool verbose)
{
for (dgn_marker_map::iterator i = markers.begin();
i != markers.end(); ++i)
{
- i->second->activate();
+ i->second->activate(verbose);
}
}