Creative players take Plugin damage
This commit is contained in:
parent
dd325d742d
commit
b89419f603
@ -397,6 +397,7 @@ int cEntity::GetArmorCoverAgainst(const cEntity * a_Attacker, eDamageType a_Dama
|
|||||||
case dtPotionOfHarming:
|
case dtPotionOfHarming:
|
||||||
case dtFalling:
|
case dtFalling:
|
||||||
case dtLightning:
|
case dtLightning:
|
||||||
|
case dtPlugin:
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -473,7 +474,7 @@ void cEntity::KilledBy(cEntity * a_Killer)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Drop loot:
|
// Drop loot:
|
||||||
cItems Drops;
|
cItems Drops;
|
||||||
GetDrops(Drops, a_Killer);
|
GetDrops(Drops, a_Killer);
|
||||||
m_World->SpawnItemPickups(Drops, GetPosX(), GetPosY(), GetPosZ());
|
m_World->SpawnItemPickups(Drops, GetPosX(), GetPosY(), GetPosZ());
|
||||||
|
@ -784,11 +784,11 @@ void cPlayer::SetFlying(bool a_IsFlying)
|
|||||||
|
|
||||||
void cPlayer::DoTakeDamage(TakeDamageInfo & a_TDI)
|
void cPlayer::DoTakeDamage(TakeDamageInfo & a_TDI)
|
||||||
{
|
{
|
||||||
if (a_TDI.DamageType != dtInVoid)
|
if ((a_TDI.DamageType != dtInVoid) && (a_TDI.DamageType != dtPlugin))
|
||||||
{
|
{
|
||||||
if (IsGameModeCreative())
|
if (IsGameModeCreative())
|
||||||
{
|
{
|
||||||
// No damage / health in creative mode if not void damage
|
// No damage / health in creative mode if not void or plugin damage
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user