summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-04-22 15:04:04 +0200
committerMattes D <github@xoft.cz>2014-04-22 15:04:04 +0200
commitb3a9b73278b0fc8a885d7f415d13845c7ffc063a (patch)
treeb0419d9ba01fd65ff30810c1840df14523414832 /src/Entities/Entity.cpp
parentRevert moving gcc to g++11 in 18c3b1 (diff)
parentFixed indentation and changed m_Fireproof to m_IsFireproof. (diff)
downloadcuberite-b3a9b73278b0fc8a885d7f415d13845c7ffc063a.tar
cuberite-b3a9b73278b0fc8a885d7f415d13845c7ffc063a.tar.gz
cuberite-b3a9b73278b0fc8a885d7f415d13845c7ffc063a.tar.bz2
cuberite-b3a9b73278b0fc8a885d7f415d13845c7ffc063a.tar.lz
cuberite-b3a9b73278b0fc8a885d7f415d13845c7ffc063a.tar.xz
cuberite-b3a9b73278b0fc8a885d7f415d13845c7ffc063a.tar.zst
cuberite-b3a9b73278b0fc8a885d7f415d13845c7ffc063a.zip
Diffstat (limited to 'src/Entities/Entity.cpp')
-rw-r--r--src/Entities/Entity.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp
index 56ef36ef8..9a80d3e80 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -788,7 +788,10 @@ void cEntity::TickBurning(cChunk & a_Chunk)
m_TicksSinceLastBurnDamage++;
if (m_TicksSinceLastBurnDamage >= BURN_TICKS_PER_DAMAGE)
{
- TakeDamage(dtOnFire, NULL, BURN_DAMAGE, 0);
+ if (!m_IsFireproof)
+ {
+ TakeDamage(dtOnFire, NULL, BURN_DAMAGE, 0);
+ }
m_TicksSinceLastBurnDamage = 0;
}
m_TicksLeftBurning--;
@@ -856,7 +859,10 @@ void cEntity::TickBurning(cChunk & a_Chunk)
m_TicksSinceLastLavaDamage++;
if (m_TicksSinceLastLavaDamage >= LAVA_TICKS_PER_DAMAGE)
{
- TakeDamage(dtLavaContact, NULL, LAVA_DAMAGE, 0);
+ if (!m_IsFireproof)
+ {
+ TakeDamage(dtLavaContact, NULL, LAVA_DAMAGE, 0);
+ }
m_TicksSinceLastLavaDamage = 0;
}
}
@@ -874,7 +880,10 @@ void cEntity::TickBurning(cChunk & a_Chunk)
m_TicksSinceLastFireDamage++;
if (m_TicksSinceLastFireDamage >= FIRE_TICKS_PER_DAMAGE)
{
- TakeDamage(dtFireContact, NULL, FIRE_DAMAGE, 0);
+ if (!m_IsFireproof)
+ {
+ TakeDamage(dtFireContact, NULL, FIRE_DAMAGE, 0);
+ }
m_TicksSinceLastFireDamage = 0;
}
}