Misc little fixes

This commit is contained in:
2015-02-05 17:33:37 -05:00
parent 5bfae50315
commit 9cf65fab35
3 changed files with 12 additions and 9 deletions

View File

@@ -419,12 +419,12 @@ static void handle_pause(bool& did_something, bool& need_redraw) {
}
} else {
// The above could leave you stranded in a single-tile passable area, so pausing again should re-enter the boat.
int boat = -1;
int boat = univ.party.boats.size();
if(overall_mode == MODE_OUTDOORS && (boat = out_boat_there(univ.party.p_loc)) < univ.party.boats.size())
univ.party.in_boat = boat;
else if(overall_mode == MODE_TOWN && (boat = town_boat_there(univ.town.p_loc)) < univ.party.boats.size())
univ.party.in_boat = boat;
if(boat >= 0)
if(boat < univ.party.boats.size())
ASB("You board the boat.");
}
put_pc_screen();

View File

@@ -1534,6 +1534,8 @@ void do_combat_cast(location target) {
add_missile(target,store_m_type,1, 14 * (w - 1),18 * (h - 1));
}
if(dynamic_cast<cPlayer*>(victim))
put_pc_screen();
}
break;
}
@@ -1558,9 +1560,6 @@ void do_combat_cast(location target) {
handle_marked_damage();
combat_posing_monster = current_working_monster = -1;
if(dynamic_cast<cPlayer*>(victim))
put_pc_screen();
print_buf();
}

View File

@@ -709,6 +709,8 @@ short do_look(location space) {
add_string_to_buf(" Boat");
if(out_horse_there(space) < 30)
add_string_to_buf(" Horse");
if(univ.out->special_spot[space.x][space.y])
add_string_to_buf(" Special Encounter");
}
if((overall_mode == MODE_LOOK_TOWN) || (overall_mode == MODE_LOOK_COMBAT)) {
@@ -788,6 +790,8 @@ short do_look(location space) {
add_string_to_buf((char *) msg.c_str());
}
}
if(univ.town.is_spot(space.x,space.y))
add_string_to_buf(" Special Encounter");
}
if(!is_lit) {
@@ -805,7 +809,7 @@ short town_boat_there(location where) {
if((univ.party.boats[i].exists) && (univ.party.boats[i].which_town == univ.town.num)
&& (where == univ.party.boats[i].loc))
return i;
return 30;
return univ.party.boats.size();
}
short out_boat_there(location where) {
short i;
@@ -814,7 +818,7 @@ short out_boat_there(location where) {
if((univ.party.boats[i].exists) && (where == univ.party.boats[i].loc)
&& (univ.party.boats[i].which_town == 200))
return i;
return 30;
return univ.party.boats.size();
}
short town_horse_there(location where) {
@@ -824,7 +828,7 @@ short town_horse_there(location where) {
if((univ.party.horses[i].exists) && (univ.party.horses[i].which_town == univ.town.num)
&& (where == univ.party.horses[i].loc))
return i;
return 30;
return univ.party.horses.size();
}
short out_horse_there(location where) {
short i;
@@ -833,7 +837,7 @@ short out_horse_there(location where) {
if((univ.party.horses[i].exists) && (where == univ.party.horses[i].loc)
&& (univ.party.horses[i].which_town == 200))
return i;
return 30;
return univ.party.horses.size();
}
void notify_out_combat_began(cOutdoors::cWandering encounter,short *nums) {
short i;