mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-05 23:09:04 +00:00
Fixed: #962 animal consumes one unit too many (by nimetu)
This commit is contained in:
parent
bdca646962
commit
e08d0193a0
1 changed files with 2 additions and 1 deletions
|
@ -5660,7 +5660,8 @@ bool CCharacter::onAnimalHungry( uint petIndex, bool justBecameHungry )
|
|||
{
|
||||
// Consume to full satiety (last useful unit is entirely consumed)
|
||||
animal.Satiety = animal.MaxSatiety;
|
||||
nbUnits = (sint)((caloriesNeeded / caloriesPerUnit) + 1);
|
||||
nbUnits = (sint)ceil(caloriesNeeded / caloriesPerUnit);
|
||||
|
||||
}
|
||||
nbItemsLeftToConsume -= nbUnits;
|
||||
|
||||
|
|
Loading…
Reference in a new issue