Skip to content

Commit

Permalink
Fixed hunger from increasing past 100.0f in "eatme" script command
Browse files Browse the repository at this point in the history
  • Loading branch information
QJa42FMM committed Jan 2, 2015
1 parent 88674f1 commit a6ac166
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/script/ScriptedItem.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit a6ac166

Please sign in to comment.