1 | /* |
1 | /* |
2 | * static char *rcsid_player_h = |
2 | * static char *rcsid_player_h = |
3 | * "$Id: player.h,v 1.5 2006/08/25 17:11:53 root Exp $"; |
3 | * "$Id: player.h,v 1.7 2006/08/27 16:15:12 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 | |
… | |
… | |
104 | #endif |
104 | #endif |
105 | sint64 total_exp; |
105 | sint64 total_exp; |
106 | uint32 kills; |
106 | uint32 kills; |
107 | } partylist; |
107 | } partylist; |
108 | |
108 | |
109 | // the layout of this structure cnanot be changed unless adjusting the inialisation code |
109 | // memsettable part of player |
110 | // in server/player.c:get_player has been verified. |
110 | struct player_memset |
111 | typedef struct pl { |
111 | { |
112 | struct pl *next; /* Pointer to next player, NULL if this is last */ |
|
|
113 | NewSocket socket; /* Socket information for this player */ |
|
|
114 | object *ob; /* The object representing the player */ |
112 | object *ob; /* The object representing the player */ |
115 | mapstruct *loading; /* When entering a map in progress of loading, not really used */ |
113 | mapstruct *loading; /* When entering a map in progress of loading, not really used */ |
116 | rangetype shoottype; /* Which range-attack is being used by player */ |
114 | rangetype shoottype; /* Which range-attack is being used by player */ |
117 | bowtype_t bowtype; /* which firemode? */ |
115 | bowtype_t bowtype; /* which firemode? */ |
118 | petmode_t petmode; /* which petmode? */ |
116 | petmode_t petmode; /* which petmode? */ |
… | |
… | |
211 | uint32 mark_count; /* count of mark object */ |
209 | uint32 mark_count; /* count of mark object */ |
212 | object *transport; /* transport the player is in */ |
210 | object *transport; /* transport the player is in */ |
213 | /* Special DM fields */ |
211 | /* Special DM fields */ |
214 | tag_t* stack_items; /* Item stack for patch/dump/... commands */ |
212 | tag_t* stack_items; /* Item stack for patch/dump/... commands */ |
215 | int stack_position; /* Current stack position, 0 for no item */ |
213 | int stack_position; /* Current stack position, 0 for no item */ |
|
|
214 | }; |
216 | |
215 | |
217 | void *self, *cb; // CF+ perl's self and callback registry |
216 | typedef struct pl : player_memset, extendable<struct pl> |
|
|
217 | { |
|
|
218 | static data_type get_dt () { return DT_PLAYER; } |
|
|
219 | |
|
|
220 | struct pl *next; /* Pointer to next player, NULL if this is last */ |
|
|
221 | NewSocket socket; /* Socket information for this player */ |
218 | } player; |
222 | } player; |
|
|
223 | |