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

fix: remove mount when dies #2258

Merged
merged 12 commits into from
Feb 23, 2024
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 (isMounted()) {
Nyedson marked this conversation as resolved.
Show resolved Hide resolved
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
Loading