try to correct look_outdoor_mode

This commit is contained in:
ALONSO Laurent
2022-07-14 14:56:16 +02:00
committed by Celtic Minstrel
parent dc716fa5e6
commit 0e77f56fbb
2 changed files with 6 additions and 5 deletions

View File

@@ -485,8 +485,9 @@ static void handle_look(location destination, bool& need_redraw, bool& need_repr
}
}
} else if(overall_mode == MODE_LOOK_OUTDOORS) {
location lDest=global_to_local(destination);
for(int k = 0; k < univ.out->sign_locs.size(); k++) {
if(destination == univ.out->sign_locs[k]) {
if(lDest == univ.out->sign_locs[k]) {
need_reprint = true;
if(adjacent(univ.out->sign_locs[k],univ.party.loc_in_sec))
do_sign(200 + get_outdoor_num(),k,ter_looked_at);
@@ -1183,7 +1184,7 @@ bool handle_action(const sf::Event& event) {
// Looking at something
else if(overall_mode == MODE_LOOK_OUTDOORS || overall_mode == MODE_LOOK_TOWN || overall_mode == MODE_LOOK_COMBAT) {
if(overall_mode == MODE_LOOK_OUTDOORS) destination = univ.party.loc_in_sec;
if(overall_mode == MODE_LOOK_OUTDOORS) destination = univ.party.out_loc;
destination.x = destination.x + i - 4;
destination.y = destination.y + j - 4;
handle_look(destination, need_redraw, need_reprint);

View File

@@ -720,14 +720,14 @@ short do_look(location space) {
}
}
if(univ.out->roads[space.x][space.y])
location lSpace=global_to_local(space);
if(univ.out->roads[lSpace.x][lSpace.y])
add_string_to_buf(" Road");
if(out_boat_there(space))
add_string_to_buf(" Boat");
if(out_horse_there(space))
add_string_to_buf(" Horse");
if(univ.out->special_spot[space.x][space.y])
if(univ.out->special_spot[lSpace.x][lSpace.y])
add_string_to_buf(" Special Encounter");
}