choking on non-food
<Someone> (also later forwarded by <Someone>) reported that choking while eating non-food always resulted in calling it a "quick snack". lesshungry() depends on an occupation to tell if you are actually eatig or not, but since non-food is eaten in one turn, no occupation was set. Took his suggestion of setting the occupation temporarily to cause lesshungry() call choke() appropriately in this case.
This commit is contained in:
@@ -1569,7 +1569,10 @@ eatspecial() /* called after eating non-food */
|
||||
{
|
||||
register struct obj *otmp = victual.piece;
|
||||
|
||||
/* lesshungry wants an occupation to handle choke messages correctly */
|
||||
set_occupation(eatfood, "eating non-food", 0);
|
||||
lesshungry(victual.nmod);
|
||||
occupation = 0;
|
||||
victual.piece = (struct obj *)0;
|
||||
victual.eating = 0;
|
||||
if (otmp->oclass == COIN_CLASS) {
|
||||
|
||||
Reference in New Issue
Block a user