… | |
… | |
128 | sint8 last_level; /* Last level we sent to client */ |
128 | sint8 last_level; /* Last level we sent to client */ |
129 | |
129 | |
130 | /* Try to put all the bitfields together - saves some small amount of memory */ |
130 | /* Try to put all the bitfields together - saves some small amount of memory */ |
131 | uint32 braced:1; /* Will not move if braced, only attack */ |
131 | uint32 braced:1; /* Will not move if braced, only attack */ |
132 | uint32 tmp_invis:1; /* Will invis go away when we attack ? */ |
132 | uint32 tmp_invis:1; /* Will invis go away when we attack ? */ |
133 | shstr invis_race; /* What race invisible to? */ |
|
|
134 | uint32 do_los:1; /* If true, need to call update_los() in draw(), and clear */ |
133 | uint32 do_los:1; /* If true, need to call update_los() in draw(), and clear */ |
135 | uint32 fire_on:1; /* Player should fire object, not move */ |
134 | uint32 fire_on:1; /* Player should fire object, not move */ |
136 | uint32 run_on:1; /* Player should keep moving in dir until run is off */ |
135 | uint32 run_on:1; /* Player should keep moving in dir until run is off */ |
137 | uint32 has_hit:1; /* If set, weapon_sp instead of speed will count */ |
136 | uint32 has_hit:1; /* If set, weapon_sp instead of speed will count */ |
138 | uint32 name_changed:1; /* If true, the player has set a name. */ |
137 | uint32 name_changed:1; /* If true, the player has set a name. */ |
… | |
… | |
175 | sint8 levhp[11]; /* What the player gained on that level */ |
174 | sint8 levhp[11]; /* What the player gained on that level */ |
176 | sint8 levsp[11]; /* Same for sp */ |
175 | sint8 levsp[11]; /* Same for sp */ |
177 | sint8 levgrace[11]; /* And same for grace */ |
176 | sint8 levgrace[11]; /* And same for grace */ |
178 | |
177 | |
179 | char killer[BIG_NAME]; /* Who killed this player. */ |
178 | char killer[BIG_NAME]; /* Who killed this player. */ |
180 | char last_tell[MAX_NAME]; /* last player that told you something [mids 01/14/2002] */ |
|
|
181 | |
179 | |
182 | char write_buf[MAX_BUF]; /* Holds arbitrary input from client */ |
180 | char write_buf[MAX_BUF]; /* Holds arbitrary input from client */ |
183 | char input_buf[MAX_BUF]; /* Holds command to run */ |
181 | char input_buf[MAX_BUF]; /* Holds command to run */ |
184 | char password[16]; /* 2 (seed) + 11 (crypted) + 1 (EOS) + 2 (safety) = 16 */ |
182 | char password[16]; /* 2 (seed) + 11 (crypted) + 1 (EOS) + 2 (safety) = 16 */ |
185 | |
183 | |
… | |
… | |
208 | typedef struct pl : zero_initialised, attachable<struct pl>, player_pod |
206 | typedef struct pl : zero_initialised, attachable<struct pl>, player_pod |
209 | { |
207 | { |
210 | struct pl *next; /* Pointer to next player, NULL if this is last */ |
208 | struct pl *next; /* Pointer to next player, NULL if this is last */ |
211 | NewSocket socket; /* Socket information for this player */ |
209 | NewSocket socket; /* Socket information for this player */ |
212 | Output_Buf outputs[NUM_OUTPUT_BUFS]; /* holds output strings to client */ |
210 | Output_Buf outputs[NUM_OUTPUT_BUFS]; /* holds output strings to client */ |
|
|
211 | shstr invis_race; /* What race invisible to? */ |
213 | |
212 | |
214 | void clear () |
213 | void clear () |
215 | { |
214 | { |
216 | memset (static_cast<player_pod *>(this), 0, sizeof (player_pod)); |
215 | memset (static_cast<player_pod *>(this), 0, sizeof (player_pod)); |
217 | attachable_clear (); |
216 | attachable_clear (); |
|
|
217 | invis_race = 0; |
218 | |
218 | |
219 | for (int i = 0; i < NUM_OUTPUT_BUFS; i++) |
219 | for (int i = 0; i < NUM_OUTPUT_BUFS; i++) |
220 | outputs[i].buf = 0; |
220 | outputs[i].buf = 0; |
221 | } |
221 | } |
222 | } player; |
222 | } player; |