Skip to content

Commit

Permalink
Update game.cpp
Browse files Browse the repository at this point in the history
Prevent player from boarding a seat that has items in it.
  • Loading branch information
kevingranade committed Feb 13, 2013
1 parent 3e7f30c commit 05cfb3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6785,7 +6785,7 @@ void game::plmove(int x, int y)
if (u.underwater)
u.underwater = false;
dpart = veh ? veh->part_with_feature (vpart, vpf_seat) : -1;
bool can_board = dpart >= 0 &&
bool can_board = dpart >= 0 && veh->parts[dpart].items.size() == 0 &&
!veh->parts[dpart].has_flag(vehicle_part::passenger_flag);
/* if (veh.type != veh_null)
add_msg ("vp=%d dp=%d can=%c", vpart, dpart, can_board? 'y' : 'n',);*/
Expand Down

0 comments on commit 05cfb3d

Please sign in to comment.