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.8 by root, Sun Aug 27 16:15:12 2006 UTC vs.
Revision 1.11 by root, Tue Aug 29 05:03:55 2006 UTC

1/* 1/*
2 * static char *rcsid_object_h = 2 * static char *rcsid_object_h =
3 * "$Id: object.h,v 1.8 2006/08/27 16:15:12 root Exp $"; 3 * "$Id: object.h,v 1.11 2006/08/29 05:03:55 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
99 * related ones, etc. 99 * related ones, etc.
100 * This structure is best viewed with about a 100 width screen. 100 * This structure is best viewed with about a 100 width screen.
101 * MSW 2002-07-05 101 * MSW 2002-07-05
102 */ 102 */
103 103
104struct object_simple : extendable<object> { 104struct object_simple : attachable<object> {
105 static data_type get_dt () { return DT_OBJECT; } 105 static data_type get_dt () { return DT_OBJECT; }
106 106
107 /* These variables are not changed by copy_object() */ 107 /* These variables are not changed by copy_object() */
108 struct pl *contr; /* Pointer to the player which control this object */ 108 struct pl *contr; /* Pointer to the player which control this object */
109 struct object *next; /* Pointer to the next object in the free/used list */ 109 struct object *next; /* Pointer to the next object in the free/used list */
187 sint32 weight_limit; /* Weight-limit of object */ 187 sint32 weight_limit; /* Weight-limit of object */
188 sint32 carrying; /* How much weight this object contains */ 188 sint32 carrying; /* How much weight this object contains */
189 sint8 glow_radius; /* indicates the glow radius of the object */ 189 sint8 glow_radius; /* indicates the glow radius of the object */
190 living stats; /* Str, Con, Dex, etc */ 190 living stats; /* Str, Con, Dex, etc */
191 sint64 perm_exp; /* Permanent exp */ 191 sint64 perm_exp; /* Permanent exp */
192 const char *current_weapon_script; /* The script of the currently used weapon. Executed */
193 /* each time the object attacks something */
194 struct object *current_weapon; /* Pointer to the weapon currently used */ 192 struct object *current_weapon; /* Pointer to the weapon currently used */
195 uint32 weapontype; /* type of weapon */ 193 uint32 weapontype; /* type of weapon */
196 uint32 tooltype; /* type of tool or build facility */ 194 uint32 tooltype; /* type of tool or build facility */
197 sint8 body_info[NUM_BODY_LOCATIONS]; /* body info as loaded from the file */ 195 sint8 body_info[NUM_BODY_LOCATIONS]; /* body info as loaded from the file */
198 sint8 body_used[NUM_BODY_LOCATIONS]; /* Calculated value based on items equipped */ 196 sint8 body_used[NUM_BODY_LOCATIONS]; /* Calculated value based on items equipped */
258 const char *custom_name; /* Custom name assigned by player */ 256 const char *custom_name; /* Custom name assigned by player */
259 key_value *key_values; /* Fields not explictly known by the loader. */ 257 key_value *key_values; /* Fields not explictly known by the loader. */
260}; 258};
261 259
262struct object : object_special, object_simple { 260struct 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) 261 void clone (object *destination)
274 { 262 {
275 if (attach) 263 if (attach)
276 destination->attach = add_refcount (attach); 264 destination->attach = add_refcount (attach);
277 265

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines