… | |
… | |
88 | /* However, if you're keeping a pointer of some sort, you probably |
88 | /* However, if you're keeping a pointer of some sort, you probably |
89 | * don't just want it copied, so you'll need to add to common/object.C, |
89 | * don't just want it copied, so you'll need to add to common/object.C, |
90 | * e.g. ->copy_to () |
90 | * e.g. ->copy_to () |
91 | */ |
91 | */ |
92 | |
92 | |
93 | typedef refptr<object> object_ptr; |
|
|
94 | typedef refptr<archetype> arch_ptr; |
|
|
95 | |
|
|
96 | // these are not being copied |
93 | // these are not being copied |
97 | ACC_CLASS (object) |
94 | ACC_CLASS (object) |
98 | struct object_keep : refcounted |
95 | struct object_keep : refcounted |
99 | { |
96 | { |
100 | /* These variables are not changed by ->copy_to */ |
97 | /* These variables are not changed by ->copy_to */ |
101 | |
98 | |
102 | tag_t ACC (RW, count); /* Generation count for this object */ |
99 | tag_t ACC (RW, count); /* Generation count for this object */ |
103 | UUID ACC (RW, uuid); // Unique Identifier, survives saves etc. |
100 | UUID ACC (RW, uuid); // Unique Identifier, survives saves etc. |
104 | |
101 | |
105 | player *ACC (RW, contr); /* Pointer to the player which control this object */ |
102 | player_ptr ACC (RW, contr); /* Pointer to the player which control this object */ |
106 | object *ACC (RW, next); /* Pointer to the next object in the free/used list */ |
103 | object *ACC (RW, next); /* Pointer to the next object in the free/used list */ |
107 | object *ACC (RW, prev); /* Pointer to the previous object in the free/used list */ |
104 | object *ACC (RW, prev); /* Pointer to the previous object in the free/used list */ |
108 | object *ACC (RW, active_next);/* Next & previous object in the 'active' */ |
105 | object *ACC (RW, active_next);/* Next & previous object in the 'active' */ |
109 | object *ACC (RW, active_prev);/* List. This is used in process_events */ |
106 | object *ACC (RW, active_prev);/* List. This is used in process_events */ |
110 | /* so that the entire object list does not */ |
107 | /* so that the entire object list does not */ |