B01006 - containers hitting the floor

<Someone> noted that if you dropped a box while levitating, nothing would
break.  This is true for sacks too, which shouldn't be immune either.
Throwing didn't break contained objects either, not mentioned in his report.

Refactored out the code in kick_object that handled damage for objects
contained in normal containers and added calls in hitfloor and throwit.
kick_object still only calls it for boxes, but other callers will call it
for any object letting it decide if damage is required.  BoH objects aren't
affected, since traditionally the inside of the BoH is "somewhere else".
This commit is contained in:
cohrs
2003-03-29 03:31:51 +00:00
parent d5f40ec222
commit 66ece5d870
4 changed files with 67 additions and 46 deletions

View File

@@ -423,6 +423,7 @@ E void FDECL(wantdoor, (int,int,genericptr_t));
/* ### dokick.c ### */
E boolean FDECL(ghitm, (struct monst *,struct obj *));
E void FDECL(container_impact_dmg, (struct obj *));
E int NDECL(dokick);
E boolean FDECL(ship_object, (struct obj *,XCHAR_P,XCHAR_P,BOOLEAN_P));
E void NDECL(obj_delivery);