Remove if-block in Eat()

The check should be made in the object that call Eat()
install-platforms
Mark 2017-07-11 20:39:50 +02:00
parent e20d5e87ae
commit 2da7768a8e
1 changed files with 4 additions and 7 deletions

View File

@ -197,13 +197,10 @@ protected func CheckStuck()
public func Eat(object food)
{
if (IsWalking())
{
Heal(food->NutritionalValue());
food->RemoveObject();
Sound("Clonk::Action::Munch?");
SetAction("Eat");
}
Heal(food->NutritionalValue());
food->RemoveObject();
Sound("Clonk::Action::Munch?");
SetAction("Eat");
}
// Called when an object was dug free.