Skip to content

Commit

Permalink
fix: remove mount when dying (#2258)
Browse files Browse the repository at this point in the history
Fix #2225

---------

Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
Nyedson and github-actions[bot] authored Feb 23, 2024
1 parent 6705f59 commit 42e46b9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/creatures/players/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2669,6 +2669,11 @@ BlockType_t Player::blockHit(std::shared_ptr<Creature> attacker, CombatType_t co
}

void Player::death(std::shared_ptr<Creature> lastHitCreature) {
if (!g_configManager().getBoolean(TOGGLE_MOUNT_IN_PZ, __FUNCTION__) && isMounted()) {
dismount();
g_game().internalCreatureChangeOutfit(getPlayer(), defaultOutfit);
}

loginPosition = town->getTemplePosition();

g_game().sendSingleSoundEffect(static_self_cast<Player>()->getPosition(), sex == PLAYERSEX_FEMALE ? SoundEffect_t::HUMAN_FEMALE_DEATH : SoundEffect_t::HUMAN_MALE_DEATH, getPlayer());
Expand Down

0 comments on commit 42e46b9

Please sign in to comment.