--- deliantra/server/include/player.h 2009/11/06 13:21:20 1.96 +++ deliantra/server/include/player.h 2010/01/16 12:33:47 1.100 @@ -156,7 +156,8 @@ object_ptr ACC (RW, killer); /* Who last tried to kill this player (this object is usually destroyed) */ - char write_buf[MAX_BUF]; /* Holds arbitrary input from client */ /* should go */ + float speed_left_save; // spee doptimisation, see process_players[12] + 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 */ partylist *ACC (RW, party); /* Party this player is part of */ @@ -164,7 +165,7 @@ /* but we will have to get password first */ /* so we have to remember which party to */ /* join */ - char ACC (RW, search_str)[MAX_BUF]; /* Item we are looking for */ + char ACC (RW, search_str)[256]; /* Item we are looking for */ sint16 ACC (RW, encumbrance); /* How much our player is encumbered */ uint16 ACC (RW, outputs_sync); /* How often to print, no matter what */ uint16 ACC (RW, outputs_count); /* Print if this count is exceeded */ @@ -178,6 +179,18 @@ //-GPL + // stats updates are very costly, so delay them if at all possible + bool ACC (RW, delayed_update); + void queue_stats_update () + { + delayed_update = true; + } + void need_updated_stats () + { + if (delayed_update) + ob->update_stats (); + } + // return the los value for the given coordinate MTH sint8 blocked_los (int dx, int dy) const { @@ -200,7 +213,7 @@ shstr ACC (RW, invis_race); /* What race invisible to? */ - MTH const char *killer_name () const; // makes a string out of ->killer + MTH const_utf8_string killer_name () const; // makes a string out of ->killer MTH static player *create (); static player *find (const_utf8_string name); @@ -262,6 +275,12 @@ // improvement potion. should not be long. MTH void failmsg (const char *msg, int color = NDI_RED); + MTH void update_spells () const + { + if (ns) + ns->update_spells = true; + } + ~player (); private: