--- deliantra/server/include/object.h 2012/01/03 11:25:32 1.261
+++ deliantra/server/include/object.h 2012/11/14 05:21:10 1.265
@@ -1,24 +1,24 @@
/*
* This file is part of Deliantra, the Roguelike Realtime MMORPG.
- *
+ *
* Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
* Copyright (©) 2001 Mark Wedel & Crossfire Development Team
* Copyright (©) 1992 Frank Tore Johansen
- *
+ *
* Deliantra is free software: you can redistribute it and/or modify it under
* the terms of the Affero GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the Affero GNU General Public License
* and the GNU General Public License along with this program. If not, see
* .
- *
+ *
* The authors can be reached via e-mail to
*/
@@ -460,7 +460,7 @@
&& can_merge_slow (op1, op2);
}
- MTH void set_owner (object *owner);
+ MTH void set_owner (object_ornull *owner);
MTH void set_speed (float speed);
MTH void set_glow_radius (sint8 rad);
@@ -523,9 +523,9 @@
return nrof ? nrof : 1;
}
- MTH sint32 total_weight () const
+ MTH weight_t total_weight () const
{
- return (weight + carrying) * number_of ();
+ return sint64 (weight + carrying) * number_of ();
}
MTH void update_weight ();
@@ -537,9 +537,9 @@
}
// return the volume of this object in cm³
- MTH uint64 volume () const
+ MTH volume_t volume () const
{
- return (uint64)total_weight ()
+ return (volume_t)total_weight ()
* 1024 // 1000 actually
* (type == CONTAINER ? 128 : 1)
/ dominant_material ()->density; // ugh, division
@@ -884,7 +884,7 @@
MTH void post_load_check (); // do some adjustments after parsing
object_vector_index ACC (RW, archid); // index in archvector
- shstr ACC (RW, archname); /* More definite name, like "generate_kobold" */
+ shstr ACC (RW, archname); /* More definite name, like "generate_kobold" */
sint8 ACC (RW, max_x); /* extents, compared to the head (min_x, min_y should be zero, but aren't...) */