Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset mount moves on dismount #33461

Merged
merged 3 commits into from Aug 22, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11013,6 +11013,8 @@ void player::forced_dismount()
bool mech = false;
if( mounted_creature ) {
auto mon = mounted_creature.get();
// monster has been storing up moves while riding, reset them now so it dosnt zoom off.
This conversation was marked as resolved.
Show resolved Hide resolved
mon->moves = 0;
if( mon->has_flag( MF_RIDEABLE_MECH ) && !mon->type->mech_weapon.empty() ) {
mech = true;
remove_item( g->u.weapon );
Expand Down Expand Up @@ -11100,6 +11102,8 @@ void player::dismount()
int ydiff = pos().y - temp_pt.y;
remove_effect( effect_riding );
monster *critter = mounted_creature.get();
// monster has been storing up moves while riding, reset them now so it dosnt zoom off.
critter->moves = 0;
if( critter->has_flag( MF_RIDEABLE_MECH ) && !critter->type->mech_weapon.empty() ) {
remove_item( g->u.weapon );
}
Expand Down