--- deliantra/server/include/player.h 2009/11/05 15:57:16 1.95 +++ deliantra/server/include/player.h 2009/11/19 04:30:46 1.99 @@ -90,7 +90,7 @@ }; // used for pet monster logic etc. -static bool +static inline bool same_party (partylist *a, partylist *b) { return a == b && a; @@ -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 { @@ -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: