mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Remove duplicate potion assignment condition
This commit is contained in:
parent
51eb86ad28
commit
6647a95213
|
|
@ -128,10 +128,6 @@ void Witch::aiStep()
|
|||
{
|
||||
potion = PotionBrewing::POTION_ID_SWIFTNESS;
|
||||
}
|
||||
else if (random->nextFloat() < 0.25f && getTarget() != NULL && !hasEffect(MobEffect::movementSpeed) && getTarget()->distanceToSqr(shared_from_this()) > 11 * 11)
|
||||
{
|
||||
potion = PotionBrewing::POTION_ID_SWIFTNESS;
|
||||
}
|
||||
|
||||
if (potion > -1)
|
||||
{
|
||||
|
|
@ -221,4 +217,4 @@ void Witch::performRangedAttack(shared_ptr<LivingEntity> target, float power)
|
|||
potion->shoot(xd, yd + dist * 0.2f, zd, 0.75f, 8);
|
||||
|
||||
level->addEntity(potion);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue