Fixed respawn bug and npc memory issue.

This commit is contained in:
Vatiken
2012-08-09 03:10:35 +00:00
parent 336275220b
commit 45cf3ade34
3 changed files with 31 additions and 3 deletions

View File

@@ -460,7 +460,7 @@ void copyover_recover()
if (!PLR_FLAGGED(d->character, PLR_DELETED)) {
REMOVE_BIT_AR(PLR_FLAGS(d->character), PLR_WRITING);
REMOVE_BIT_AR(PLR_FLAGS(d->character), PLR_MAILING);
REMOVE_BIT_AR(PLR_FLAGS(d->character), PLR_CRYO);
REMOVE_BIT_AR(PLR_FLAGS(d->character), PLR_CRYO);
} else
fOld = FALSE;
} else
@@ -473,7 +473,13 @@ void copyover_recover()
} else {
write_to_descriptor (desc, "\n\rCopyover recovery complete.\n\r");
GET_PREF(d->character) = pref;
enter_player_game(d);
/* Clear their load room if it's not persistant. */
if (!PLR_FLAGGED(d->character, PLR_LOADROOM))
GET_LOADROOM(d->character) = NOWHERE;
d->connected = CON_PLAYING;
look_at_room(d->character, 0);

View File

@@ -930,10 +930,19 @@ void extract_char_final(struct char_data *ch)
if (FIGHTING(k) == ch)
stop_fighting(k);
}
/* we can't forget the hunters either... */
for (temp = character_list; temp; temp = temp->next)
/* Whipe character from the memory of hunters and other intelligent NPCs... */
for (temp = character_list; temp; temp = temp->next) {
/* PCs can't use MEMORY, and don't use HUNTING() */
if (!IS_NPC(temp))
continue;
/* If "temp" is hunting our extracted char, stop the hunt. */
if (HUNTING(temp) == ch)
HUNTING(temp) = NULL;
/* If "temp" has allocated memory data and our ch is a PC, forget the
* extracted character (if he/she is remembered) */
if (!IS_NPC(ch) && MEMORY(temp))
forget(temp, ch); /* forget() is safe to use without a check. */
}
char_from_room(ch);