summaryrefslogtreecommitdiff
path: root/src/q_fireprof.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2019-02-15 19:20:25 +0100
committerBardur Arantsson <bardur@scientician.net>2019-02-15 19:20:25 +0100
commit23d4052eb88176ceb3cb3d769b09aa46a56e79cc (patch)
tree0ed44b420f012954e4cbb6d5ae401b4f972e2497 /src/q_fireprof.cc
parent2e84ed7ccc2c5d217729e4996bb0e833c0f89638 (diff)
Move 'dungeon_flags' global to Game struct
We can get rid of a couple of icky macros, and at least it's a little bit less global now.
Diffstat (limited to 'src/q_fireprof.cc')
-rw-r--r--src/q_fireprof.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/q_fireprof.cc b/src/q_fireprof.cc
index bb7b54c3..a351bce8 100644
--- a/src/q_fireprof.cc
+++ b/src/q_fireprof.cc
@@ -5,6 +5,7 @@
#include "feature_flag.hpp"
#include "feature_type.hpp"
#include "hook_get_in.hpp"
+#include "hook_quest_gen_in.hpp"
#include "hooks.hpp"
#include "lua_bind.hpp"
#include "object1.hpp"
@@ -458,9 +459,10 @@ std::string quest_fireproof_describe()
return w.str();
}
-static bool fireproof_gen_hook(void *, void *, void *)
+static bool fireproof_gen_hook(void *, void *in_, void *)
{
fireproof_settings const *settings = fireproof_get_settings();
+ auto in = static_cast<hook_quest_gen_in *>(in_);
/* Only if player doing this quest */
if (p_ptr->inside_quest != QUEST_FIREPROOF)
@@ -478,7 +480,7 @@ static bool fireproof_gen_hook(void *, void *, void *)
}
/* no teleport */
- dungeon_flags = DF_NO_TELEPORT;
+ in->dungeon_flags_ref |= DF_NO_TELEPORT;
/* create quest item */
{