--- deliantra/server/include/object.h 2006/09/14 01:12:28 1.35 +++ deliantra/server/include/object.h 2006/09/14 17:10:25 1.36 @@ -86,7 +86,7 @@ ACC_CLASS (object) struct object_keep : refcounted { - tag_t ACC (RW, count); /* Unique object number for this object */ + tag_t ACC (RW, count); /* Generation count for this object */ UUID uuid; // Unique Identifier, survives saves etc. /* These variables are not changed by copy_object() */ @@ -139,11 +139,11 @@ // these are being copied and also cleared struct object_pod { + New_Face *ACC (RW, face); /* Face with colors */ sint16 ACC (RW, x), ACC (RW, y); /* Position in the map for this object */ float ACC (RW, speed); /* The overall speed of this object */ float ACC (RW, speed_left); /* How much speed is left to spend this round */ uint32 ACC (RW, nrof); /* How many of the objects */ - New_Face *ACC (RW, face); /* Face with colors */ sint8 ACC (RW, direction); /* Means the object is moving that way. */ sint8 ACC (RW, facing); /* Object is oriented/facing that way. */ @@ -176,17 +176,15 @@ sint32 ACC (RW, weight); /* Attributes of the object */ sint32 ACC (RW, weight_limit); /* Weight-limit of object */ sint32 ACC (RW, carrying); /* How much weight this object contains */ - living ACC (RO, stats); /* Str, Con, Dex, etc */ sint64 ACC (RW, perm_exp); /* Permanent exp */ uint32 ACC (RW, weapontype); /* type of weapon */ uint32 ACC (RW, tooltype); /* type of tool or build facility */ sint8 body_info[NUM_BODY_LOCATIONS]; /* body info as loaded from the file */ sint8 body_used[NUM_BODY_LOCATIONS]; /* Calculated value based on items equipped */ + living ACC (RO, stats); /* Str, Con, Dex, etc */ /* See the doc/Developers/objects for more info about body locations */ /* Following mostly refers to fields only used for monsters */ - tag_t ACC (RW, ownercount); /* What count the owner had (in case owner has been freed) *///TODO: remove/fix - tag_t ACC (RW, attacked_by_count); /* the tag of attacker, so we can be sure */ uint32 ACC (RW, hide); /* The object is hidden, not invisible */ /* changes made by kholland@sunlab.cit.cornell.edu */ /* allows different movement patterns for attackers */ @@ -203,11 +201,11 @@ sint16 ACC (RW, duration); /* How long the spell lasts */ sint16 ACC (RW, casting_time); /* time left before spell goes off */ uint16 ACC (RW, start_holding); - char *ACC (RW, spellarg); uint8 ACC (RW, duration_modifier); /* how level modifies duration */ uint8 ACC (RW, dam_modifier); /* How going up in level effects damage */ sint8 ACC (RW, range); /* Range of the spell */ uint8 ACC (RW, range_modifier); /* How going up in level effects range */ + char *ACC (RW, spellarg); /* Following are values used by any object */ struct treasureliststruct *ACC (RW, randomitems); /* Items to be generated */ @@ -252,7 +250,6 @@ } void set_owner (object *owner); - object *get_owner (); // info must hold 256 * 3 bytes currently const char *debug_desc (char *info) const; @@ -308,14 +305,9 @@ #define free_object2(op, free_inv) (op)->free (free_inv) #define clear_owner(op) (op)->owner = 0 #define copy_owner(op,other) (op)->owner = (other)->owner +#define get_owner(op) (op)->owner #define clear_object(op) (op)->clear () -static inline object * -get_owner (object *op) -{ - return op->get_owner (); -} - static inline void set_owner (object *op, object *owner) {