--- deliantra/server/include/player.h 2006/12/21 23:37:05 1.30 +++ deliantra/server/include/player.h 2006/12/22 16:34:00 1.31 @@ -162,7 +162,6 @@ living ACC (RO, last_stats); /* Last stats as sent to client */ float ACC (RW, last_speed); /* Last speed as sent to client */ sint16 last_resist[NROFATTACKS]; /* last resist values sent to client */ - int Swap_First; /* First stat player has selected to swap */ object_ptr ACC (RW, last_used); /* Pointer to object last picked or applied */ sint16 ACC (RW, bed_x), ACC (RW, bed_y); /* x,y - coordinates of respawn (savebed) */ @@ -180,8 +179,7 @@ char ACC (RW, killer)[64]; /* Who killed this player. */ - char write_buf[MAX_BUF]; /* Holds arbitrary input from client */ - char input_buf[MAX_BUF]; /* Holds command to run */ + char write_buf[MAX_BUF]; /* Holds arbitrary input from client */ /* should go */ char ACC (RW, password)[16]; /* 2 (seed) + 11 (crypted) + 1 (EOS) + 2 (safety) = 16 */ time_t ACC (RW, last_save_time); @@ -206,10 +204,11 @@ struct player : zero_initialised, attachable, player_pod { - player *next; /* Pointer to next player, NULL if this is last */ + player *ACC (RW, next); /* Pointer to next player, NULL if this is last */ client *ACC (RO, ns); /* Socket information for this player */ + shstr ACC (RW, invis_race); /* What race invisible to? */ + bool ACC (RW, enable_save); Output_Buf outputs[NUM_OUTPUT_BUFS]; /* holds output strings to client */ - shstr invis_race; /* What race invisible to? */ void clear () { @@ -220,5 +219,17 @@ for (int i = 0; i < NUM_OUTPUT_BUFS; i++) outputs[i].buf = 0; } + + static player *create (); + static player *load (const char *path); + void save (bool final = false); + + void connect (client *ns); + + ~player (); + +private: + void set_object (object *op); + player (); };