[CODE] objsave.c

From: Andrey Fidrya (andrey@alex-ua.com)
Date: 05/30/99

Investigating further (player collected few mlns of experience during
a hour of play and then lost them after crash), I have found one strange
thing in Crash_save_all, objsave.c:

void Crash_save_all(void)
  struct descriptor_data *d;
  for (d = descriptor_list; d; d = d->next) {
    if ((STATE(d) == CON_PLAYING) && !IS_NPC(d->character)) {
+   /* Zmey: saving exp, levels & other stats shouldn't depend
+       on PLR_CRASH (item transfer) flag */
+   save_char(d->character, NOWHERE);
      if (PLR_FLAGGED(d->character, PLR_CRASH)) {
-   save_char(d->character, NOWHERE);
    REMOVE_BIT(PLR_FLAGS(d->character), PLR_CRASH);

But there's a problem... MUDs with 300+ players online will probably lag a
bit... To eliminate useless saving, I suggest making a new PLR_SAVEME
flag & set it when players's stats are modified, then save players, who have
this flag set.

Zmey // 3MoonsWorld (rmud.net.ru:4000)

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |

This archive was generated by hypermail 2b30 : 12/15/00 PST