X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=misc.c;h=679c2c87505ecfb5f1a451e80988ec7a2394ad66;hp=aa164728d54366942e282de3e1fdcee704b81877;hb=6de0149f9e33a170c8ceb28466d3221be230fb96;hpb=782c5c3f290555fa9368208efdb3b428f45468eb diff --git a/misc.c b/misc.c index aa16472..679c2c8 100644 --- a/misc.c +++ b/misc.c @@ -585,7 +585,9 @@ void carry(obj_t object, loc_t where) if (game.place[object] == CARRIED) return; game.place[object] = CARRIED; - ++game.holdng; + + if (object!= BIRD) + ++game.holdng; } if (game.atloc[where] == object) { game.atloc[where] = game.link[object]; @@ -606,7 +608,14 @@ void drop(obj_t object, loc_t where) game.fixed[object - NOBJECTS] = where; else { if (game.place[object] == CARRIED) - --game.holdng; + if (object != BIRD) + /* The bird has to be weightless. This ugly hack (and the + * corresponding code in the drop function) brought to you + * by the fact that when the bird is caged, we need to be able + * to either 'take bird' or 'take cage' and have the right thing + * happen. + */ + --game.holdng; game.place[object] = where; } if (where == LOC_NOWHERE ||