[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:
Rumble 2007-09-13 15:00:59 +00:00
parent f95bff93e5
commit 6c84a36236
54 changed files with 14481 additions and 14187 deletions

View file

@ -2086,7 +2086,8 @@ void get_one_line(FILE *fl, char *buf)
buf[strlen(buf) - 1] = '\0'; /* take off the trailing \n */
}
void free_help(struct help_index_element *help) {
void free_help(struct help_index_element *help)
{
if (help->keywords)
free(help->keywords);
if (help->entry && !help->duplicate)
@ -2762,13 +2763,13 @@ void free_char(struct char_data *ch)
free(ch->player.long_descr);
if (ch->player.description)
free(ch->player.description);
if (ch->player_specials)
free(ch->player_specials);
for (i = 0; i < NUM_HIST; i++)
if (GET_HISTORY(ch, i))
free(GET_HISTORY(ch, i));
if (ch->player_specials)
free(ch->player_specials);
/* free script proto list */
free_proto_script(ch, MOB_TRIGGER);
@ -3052,21 +3053,21 @@ room_rnum real_room(room_vnum vnum)
bot = 0;
top = top_of_world;
if (world[bot].number > vnum || world[top].number < vnum)
return (NOWHERE);
/* perform binary search on world-table */
for (;;) {
while (bot<= top) {
mid = (bot + top) / 2;
if ((world + mid)->number == vnum)
return (mid);
if (bot > top)
return (NOWHERE);
if (top == 0)
return (NOWHERE);
if ((world + mid)->number > vnum)
top = mid - 1;
else
bot = mid + 1;
}
return (NOWHERE);
}
/* returns the real number of the monster with given virtual number */
@ -3077,21 +3078,22 @@ mob_rnum real_mobile(mob_vnum vnum)
bot = 0;
top = top_of_mobt;
/* quickly reject out-of-range vnums */
if (mob_index[bot].vnum > vnum || mob_index[top].vnum < vnum)
return (NOBODY);
/* perform binary search on mob-table */
for (;;) {
while (bot <= top) {
mid = (bot + top) / 2;
if ((mob_index + mid)->vnum == vnum)
return (mid);
if (bot > top)
return (NOBODY);
if (top == 0)
return (NOBODY);
if ((mob_index + mid)->vnum > vnum)
top = mid - 1;
else
bot = mid + 1;
}
return (NOBODY);
}
/* returns the real number of the object with given virtual number */
@ -3102,21 +3104,22 @@ obj_rnum real_object(obj_vnum vnum)
bot = 0;
top = top_of_objt;
/* quickly reject out-of-range vnums */
if (obj_index[bot].vnum > vnum || obj_index[top].vnum < vnum)
return (NOTHING);
/* perform binary search on obj-table */
for (;;) {
while (bot <= top) {
mid = (bot + top) / 2;
if ((obj_index + mid)->vnum == vnum)
return (mid);
if (bot > top)
return (NOTHING);
if (top == 0)
return (NOTHING);
if ((obj_index + mid)->vnum > vnum)
top = mid - 1;
else
bot = mid + 1;
}
return (NOTHING);
}
/* returns the real number of the zone with given virtual number */
@ -3127,21 +3130,21 @@ zone_rnum real_zone(zone_vnum vnum)
bot = 0;
top = top_of_zone_table;
if (zone_table[bot].number > vnum || zone_table[top].number < vnum)
return (NOWHERE);
/* perform binary search on zone-table */
for (;;) {
while (bot <= top) {
mid = (bot + top) / 2;
if ((zone_table + mid)->number == vnum)
return (mid);
if (bot > top)
return (NOWHERE);
if (top == 0)
return (NOWHERE);
if ((zone_table + mid)->number > vnum)
top = mid - 1;
else
bot = mid + 1;
}
return (NOWHERE);
}
/* Extend later to include more checks and add checks for unknown bitvectors. */