Fix some things that broke in recent commits

This commit is contained in:
2015-01-23 21:48:23 -05:00
parent 9b067b62e4
commit fd41f2fb20
4 changed files with 5 additions and 5 deletions

View File

@@ -2312,7 +2312,7 @@ void increase_age() {
}
}
if(univ.town->lighting_type != LIGHT_NORMAL) {
if(is_town() && univ.town->lighting_type != LIGHT_NORMAL) {
int radiance = 0;
for(int i = 0; i < 6; i++)
radiance += univ.party[i].get_prot_level(eItemAbil::RADIANT);

View File

@@ -1872,7 +1872,7 @@ void combat_run_monst() {
if(univ.town->lighting_type == 3)
univ.party.light_level = 0;
if(univ.town->lighting_type != LIGHT_NORMAL) {
if(is_town() && univ.town->lighting_type != LIGHT_NORMAL) {
int radiance = 0;
for(int i = 0; i < 6; i++)
radiance += univ.party[i].get_prot_level(eItemAbil::RADIANT);

View File

@@ -296,7 +296,7 @@ bool is_blocked(location to_check) {
return true;
// Monster there?
if(monst_there(to_check) < 90)
if(monst_there(to_check) < univ.town.monst.size())
return true;
// Magic barrier?
@@ -323,7 +323,7 @@ bool monst_on_space(location loc,short m_num) {
return false;
}
short monst_there(location where) { // returns 90 if no
size_t monst_there(location where) { // returns 90 if no
short i;
for(i = 0; i < univ.town.monst.size(); i++)

View File

@@ -22,7 +22,7 @@ bool is_container(location loc);
void update_explored(location dest);
bool is_blocked(location to_check);
bool monst_on_space(location loc,short m_num);
short monst_there(location where) ;
size_t monst_there(location where) ;
bool monst_can_be_there(location loc,short m_num);
bool monst_adjacent(location loc,short m_num);
bool monst_can_see(short m_num,location l);