mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-09 00:24:15 +00:00
fix: Implement missing critical hit sound (#1141)
* Fix * Crit Sound Now Plays On Death * Revert BuildVer.h --------- Co-authored-by: Loki <lokio.casebstv@gmail.com>
This commit is contained in:
@@ -1631,6 +1631,10 @@ void Player::attack(shared_ptr<Entity> entity)
|
||||
}
|
||||
|
||||
DamageSource *damageSource = DamageSource::playerAttack(dynamic_pointer_cast<Player>(shared_from_this()));
|
||||
|
||||
if (bCrit) {
|
||||
damageSource->setIsCritical();
|
||||
}
|
||||
bool wasHurt = entity->hurt(damageSource, dmg);
|
||||
delete damageSource;
|
||||
if (wasHurt)
|
||||
|
||||
Reference in New Issue
Block a user