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.179 by root, Mon Jul 14 23:57:46 2008 UTC vs.
Revision 1.181 by root, Fri Sep 19 01:39:45 2008 UTC

175 arch_ptr ACC (RW, arch); /* Pointer to archetype */ 175 arch_ptr ACC (RW, arch); /* Pointer to archetype */
176 arch_ptr ACC (RW, other_arch);/* Pointer used for various things - mostly used for what */ 176 arch_ptr ACC (RW, other_arch);/* Pointer used for various things - mostly used for what */
177 177
178 float ACC (RW, speed); /* The overall speed of this object */ 178 float ACC (RW, speed); /* The overall speed of this object */
179 float ACC (RW, speed_left); /* How much speed is left to spend this round */ 179 float ACC (RW, speed_left); /* How much speed is left to spend this round */
180 uint32 ACC (RW, nrof); /* How many of the objects */ 180 sint32 ACC (RW, nrof); /* How many of the objects */
181 181
182 /* This next big block is basically used for monsters and equipment */ 182 /* This next big block is basically used for monsters and equipment */
183 uint16 ACC (RW, client_type); /* Public type information. see doc/Developers/objects */ 183 uint16 ACC (RW, client_type); /* Public type information. see doc/Developers/objects */
184 184
185 sint16 ACC (RW, resist[NROFATTACKS]); /* Resistance adjustments for attacks */ 185 sint16 ACC (RW, resist[NROFATTACKS]); /* Resistance adjustments for attacks */
472 MTH bool has_dialogue () const { return *&msg == '@'; } 472 MTH bool has_dialogue () const { return *&msg == '@'; }
473 473
474 // returns the outermost owner, never returns 0 474 // returns the outermost owner, never returns 0
475 MTH object *outer_owner () 475 MTH object *outer_owner ()
476 { 476 {
477 object *op;
478
477 for (object *op = this; ; op = op->owner) 479 for (op = this; op->owner; op = op->owner)
478 if (!op->owner) 480 ;
481
479 return op; 482 return op;
480 } 483 }
481 484
482 // returns the outermost environment, never returns 0 485 // returns the outermost environment, never returns 0
483 MTH object *outer_env () 486 MTH object *outer_env ()
484 { 487 {
488 object *op;
489
485 for (object *op = this; ; op = op->env) 490 for (op = this; op->env; op = op->env)
486 if (!op->env) 491 ;
492
487 return op; 493 return op;
488 } 494 }
489 495
490 // returns the player that has this object in his inventory, or 0 496 // returns the player that has this object in his inventory, or 0
491 // we assume the player is always the outer env 497 // we assume the player is always the outer env
492 MTH object *in_player () 498 MTH object *in_player ()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines