B01002 - tame dwarf won't eat

<Someone> reported that a tame dwarf wouldn't eat food tossed at it.
He also reported that it wouldn't eat off the ground, which I couldn't
reproduce nor see in a problem in the code.  The code in thitmonst didn't
allow for sharing food with non-domestic, already tame monsters.
This commit is contained in:
cohrs
2003-03-24 07:30:49 +00:00
parent 1396b45f24
commit cff0fb7870
2 changed files with 4 additions and 1 deletions

View File

@@ -27,6 +27,7 @@ Perseus statue should always be male
charge correctly when breaking multiple objects with the same zap, avoids
a dopay: not to shopkeeper impossible
clean up funny lighting on the healer locate level
allow all tame monsters that eat to consider food thrown to them
Platform- and/or Interface-Specific Fixes

View File

@@ -5,6 +5,7 @@
/* Contains code for 't' (throw) */
#include "hack.h"
#include "edog.h"
STATIC_DCL int FDECL(throw_obj, (struct obj *,int));
STATIC_DCL void NDECL(autoquiver);
@@ -1346,7 +1347,8 @@ register struct obj *obj;
potionhit(mon, obj, TRUE);
return 1;
} else if (befriend_with_obj(mon->data, obj)) {
} else if (befriend_with_obj(mon->data, obj) ||
(mon->mtame && dogfood(mon, obj) <= ACCFOOD)) {
if (tamedog(mon, obj))
return 1; /* obj is gone */
else {