Skip to content

Commit

Permalink
Merge pull request #40026 from mlangsdorf/vehicle_drench_fix
Browse files Browse the repository at this point in the history
game: don't drench the player if the player is in a boat
  • Loading branch information
ZhilkinSerg authored Apr 30, 2020
2 parents e5254c3 + 7ca5ff6 commit 70c9d8b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9473,7 +9473,8 @@ point game::place_player( const tripoint &dest_loc )
m.creature_on_trap( u );
}
// Drench the player if swimmable
if( m.has_flag( "SWIMMABLE", u.pos() ) && !u.is_mounted() ) {
if( m.has_flag( "SWIMMABLE", u.pos() ) &&
!( u.is_mounted() || ( u.in_vehicle && vp1->vehicle().can_float() ) ) ) {
u.drench( 40, { { bp_foot_l, bp_foot_r, bp_leg_l, bp_leg_r } }, false );
}

Expand Down

0 comments on commit 70c9d8b

Please sign in to comment.