From cff0fb7870d145fbb5e1422934ce2c3a5c99911a Mon Sep 17 00:00:00 2001 From: cohrs Date: Mon, 24 Mar 2003 07:30:49 +0000 Subject: [PATCH] B01002 - tame dwarf won't eat 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. --- doc/fixes34.2 | 1 + src/dothrow.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/fixes34.2 b/doc/fixes34.2 index c154fba79..d7eab1373 100644 --- a/doc/fixes34.2 +++ b/doc/fixes34.2 @@ -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 diff --git a/src/dothrow.c b/src/dothrow.c index 7a3f109c6..f2f7a2734 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -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 {