Add some braces
This commit is contained in:
@@ -299,13 +299,15 @@ bool is_blocked(location to_check) {
|
|||||||
// Note: The purpose of the above check is to avoid portals.
|
// Note: The purpose of the above check is to avoid portals.
|
||||||
|
|
||||||
// Party there?
|
// Party there?
|
||||||
if(is_town())
|
if(is_town() && to_check == univ.party.town_loc)
|
||||||
if(to_check == univ.party.town_loc)
|
return true;
|
||||||
return true;
|
if(is_combat()) {
|
||||||
if(is_combat())
|
for(short i = 0; i < 6; i++) {
|
||||||
for(short i = 0; i < 6; i++)
|
if(univ.party[i].main_status == eMainStatus::ALIVE && to_check == univ.party[i].combat_pos) {
|
||||||
if(univ.party[i].main_status == eMainStatus::ALIVE && to_check == univ.party[i].combat_pos)
|
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Monster there?
|
// Monster there?
|
||||||
if(univ.target_there(to_check, TARG_MONST))
|
if(univ.target_there(to_check, TARG_MONST))
|
||||||
@@ -399,10 +401,13 @@ bool outd_is_blocked(location to_check) {
|
|||||||
if(impassable(univ.out[to_check.x][to_check.y])) {
|
if(impassable(univ.out[to_check.x][to_check.y])) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
for(short i = 0; i < 10; i++)
|
for(short i = 0; i < 10; i++) {
|
||||||
if((univ.party.out_c[i].exists))
|
if((univ.party.out_c[i].exists)) {
|
||||||
if(univ.party.out_c[i].m_loc == to_check)
|
if(univ.party.out_c[i].m_loc == to_check) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user