diff options
author | bibo38 <bibo38@github.com> | 2015-11-01 11:50:03 +0100 |
---|---|---|
committer | bibo38 <bibo38@github.com> | 2015-11-01 11:50:03 +0100 |
commit | 435bae104d879e861ba7e7a7e82133dfa37efd6e (patch) | |
tree | a82dde07e01e9bc1863bcdcd23146938563176c6 /src/Entities/Pawn.cpp | |
parent | Fixed typo that slipped through #2584 (diff) | |
download | cuberite-435bae104d879e861ba7e7a7e82133dfa37efd6e.tar cuberite-435bae104d879e861ba7e7a7e82133dfa37efd6e.tar.gz cuberite-435bae104d879e861ba7e7a7e82133dfa37efd6e.tar.bz2 cuberite-435bae104d879e861ba7e7a7e82133dfa37efd6e.tar.lz cuberite-435bae104d879e861ba7e7a7e82133dfa37efd6e.tar.xz cuberite-435bae104d879e861ba7e7a7e82133dfa37efd6e.tar.zst cuberite-435bae104d879e861ba7e7a7e82133dfa37efd6e.zip |
Diffstat (limited to 'src/Entities/Pawn.cpp')
-rw-r--r-- | src/Entities/Pawn.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Entities/Pawn.cpp b/src/Entities/Pawn.cpp index 9045f8595..126947d3e 100644 --- a/src/Entities/Pawn.cpp +++ b/src/Entities/Pawn.cpp @@ -70,6 +70,21 @@ bool cPawn::IsFireproof(void) const +void cPawn::HandleAir(void) +{ + if (IsSubmerged() && HasEntityEffect(cEntityEffect::effWaterBreathing)) + { + // Prevent the oxygen from decreasing + return; + } + + super::HandleAir(); +} + + + + + void cPawn::AddEntityEffect(cEntityEffect::eType a_EffectType, int a_Duration, short a_Intensity, double a_DistanceModifier) { // Check if the plugins allow the addition: |