Skip to content

Commit

Permalink
Give shoved vehicle a vertical velocity so map::move_vehicle wont com…
Browse files Browse the repository at this point in the history
…plain.
  • Loading branch information
BevapDin committed Aug 24, 2019
1 parent cac4f1d commit 7372b14
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/monmove.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1876,6 +1876,9 @@ void monster::shove_vehicle( const tripoint &remote_destination,
veh.skidding = true;
veh.velocity = shove_velocity;
if( shove_destination != tripoint_zero ) {
if( shove_destination.z != 0 ) {
veh.vertical_velocity = shove_destination.z < 0 ? -shove_velocity : +shove_velocity;
}
g->m.move_vehicle( veh, shove_destination, veh.face );
}
veh.move = tileray( destination_delta_x, destination_delta_y );
Expand Down

0 comments on commit 7372b14

Please sign in to comment.