--- deliantra/server/include/player.h 2006/04/19 08:25:25 1.3 +++ deliantra/server/include/player.h 2006/08/27 17:59:26 1.8 @@ -37,7 +37,7 @@ /* wand/rod/horn rolled into range_misc. They all use the same body location * anyways. */ -typedef enum rangetype { +enum rangetype { range_bottom = -1, range_none = 0, range_bow = 1, @@ -47,9 +47,9 @@ range_skill = 5, range_builder = 6, range_size = 7 -} rangetype; +}; -typedef enum _bowtype { +enum bowtype_t { bow_normal = 0, bow_threewide = 1, bow_spreadshot = 2, @@ -62,7 +62,7 @@ bow_w = 9, bow_nw = 10, /* must stay at 10 */ bow_bestarrow = 11 -} bowtype_t; +}; typedef enum _petmode { pet_normal = 0, @@ -106,13 +106,11 @@ uint32 kills; } partylist; -// the layout of this structure cnanot be changed unless adjusting the inialisation code -// in server/player.c:get_player has been verified. -typedef struct pl { - struct pl *next; /* Pointer to next player, NULL if this is last */ - NewSocket socket; /* Socket information for this player */ +// memsettable part of player +struct player_memset +{ object *ob; /* The object representing the player */ - struct mapdef *loading; /* When entering a map in progress of loading, not really used */ + mapstruct *loading; /* When entering a map in progress of loading, not really used */ rangetype shoottype; /* Which range-attack is being used by player */ bowtype_t bowtype; /* which firemode? */ petmode_t petmode; /* which petmode? */ @@ -213,4 +211,13 @@ /* Special DM fields */ tag_t* stack_items; /* Item stack for patch/dump/... commands */ int stack_position; /* Current stack position, 0 for no item */ +}; + +typedef struct pl : player_memset, attachable +{ + static data_type get_dt () { return DT_PLAYER; } + + struct pl *next; /* Pointer to next player, NULL if this is last */ + NewSocket socket; /* Socket information for this player */ } player; +