Re: OasisOLC v2.0-pre6 (Still getting there)

From: George Greer (greerga@circlemud.org)
Date: 05/13/99


On Fri, 14 May 1999, Fionn Colvin wrote:

>Ok, here's what happens now when I make a new item. :)

diff -up OasisOLCv2.0-pre6/genobj.c OasisOLCv2.0-pre7/genobj.c
--- OasisOLCv2.0-pre6/genobj.c  Thu May 13 21:18:31 1999
+++ OasisOLCv2.0-pre7/genobj.c  Fri May 14 00:44:48 1999
@@ -89,7 +89,8 @@ obj_rnum add_object(struct obj_data *new
      * Check if current virtual is bigger than our virtual number.
      */
     if (ovnum > obj_index[i - 1].vnum) {
-      obj_index[i].vnum = found = newobj->item_number = i;
+      found = newobj->item_number = i;
+      obj_index[i].vnum = ovnum;
       obj_index[i].number = 0;
       obj_index[i].func = NULL;
       obj_proto[i] = *newobj;
@@ -104,7 +105,8 @@ obj_rnum add_object(struct obj_data *new
   }

   if (!found) {
-    obj_index[0].vnum = newobj->item_number = found = 0;
+    newobj->item_number = found = 0;
+    obj_index[0].vnum = ovnum;
     obj_index[0].number = 0;
     obj_index[0].func = NULL;
     obj_proto[0] = *newobj;

I over-optimized. I was accidently assigning the real number to the index
instead of the virtual number.  Quite easy to find once I figured out
object #4 ended up as object #2.

--
George Greer            | Death's Gate Scripts
greerga@circlemud.org   | http://www.mindspring.com/~heilpern/dg_scripts/


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