From bb06ee5d09ad01697c7c2fb492e0f6608cfda2fa Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Wed, 19 Aug 2009 09:07:57 +0000 Subject: Disallow choice of "none" for species/base in the doll edit screen. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10574 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/tilepick.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/tilepick.cc') diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc index 2bbb7014ec..a7138bb9c7 100644 --- a/crawl-ref/source/tilepick.cc +++ b/crawl-ref/source/tilepick.cc @@ -2760,14 +2760,15 @@ void tilep_calc_flags(const int parts[], int flag[]) if (parts[TILEP_PART_HELM] - 1 >= TILEP_HELM_FHELM_OFS) flag[TILEP_PART_BEARD] = TILEP_FLAG_HIDE; - if (parts[TILEP_PART_BASE] == TILEP_BASE_NAGA - || parts[TILEP_PART_BASE] == TILEP_BASE_NAGA + 1) + if (parts[TILEP_PART_BASE] >= TILEP_BASE_NAGA + && parts[TILEP_PART_BASE] < tilep_species_to_base_tile(SP_NAGA + 1)) { flag[TILEP_PART_BOOTS] = flag[TILEP_PART_LEG] = TILEP_FLAG_HIDE; flag[TILEP_PART_BODY] = TILEP_FLAG_CUT_NAGA; } - else if (parts[TILEP_PART_BASE] == TILEP_BASE_CENTAUR - || parts[TILEP_PART_BASE] == TILEP_BASE_CENTAUR + 1) + else if (parts[TILEP_PART_BASE] >= TILEP_BASE_CENTAUR + && parts[TILEP_PART_BASE] + < tilep_species_to_base_tile(SP_CENTAUR + 1)) { flag[TILEP_PART_BOOTS] = flag[TILEP_PART_LEG] = TILEP_FLAG_HIDE; flag[TILEP_PART_BODY] = TILEP_FLAG_CUT_CENTAUR; -- cgit v1.2.3-54-g00ecf