ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/object.h
(Generate patch)

Comparing deliantra/server/include/object.h (file contents):
Revision 1.191 by pippijn, Tue Dec 23 18:52:57 2008 UTC vs.
Revision 1.192 by root, Sun Dec 28 06:59:27 2008 UTC

383 remove (); 383 remove ();
384 *this = pos; 384 *this = pos;
385 insert_at (this, this); 385 insert_at (this, this);
386 } 386 }
387 387
388 // high-level move functions, return true if successful
389 int move (int dir, object *originator);
390
391 int move (int dir)
392 {
393 return move (dir, this);
394 }
395
388 static bool can_merge_slow (object *op1, object *op2); 396 static bool can_merge_slow (object *op1, object *op2);
389 397
390 // this is often used in time-critical code, so optimise 398 // this is often used in time-critical code, so optimise
391 MTH static bool can_merge (object *op1, object *op2) 399 MTH static bool can_merge (object *op1, object *op2)
392 { 400 {
451 const materialtype_t *dominant_material () const; 459 const materialtype_t *dominant_material () const;
452 460
453 // return the volume of this object in cm³ 461 // return the volume of this object in cm³
454 MTH uint64 volume () const 462 MTH uint64 volume () const
455 { 463 {
456 return total_weight () 464 return (uint64)total_weight ()
457 * 1000 465 * 1000
458 * (type == CONTAINER ? 1000 : 1) 466 * (type == CONTAINER ? 1000 : 1)
459 / dominant_material ()->density; 467 / dominant_material ()->density;
460 } 468 }
461 469

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines