From ad22922393c7982b885840960222de64ff96ad36 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Sun, 14 Jan 2018 18:44:45 +0000 Subject: Rename cEntity swim states (#3996) * Replace cEntity:m_IsSubmerged with m_IsHeadInWater * Replace cEntity:m_IsSwimming with m_IsInWater * Add API documentation for new symbols * Apply SetSwimState to all entities, not just mobs and players * Pickups now use IsOnFire to check if they are on fire before destruction Fixes #3987 --- src/Entities/Pawn.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/Entities/Pawn.cpp') diff --git a/src/Entities/Pawn.cpp b/src/Entities/Pawn.cpp index b5769f430..27c04d4b8 100644 --- a/src/Entities/Pawn.cpp +++ b/src/Entities/Pawn.cpp @@ -156,7 +156,7 @@ bool cPawn::IsInvisible() const void cPawn::HandleAir(void) { - if (IsSubmerged() && HasEntityEffect(cEntityEffect::effWaterBreathing)) + if (IsHeadInWater() && HasEntityEffect(cEntityEffect::effWaterBreathing)) { // Prevent the oxygen from decreasing return; @@ -486,6 +486,3 @@ cEntityEffect * cPawn::GetEntityEffect(cEntityEffect::eType a_EffectType) auto itr = m_EntityEffects.find(a_EffectType); return (itr != m_EntityEffects.end()) ? itr->second.get() : nullptr; } - - - -- cgit v1.2.3