--- deliantra/server/include/object.h 2006/12/30 21:07:46 1.74 +++ deliantra/server/include/object.h 2006/12/31 17:17:23 1.78 @@ -242,8 +242,8 @@ object *head; /* Points to the main object of a large body */ // NO ACC, perl semantics are different client_container *seen_by; // seen by which player/container currently? - static vector active; // active objects, not yet used - static vector objects; // not used yet, use first->next->... + //static vector active_list; // active objects, not yet used + //static vector object_list; // not used yet, use first->next->... static object *first; // will be replaced by "objects" MTH static object *create (); @@ -292,7 +292,7 @@ // info must hold 256 * 3 bytes currently const char *debug_desc (char *info) const; MTH const char *debug_desc () const; - const char *object::flag_desc (char *desc, int len) const; + const char *flag_desc (char *desc, int len) const; MTH bool is_weapon () const { return type == ARROW || type == BOW || type == WEAPON; } MTH bool is_armor () const { return type == ARMOUR || type == SHIELD || type == HELMET @@ -308,7 +308,7 @@ MTH bool has_active_speed () const { return FABS(speed) >= MIN_ACTIVE_SPEED; } - // temporary: wether the objetc can be saved in a map file + // temporary: wether the object can be saved in a map file // contr => is a player // head => only save head of a multitile object // owner => can not reference owner yet @@ -339,8 +339,11 @@ // handles both inventory and map "positions" MTH object *insert_at (object *where, object *originator = 0, int flags = 0); - MTH void activate (bool recursive = true); - MTH void deactivate (bool recursive = true); + MTH bool active () const; + MTH void activate (); + MTH void deactivate (); + MTH void activate_recursive (); + MTH void deactivate_recursive (); void enter_exit (object *exit);//PERL MTH void enter_map (maptile *newmap, int x, int y); @@ -364,6 +367,11 @@ object &operator * () const { return *item; } }; + MTH unsigned int random_seed () const + { + return (unsigned int)uuid.seq; + } + // depth-first recursive iterator struct depth_iterator : iterator_base {