summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mapdef.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/mapdef.cc')
-rw-r--r--crawl-ref/source/mapdef.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc
index 57302d789f..9954147c62 100644
--- a/crawl-ref/source/mapdef.cc
+++ b/crawl-ref/source/mapdef.cc
@@ -1184,10 +1184,10 @@ dlua_set_map::~dlua_set_map()
map_def::map_def()
: name(), tags(), place(), depths(), orient(), chance(), weight(),
- welcome_messages(), map(), mons(), items(), keyspecs(),
- prelude("dlprelude"), main("dlmain"), validate("dlvalidate"),
- veto("dlveto"), rock_colour(BLACK), floor_colour(BLACK),
- index_only(false), cache_offset(0L)
+ weight_depth_mult(), weight_depth_div(), welcome_messages(), map(),
+ mons(), items(), keyspecs(), prelude("dlprelude"), main("dlmain"),
+ validate("dlvalidate"), veto("dlveto"), rock_colour(BLACK),
+ floor_colour(BLACK), index_only(false), cache_offset(0L)
{
init();
}
@@ -1239,6 +1239,12 @@ void map_def::reinit()
// eligible vaults).
weight = 10;
+ // How to modify weight based on absolte dungeon depth. This
+ // needs to be done in the C++ code since the map's lua code doesnt'
+ // get called again each time the depth changes.
+ weight_depth_mult = 0;
+ weight_depth_div = 1;
+
// Clearing the map also zaps map transforms.
map.clear();
mons.clear();