X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=misc.c;h=78cc5a30e5a13a5da4f68519e77bb1a30a52ee6b;hb=b5badcacc8f3518a9fbb1338bdfc8f3621d3b26b;hp=cef36519e82e5d9d250da92e4784373b234f8461;hpb=551838cea217e3d9df11dcaea52c42b02449de91;p=open-adventure.git diff --git a/misc.c b/misc.c index cef3651..78cc5a3 100644 --- a/misc.c +++ b/misc.c @@ -171,8 +171,17 @@ void vspeak(const char* msg, bool blank, va_list ap) long previous_arg = 0; for (int i = 0; i < msglen; i++) { if (msg[i] != '%') { - *renderp++ = msg[i]; - size--; + /* Ugh. Least obtrusive way to deal with artifacts "on the floor" + * being dropped outside of both cave and building. */ + if (strncmp(msg + i, "floor", 5) == 0 && strchr(" .", msg[i+5]) && !INSIDE(game.loc)) { + strcpy(renderp, "ground"); + renderp += 6; + i += 4; + size -= 5; + } else { + *renderp++ = msg[i]; + size--; + } } else { long arg = va_arg(ap, long); if (arg == -1) @@ -571,7 +580,8 @@ void move(obj_t object, loc_t where) from = game.fixed[object - NOBJECTS]; else from = game.place[object]; - if (from != LOC_NOWHERE && from != CARRIED && !SPECIAL(from)) + /* (ESR) Used to check for !SPECIAL(from). I *think* that was wrong... */ + if (from != LOC_NOWHERE && from != CARRIED) carry(object, from); drop(object, where); }