diff options
author | Neil Moore <neil@s-z.org> | 2014-05-15 03:32:28 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2014-05-15 03:37:17 -0400 |
commit | 000f67cce8bbb7478a713f7215a347922db041db (patch) | |
tree | 5ff3c0b38be06c6a59f0a2b2b47209d89474bb5b /crawl-ref/source/mapdef.cc | |
parent | 6590ef6419ab8495ad968d82e1836f65953a4536 (diff) | |
download | crawl-ref-000f67cce8bbb7478a713f7215a347922db041db.tar.gz crawl-ref-000f67cce8bbb7478a713f7215a347922db041db.zip |
Allow "none" alternatives to work with TILE: and friends.
The level-making documentation gave a few examples using "/ none", but
that did not work correctly and could lead to crashes (depending on
uninitialised variables).
Diffstat (limited to 'crawl-ref/source/mapdef.cc')
-rw-r--r-- | crawl-ref/source/mapdef.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc index 4f71a41e05..6d7fee8b5b 100644 --- a/crawl-ref/source/mapdef.cc +++ b/crawl-ref/source/mapdef.cc @@ -610,7 +610,7 @@ void map_lines::apply_grid_overlay(const coord_def &c) bool has_floor = false, has_rock = false; string name = (*overlay)(x, y).floortile; - if (!name.empty()) + if (!name.empty() && name != "none") { env.tile_flv(gc).floor_idx = store_tilename_get_index(name); @@ -625,7 +625,7 @@ void map_lines::apply_grid_overlay(const coord_def &c) } name = (*overlay)(x, y).rocktile; - if (!name.empty()) + if (!name.empty() && name != "none") { env.tile_flv(gc).wall_idx = store_tilename_get_index(name); @@ -640,7 +640,7 @@ void map_lines::apply_grid_overlay(const coord_def &c) } name = (*overlay)(x, y).tile; - if (!name.empty()) + if (!name.empty() && name != "none") { env.tile_flv(gc).feat_idx = store_tilename_get_index(name); |