From 45cf3ade3419ab24665869375a95e6495814e5d5 Mon Sep 17 00:00:00 2001 From: Vatiken Date: Thu, 9 Aug 2012 03:10:35 +0000 Subject: [PATCH] Fixed respawn bug and npc memory issue. --- changelog | 13 +++++++++++++ src/comm.c | 8 +++++++- src/handler.c | 13 +++++++++++-- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/changelog b/changelog index 8a6f35c..3345684 100644 --- a/changelog +++ b/changelog @@ -2,6 +2,19 @@ TbaMUD is currently being developed by The Builder Academy. If you need any help, find any bugs, or have ideas for improvement please stop by TBA at telnet://tbamud.com:9091 or email rumble@tbamud.com --Rumble @ +[Aug 08 2012] - Vatiken + bug: fixed another copyover issue that resulted in dying character respawning at corpse. + bug: fixed an issue where a PC could be remembered after dying. (Thanks Zusuk) + improve: cleaned up some code and did some colour adjustments. + feature: new debug toggle with 4 settings. + bug: fixed an issue with hedit that prevented editing of certain helpfiles. + feature: added message editor for combat messages. + bug: fixed a small bug with colour codes in interpreter.c. + bug: fixed crash bug in oasis_lists.c caused by buffer overflows. + bug: fixed issue with certain clients that were adding extra new-lines. + bug: fixed crash bug in improved editor. + improve: cedit toggle for colour codes in comm channels. + typo: Fixed typo in do_scan. [May 28 2012] - Vatiken bug: Fixed a MAJOR duping issue. [May 24 2012] - Vatiken diff --git a/src/comm.c b/src/comm.c index f8505b8..aeacc11 100644 --- a/src/comm.c +++ b/src/comm.c @@ -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); diff --git a/src/handler.c b/src/handler.c index 4a0c568..9d69ec7 100644 --- a/src/handler.c +++ b/src/handler.c @@ -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);