1 | /* |
1 | /* |
2 | * static char *rcsid_object_h = |
2 | * static char *rcsid_object_h = |
3 | * "$Id: object.h,v 1.9 2006/08/27 17:59:26 root Exp $"; |
3 | * "$Id: object.h,v 1.10 2006/08/28 16:52:51 root Exp $"; |
4 | */ |
4 | */ |
5 | |
5 | |
6 | /* |
6 | /* |
7 | CrossFire, A Multiplayer game for X-windows |
7 | CrossFire, A Multiplayer game for X-windows |
8 | |
8 | |
… | |
… | |
258 | const char *custom_name; /* Custom name assigned by player */ |
258 | const char *custom_name; /* Custom name assigned by player */ |
259 | key_value *key_values; /* Fields not explictly known by the loader. */ |
259 | key_value *key_values; /* Fields not explictly known by the loader. */ |
260 | }; |
260 | }; |
261 | |
261 | |
262 | struct object : object_special, object_simple { |
262 | struct object : object_special, object_simple { |
263 | void instantiate_ (); |
|
|
264 | void instantiate () |
|
|
265 | { |
|
|
266 | if (attach) |
|
|
267 | { |
|
|
268 | instantiate_ (); |
|
|
269 | free_string (attach); |
|
|
270 | attach = 0; |
|
|
271 | } |
|
|
272 | } |
|
|
273 | void clone (object *destination) |
263 | void clone (object *destination) |
274 | { |
264 | { |
275 | if (attach) |
265 | if (attach) |
276 | destination->attach = add_refcount (attach); |
266 | destination->attach = add_refcount (attach); |
277 | |
267 | |