make bats not attack prey in containers

install-platforms
Maikel de Vries 2017-11-16 12:47:39 +01:00
parent 0e6f1599c6
commit bc3d0bb29d
1 changed files with 2 additions and 1 deletions

View File

@ -157,7 +157,8 @@ private func FxCoreBehaviorTimer(object target, proplist effect, int time)
if (Distance(GetX(), GetY(), effect.attack_target->GetX(), effect.attack_target->GetY()) < 10)
{
BitePrey(effect.attack_target);
if (!effect.attack_target->Contained())
BitePrey(effect.attack_target);
effect.attack_target = nil;
SetRandomDirection();
}