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.9 2006/08/29 07:33:58 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? */ |
… | |
… | |
207 | Output_Buf outputs[NUM_OUTPUT_BUFS]; /* holds output strings to client */ |
205 | Output_Buf outputs[NUM_OUTPUT_BUFS]; /* holds output strings to client */ |
208 | uint16 outputs_sync; /* How often to print, no matter what */ |
206 | uint16 outputs_sync; /* How often to print, no matter what */ |
209 | uint16 outputs_count; /* Print if this count is exceeded */ |
207 | uint16 outputs_count; /* Print if this count is exceeded */ |
210 | object *mark; /* marked object */ |
208 | object *mark; /* marked object */ |
211 | uint32 mark_count; /* count of mark object */ |
209 | uint32 mark_count; /* count of mark object */ |
212 | object *transport; /* transport the player is in */ |
|
|
213 | /* Special DM fields */ |
210 | /* Special DM fields */ |
214 | tag_t* stack_items; /* Item stack for patch/dump/... commands */ |
211 | tag_t* stack_items; /* Item stack for patch/dump/... commands */ |
215 | int stack_position; /* Current stack position, 0 for no item */ |
212 | int stack_position; /* Current stack position, 0 for no item */ |
|
|
213 | }; |
216 | |
214 | |
217 | void *self, *cb; // CF+ perl's self and callback registry |
215 | typedef struct pl : player_memset, attachable<struct pl> |
|
|
216 | { |
|
|
217 | static data_type get_dt () { return DT_PLAYER; } |
|
|
218 | |
|
|
219 | struct pl *next; /* Pointer to next player, NULL if this is last */ |
|
|
220 | NewSocket socket; /* Socket information for this player */ |
218 | } player; |
221 | } player; |
|
|
222 | |