mirror of
https://github.com/neoStudiosLCE/neoLegacy.git
synced 2026-06-08 21:03:00 +00:00
fix: /kill now kills the player if in creative
Some checks failed
Nightly Release / Build Client (push) Has been cancelled
Nightly Release / Build Server (push) Has been cancelled
Sync branches with main / sync (push) Has been cancelled
Nightly Release / Release Server (push) Has been cancelled
Nightly Release / Release Client (push) Has been cancelled
Nightly Release / cleanup (push) Has been cancelled
Some checks failed
Nightly Release / Build Client (push) Has been cancelled
Nightly Release / Build Server (push) Has been cancelled
Sync branches with main / sync (push) Has been cancelled
Nightly Release / Release Server (push) Has been cancelled
Nightly Release / Release Client (push) Has been cancelled
Nightly Release / cleanup (push) Has been cancelled
This commit is contained in:
parent
bb37600c87
commit
311503ec46
|
|
@ -850,8 +850,10 @@ void ServerPlayer::die(DamageSource *source)
|
|||
|
||||
bool ServerPlayer::hurt(DamageSource *dmgSource, float dmg)
|
||||
{
|
||||
if (isInvulnerable()) return false;
|
||||
if (gameMode == nullptr||gameMode->isCreative()) return false;
|
||||
if (isInvulnerable() && dmgSource != DamageSource::outOfWorld) return false;
|
||||
if (gameMode == nullptr || gameMode->isCreative()) {
|
||||
if (dmgSource != DamageSource::outOfWorld) return false;
|
||||
}
|
||||
|
||||
// 4J: Not relevant to console servers
|
||||
// Allow falldamage on dedicated pvpservers -- so people cannot cheat their way out of 'fall traps'
|
||||
|
|
|
|||
Loading…
Reference in a new issue