mirror of
https://github.com/tbamud/tbamud.git
synced 2026-02-09 17:44:20 +01:00
MUD 3.53
[Sep 13 2007] - Rumble Changed binary search functions (real_xxxx, real_zone_by_thing), except real_shop. (thanks Neme) script_proto list freed when exiting without saving in oedit/medit/redit. (thanks Neme) dg_olc.c, trigedit_save(): trig name and arg duping removed. (thanks Neme) genobj.c, update_all_obects(): object ID copied, no more 0 uid. (thanks Neme) CLEANUP_ALL in redit after saving a room. (thanks Neme) new function in genolc.c: free_save_list(), called during shutdown. (thanks Neme) Event_free_all() now frees all events. (thanks Neme) Fixed memory leak in perform_act(). (thanks Rhade) Changed NUM_BOARDS from 10 to 7 (the actual num of boards). (thanks Neme) Removed the Keywords option in hedit since they have to be in the body. [Sep 12 2007] - Rumble Fixed crash bug caused by olist with no objects. (Thanks Rhade) Several changes made to compile clean on older versions of GCC. (Thanks Neme) ?Sep 10 2007] - Rumble Fixed items with rnum = NOTHING or NOBODY being changed to rnum = 0. (Thanks Neme) Fixed memory leak in dg_olc.c trigedit save. (Thanks Neme) [Sep 04 2007] - Rumble Changed CLSOLC to LVL_BUILDER. removed delete_doubledollar from do_say. (thanks Rhade) [Sep 01 2007] - Rumble Made Puff a hidden mob since she is used on room entry trigs to do dg_cast. Fixed dg_affect to not add 1 to the desired affect duration. Fixed dg_affect to work with 128 bits.
This commit is contained in:
parent
f95bff93e5
commit
6c84a36236
54 changed files with 14481 additions and 14187 deletions
37
src/comm.c
37
src/comm.c
|
|
@ -109,6 +109,7 @@ static bool fCopyOver; /* Are we booting in copyover mode? */
|
|||
ush_int port;
|
||||
socket_t mother_desc;
|
||||
int log_this_messg;
|
||||
char *last_act_message = NULL;
|
||||
|
||||
/* local functions */
|
||||
RETSIGTYPE reread_wizlists(int sig);
|
||||
|
|
@ -172,6 +173,7 @@ void board_clear_all(void);
|
|||
void free_social_messages(void);
|
||||
void free_invalid_list(void);
|
||||
void free_command_list(void);
|
||||
void free_save_list(void);
|
||||
void load_config(void);
|
||||
void new_hist_messg(struct descriptor_data *d, const char *msg);
|
||||
#ifdef __CXREF__
|
||||
|
|
@ -210,6 +212,10 @@ int main(int argc, char **argv)
|
|||
int pos = 1;
|
||||
const char *dir;
|
||||
|
||||
#ifdef MEMORY_DEBUG
|
||||
zmalloc_init();
|
||||
#endif
|
||||
|
||||
#if CIRCLE_GNU_LIBC_MEMORY_TRACK
|
||||
mtrace(); /* This must come before any use of malloc(). */
|
||||
#endif
|
||||
|
|
@ -373,9 +379,13 @@ int main(int argc, char **argv)
|
|||
free_social_messages(); /* act.social.c */
|
||||
free_help_table(); /* db.c */
|
||||
free_invalid_list(); /* ban.c */
|
||||
free_save_list(); /* genolc.c */
|
||||
free_strings(&config_info, OASIS_CFG); /* oasis_delete.c */
|
||||
}
|
||||
|
||||
if (last_act_message)
|
||||
free(last_act_message);
|
||||
|
||||
/* probably should free the entire config here.. */
|
||||
free(CONFIG_CONFFILE);
|
||||
|
||||
|
|
@ -2402,7 +2412,7 @@ const char *ACTNULL = "<NULL>";
|
|||
#define CHECK_NULL(pointer, expression) \
|
||||
if ((pointer) == NULL) i = ACTNULL; else i = (expression);
|
||||
/* higher-level communication: the act() function */
|
||||
char *perform_act(const char *orig, struct char_data *ch, struct obj_data *obj,
|
||||
void perform_act(const char *orig, struct char_data *ch, struct obj_data *obj,
|
||||
const void *vict_obj, const struct char_data *to)
|
||||
{
|
||||
const char *i = NULL;
|
||||
|
|
@ -2525,13 +2535,14 @@ char *perform_act(const char *orig, struct char_data *ch, struct obj_data *obj,
|
|||
if ((IS_NPC(to) && dg_act_check) && (to != ch))
|
||||
act_mtrigger(to, lbuf, ch, dg_victim, obj, dg_target, dg_arg);
|
||||
|
||||
return strdup(lbuf);
|
||||
if (last_act_message)
|
||||
free(last_act_message);
|
||||
last_act_message = strdup(lbuf);
|
||||
}
|
||||
|
||||
char *act(const char *str, int hide_invisible, struct char_data *ch,
|
||||
struct obj_data *obj, const void *vict_obj, int type)
|
||||
{
|
||||
char *msg = NULL;
|
||||
const struct char_data *to;
|
||||
int to_sleeping;
|
||||
|
||||
|
|
@ -2556,14 +2567,18 @@ char *act(const char *str, int hide_invisible, struct char_data *ch,
|
|||
REMOVE_BIT(type, DG_NO_TRIG);
|
||||
|
||||
if (type == TO_CHAR) {
|
||||
if (ch && SENDOK(ch))
|
||||
return perform_act(str, ch, obj, vict_obj, ch);
|
||||
if (ch && SENDOK(ch)) {
|
||||
perform_act(str, ch, obj, vict_obj, ch);
|
||||
return last_act_message;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (type == TO_VICT) {
|
||||
if ((to = (const struct char_data *) vict_obj) != NULL && SENDOK(to))
|
||||
return perform_act(str, ch, obj, vict_obj, to);
|
||||
if ((to = (const struct char_data *) vict_obj) != NULL && SENDOK(to)) {
|
||||
perform_act(str, ch, obj, vict_obj, to);
|
||||
return last_act_message;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -2579,10 +2594,10 @@ char *act(const char *str, int hide_invisible, struct char_data *ch,
|
|||
!ROOM_FLAGGED(IN_ROOM(i->character), ROOM_SOUNDPROOF)) {
|
||||
|
||||
sprintf(buf, "%s%s%s", CCYEL(i->character, C_NRM), str, CCNRM(i->character, C_NRM));
|
||||
msg = perform_act(buf, ch, obj, vict_obj, i->character);
|
||||
perform_act(buf, ch, obj, vict_obj, i->character);
|
||||
}
|
||||
}
|
||||
return msg;
|
||||
return last_act_message;
|
||||
}
|
||||
/* ASSUMPTION: at this point we know type must be TO_NOTVICT or TO_ROOM */
|
||||
|
||||
|
|
@ -2602,9 +2617,9 @@ char *act(const char *str, int hide_invisible, struct char_data *ch,
|
|||
continue;
|
||||
if (type != TO_ROOM && to == vict_obj)
|
||||
continue;
|
||||
msg = perform_act(str, ch, obj, vict_obj, to);
|
||||
perform_act(str, ch, obj, vict_obj, to);
|
||||
}
|
||||
return msg;
|
||||
return last_act_message;
|
||||
}
|
||||
|
||||
/* Prefer the file over the descriptor. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue