1
0

Implemented the FireResistence potion effects.

This not only provides fire resistence, but also prevents blaze fireballs.
See #2556
This commit is contained in:
bibo38
2015-10-31 16:24:45 +01:00
parent 9c270d522c
commit 73b8be0fef
6 changed files with 37 additions and 8 deletions

View File

@@ -46,6 +46,9 @@ void cFireChargeEntity::OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_Hi
Destroy();
Explode(a_HitPos.Floor());
// TODO: Some entities are immune to hits
a_EntityHit.StartBurning(5 * 20); // 5 seconds of burning
if (!a_EntityHit.IsFireproof())
{
// TODO Damage Entity with 5 damage(from http://minecraft.gamepedia.com/Blaze#Blaze_fireball)
a_EntityHit.StartBurning(5 * 20); // 5 seconds of burning
}
}