Skip to content
Permalink
Browse files

Fixed hunger from increasing past 100.0f in "eatme" script command

  • Loading branch information
QJa42FMM committed Jan 2, 2015
1 parent 88674f1 commit a6ac166d5bb40d5f7a200f01371b09b9a1bb49dc
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/script/ScriptedItem.cpp
@@ -362,7 +362,8 @@ class EatMeCommand : public Command {
Entity * entity = context.getEntity();

if(entity->ioflags & IO_ITEM) {
player.hunger += std::min(entity->_itemdata->food_value * 4.f, 100.f);
player.hunger += entity->_itemdata->food_value * 4.f;
player.hunger = std::min(player.hunger, 100.f);
}

ARX_INTERACTIVE_DestroyIOdelayed(entity);

0 comments on commit a6ac166

Please sign in to comment.