fix issue #1453 - throwing crackable object upward
Issue reported by NullCGT: throwing a crackable item against the ceiling would cause it to vanish if it became [more] cracked but not yet fully shattered. Fixes #1453
This commit is contained in:
@@ -1268,7 +1268,14 @@ toss_up(struct obj *obj, boolean hitsroof)
|
||||
if (breaktest(obj)) {
|
||||
pline("%s hits the %s.", Doname2(obj), ceiling(u.ux, u.uy));
|
||||
breakmsg(obj, !Blind);
|
||||
return breakobj(obj, u.ux, u.uy, TRUE, TRUE) ? FALSE : TRUE;
|
||||
/* crackable armor will return True for breaktest() but will
|
||||
usually return False for breakobj() */
|
||||
if (!breakobj(obj, u.ux, u.uy, TRUE, TRUE)) {
|
||||
hitfloor(obj, FALSE);
|
||||
gt.thrownobj = 0;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
action = "hits";
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user