diff --git a/src/cc/rogue/fight.c b/src/cc/rogue/fight.c index 0e512d4b7..9cb4bf61e 100644 --- a/src/cc/rogue/fight.c +++ b/src/cc/rogue/fight.c @@ -308,7 +308,8 @@ attack(struct rogue_state *rs,THING *mp) mp=NULL; leave_pack(rs,steal, FALSE, FALSE); msg(rs,"she stole %s!", inv_name(steal, TRUE)); - discard(steal); + if ( steal->o_count <= 0 ) + discard(steal); } } otherwise: @@ -600,8 +601,7 @@ remove_mon(struct rogue_state *rs,coord *mp, THING *tp, bool waskill) detach(tp->t_pack, obj); if (waskill) fall(rs,obj, FALSE); - else if ( obj->o_count <= 0 ) - discard(obj); + else discard(obj); } moat(mp->y, mp->x) = NULL; mvaddch(mp->y, mp->x, tp->t_oldch); diff --git a/src/cc/rogue/potions.c b/src/cc/rogue/potions.c index 00865b5dd..b10f83bd4 100644 --- a/src/cc/rogue/potions.c +++ b/src/cc/rogue/potions.c @@ -220,7 +220,7 @@ quaff(struct rogue_state *rs) call_it(rs,&pot_info[obj->o_which]); if (discardit) - discard(obj); + discard(obj); return; } diff --git a/src/cc/rogue/scrolls.c b/src/cc/rogue/scrolls.c index 5554a5701..8ed6d2648 100644 --- a/src/cc/rogue/scrolls.c +++ b/src/cc/rogue/scrolls.c @@ -313,7 +313,7 @@ def: call_it(rs,&scr_info[obj->o_which]); if (discardit) - discard(obj); + discard(obj); } /* diff --git a/src/cc/rogue/weapons.c b/src/cc/rogue/weapons.c index e313bf9d3..0a8b6016c 100644 --- a/src/cc/rogue/weapons.c +++ b/src/cc/rogue/weapons.c @@ -129,28 +129,28 @@ fall(struct rogue_state *rs,THING *obj, bool pr) if (fallpos(&obj->o_pos, &fpos)) { - pp = INDEX(fpos.y, fpos.x); - pp->p_ch = (char) obj->o_type; - obj->o_pos = fpos; - if (cansee(rs,fpos.y, fpos.x)) - { - if (pp->p_monst != NULL) - pp->p_monst->t_oldch = (char) obj->o_type; - else - mvaddch(fpos.y, fpos.x, obj->o_type); - } - attach(lvl_obj, obj); - return; + pp = INDEX(fpos.y, fpos.x); + pp->p_ch = (char) obj->o_type; + obj->o_pos = fpos; + if (cansee(rs,fpos.y, fpos.x)) + { + if (pp->p_monst != NULL) + pp->p_monst->t_oldch = (char) obj->o_type; + else + mvaddch(fpos.y, fpos.x, obj->o_type); + } + attach(lvl_obj, obj); + return; } if (pr) { - if (has_hit) - { - endmsg(rs); - has_hit = FALSE; - } - msg(rs,"the %s vanishes as it hits the ground", - weap_info[obj->o_which].oi_name); + if (has_hit) + { + endmsg(rs); + has_hit = FALSE; + } + msg(rs,"the %s vanishes as it hits the ground", + weap_info[obj->o_which].oi_name); } discard(obj); }