1
0

Fixed 2 small warnings (#4055)

This commit is contained in:
Bond-009 2017-10-02 21:59:25 +02:00 committed by peterbell10
parent 8866a28cf8
commit 76a0971279
2 changed files with 3 additions and 7 deletions

View File

@ -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);
}

View File

@ -189,7 +189,7 @@ void cMobSpawnerEntity::SpawnEntity(void)
}
}
}
return EntitiesSpawned;
return HaveSpawnedEntity;
}
);