Remove duplicate potion assignment condition

This commit is contained in:
Adem Kurt 2026-03-04 23:15:44 +03:00 committed by GitHub
parent 51eb86ad28
commit 6647a95213
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -128,10 +128,6 @@ void Witch::aiStep()
{ {
potion = PotionBrewing::POTION_ID_SWIFTNESS; 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) 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); potion->shoot(xd, yd + dist * 0.2f, zd, 0.75f, 8);
level->addEntity(potion); level->addEntity(potion);
} }