Re: [CIRLCE] Bug in oasis olc pre 11

From: George Greer (greerga@circlemud.org)
Date: 06/10/99


On Thu, 10 Jun 1999, Nocturnal Occulto wrote:

>Ive found it I think, problem is in add_mobile
>in this line
>
>ZCMD(zone, cmd_no).arg1 += (ZCMD(zone, cmd_no).arg1 >= new_mob_num);
>
>problem is new_mob_num is always 0, that cant be correct.

Thanks for the leg work.

diff -up OasisOLCv2.0-pre11/genmob.c OasisOLCv2.0-pre12/genmob.c
--- OasisOLCv2.0-pre11/genmob.c Sun May 23 22:12:35 1999
+++ OasisOLCv2.0-pre12/genmob.c Thu Jun 10 18:54:04 1999
@@ -38,7 +38,7 @@ extern struct index_data *mob_index;

 int add_mobile(struct char_data *mob, mob_vnum vnum)
 {
-  int rnum, i, found = FALSE, shop, new_mob_num = 0, cmd_no;
+  int rnum, i, found = FALSE, shop, cmd_no;
   zone_rnum zone;
   struct char_data *live_mob;

@@ -107,7 +107,7 @@ int add_mobile(struct char_data *mob, mo
   for (zone = 0; zone <= top_of_zone_table; zone++)
     for (cmd_no = 0; ZCMD(zone, cmd_no).command != 'S'; cmd_no++)
       if (ZCMD(zone, cmd_no).command == 'M')
-       ZCMD(zone, cmd_no).arg1 += (ZCMD(zone, cmd_no).arg1 >= new_mob_num);
+       ZCMD(zone, cmd_no).arg1 += (ZCMD(zone, cmd_no).arg1 >= rnum);

   /*
    * Update shop keepers.

Sneaky variables...

--
George Greer
greerga@circlemud.org


     +------------------------------------------------------------+
     | 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