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.65 by root, Sat Dec 23 06:30:49 2006 UTC vs.
Revision 1.66 by root, Sat Dec 23 06:41:39 2006 UTC

188 188
189 /* Following are values used by any object */ 189 /* Following are values used by any object */
190 /* this objects turns into or what this object creates */ 190 /* this objects turns into or what this object creates */
191 treasurelist *ACC (RW, randomitems); /* Items to be generated */ 191 treasurelist *ACC (RW, randomitems); /* Items to be generated */
192 key_value *key_values; /* Fields not explictly known by the loader. */ 192 key_value *key_values; /* Fields not explictly known by the loader. */
193 flags_t flags; /* various flags */ 193 flags_t flag; /* various flags */
194 uint16 ACC (RW, animation_id);/* An index into the animation array */ 194 uint16 ACC (RW, animation_id);/* An index into the animation array */
195 uint8 ACC (RW, anim_speed); /* ticks between animation-frames */ 195 uint8 ACC (RW, anim_speed); /* ticks between animation-frames */
196 uint8 ACC (RW, last_anim); /* last sequence used to draw face */ 196 uint8 ACC (RW, last_anim); /* last sequence used to draw face */
197 sint32 ACC (RW, elevation); /* elevation of this terrain - not currently used */ 197 sint32 ACC (RW, elevation); /* elevation of this terrain - not currently used */
198 uint8 ACC (RW, smoothlevel); /* how to smooth this square around */ 198 uint8 ACC (RW, smoothlevel); /* how to smooth this square around */
290 bool is_weapon () const { return type == ARROW || type == BOW || type == WEAPON; } 290 bool is_weapon () const { return type == ARROW || type == BOW || type == WEAPON; }
291 bool is_armor () const { return type == ARMOUR || type == SHIELD || type == HELMET 291 bool is_armor () const { return type == ARMOUR || type == SHIELD || type == HELMET
292 || type == CLOAK || type == BOOTS || type == GLOVES 292 || type == CLOAK || type == BOOTS || type == GLOVES
293 || type == BRACERS || type == GIRDLE; } 293 || type == BRACERS || type == GIRDLE; }
294 bool is_alive () const { return (type == PLAYER 294 bool is_alive () const { return (type == PLAYER
295 || flags [FLAG_MONSTER] 295 || flag [FLAG_MONSTER]
296 || (flags [FLAG_ALIVE] && !flags [FLAG_GENERATOR] && type != DOOR)) 296 || (flag [FLAG_ALIVE] && !flag [FLAG_GENERATOR] && type != DOOR))
297 && !flags [FLAG_IS_A_TEMPLATE]; } 297 && !flag [FLAG_IS_A_TEMPLATE]; }
298 bool is_arrow () const { return type == ARROW 298 bool is_arrow () const { return type == ARROW
299 || (type == SPELL_EFFECT 299 || (type == SPELL_EFFECT
300 && (subtype == SP_BULLET || subtype == SP_MAGIC_MISSILE)); } 300 && (subtype == SP_BULLET || subtype == SP_MAGIC_MISSILE)); }
301 301
302 /* This return true if object has still randomitems which 302 /* This return true if object has still randomitems which
303 * could be expanded. 303 * could be expanded.
304 */ 304 */
305 bool has_random_items () const { return randomitems && !flags [FLAG_IS_A_TEMPLATE]; } 305 bool has_random_items () const { return randomitems && !flag [FLAG_IS_A_TEMPLATE]; }
306 306
307 // returns the player that has this object in his inventory, or 0 307 // returns the player that has this object in his inventory, or 0
308 object *in_player () const 308 object *in_player () const
309 { 309 {
310 for (object *op = env; op; op = op->env) 310 for (object *op = env; op; op = op->env)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines