--- deliantra/server/include/object.h 2007/02/07 02:13:06 1.97 +++ deliantra/server/include/object.h 2007/02/07 23:50:01 1.98 @@ -308,9 +308,13 @@ // return the dominant material of this item, always return something const materialtype_t *dominant_material () const; + // return the volume of this object in cm³ uint64 volume () const { - return total_weight () / dominant_material ()->density; + return total_weight () + * 1000 + * (type == CONTAINER ? 1000 : 1) + / dominant_material ()->density; } MTH bool is_weapon () const { return type == ARROW || type == BOW || type == WEAPON; }