Creative mode hits immediately disappear boats (#5117)
Instant destroy boat in creative mode + boat one-shot in creative mode + Add boat instant destroy in creative + Instant break boat in creative
This commit is contained in:
parent
50a94f972d
commit
b1b7424c43
@ -75,6 +75,16 @@ bool cBoat::DoTakeDamage(TakeDamageInfo & TDI)
|
||||
|
||||
m_World->BroadcastEntityMetadata(*this);
|
||||
|
||||
if ((TDI.Attacker != nullptr) && (TDI.Attacker->IsPlayer()))
|
||||
{
|
||||
cPlayer * Destroyer = static_cast<cPlayer *>(TDI.Attacker);
|
||||
if (Destroyer->IsGameModeCreative())
|
||||
{
|
||||
Destroy();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (GetHealth() <= 0)
|
||||
{
|
||||
if (TDI.Attacker != nullptr)
|
||||
|
Loading…
Reference in New Issue
Block a user