diff options
author | Bond-009 <bond.009@outlook.com> | 2017-10-02 21:59:25 +0200 |
---|---|---|
committer | peterbell10 <peterbell10@live.co.uk> | 2017-10-02 21:59:25 +0200 |
commit | 76a0971279de47c5a1d8510848e88e57cc6eed72 (patch) | |
tree | 103a25d378b6b924e369e91288eb37777df62ee4 /src/BlockEntities | |
parent | Fix explosion interaction with block entities. (#4052) (diff) | |
download | cuberite-76a0971279de47c5a1d8510848e88e57cc6eed72.tar cuberite-76a0971279de47c5a1d8510848e88e57cc6eed72.tar.gz cuberite-76a0971279de47c5a1d8510848e88e57cc6eed72.tar.bz2 cuberite-76a0971279de47c5a1d8510848e88e57cc6eed72.tar.lz cuberite-76a0971279de47c5a1d8510848e88e57cc6eed72.tar.xz cuberite-76a0971279de47c5a1d8510848e88e57cc6eed72.tar.zst cuberite-76a0971279de47c5a1d8510848e88e57cc6eed72.zip |
Diffstat (limited to 'src/BlockEntities')
-rw-r--r-- | src/BlockEntities/BeaconEntity.cpp | 8 | ||||
-rw-r--r-- | src/BlockEntities/MobSpawnerEntity.cpp | 2 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/BlockEntities/BeaconEntity.cpp b/src/BlockEntities/BeaconEntity.cpp index 763fc6d20..15f6744da 100644 --- a/src/BlockEntities/BeaconEntity.cpp +++ b/src/BlockEntities/BeaconEntity.cpp @@ -231,11 +231,7 @@ void cBeaconEntity::GiveEffects(void) EffectLevel = 1; } - cEntityEffect::eType SecondaryEffect = cEntityEffect::effNoEffect; - if ((m_BeaconLevel >= 4) && (m_PrimaryEffect != m_SecondaryEffect) && (m_SecondaryEffect > 0)) - { - SecondaryEffect = m_SecondaryEffect; - } + bool HasSecondaryEffect = (m_BeaconLevel >= 4) && (m_PrimaryEffect != m_SecondaryEffect) && (m_SecondaryEffect > 0); Vector3d BeaconPosition(m_PosX, m_PosY, m_PosZ); GetWorld()->ForEachPlayer([=](cPlayer & a_Player) @@ -251,7 +247,7 @@ void cBeaconEntity::GiveEffects(void) { a_Player.AddEntityEffect(m_PrimaryEffect, 180, EffectLevel); - if (m_SecondaryEffect != cEntityEffect::effNoEffect) + if (HasSecondaryEffect) { a_Player.AddEntityEffect(m_SecondaryEffect, 180, 0); } diff --git a/src/BlockEntities/MobSpawnerEntity.cpp b/src/BlockEntities/MobSpawnerEntity.cpp index 83293765f..a4e53d5d1 100644 --- a/src/BlockEntities/MobSpawnerEntity.cpp +++ b/src/BlockEntities/MobSpawnerEntity.cpp @@ -189,7 +189,7 @@ void cMobSpawnerEntity::SpawnEntity(void) } } } - return EntitiesSpawned; + return HaveSpawnedEntity; } ); |