Red: iedit/redit... redit fix

From: Greg Alexander Irvine (s9211947@arcadia.cs.rmit.edu.au)
Date: 11/21/95


Here's a fix for the zone resetting problem in redit...

This piece of code goes in the function redit_parse(), 
in the case REDIT_CONFIRM_SAVESTRING in the switch statement (line 341?)

The code itself goes in at approximately line 473, immediately before the 
"Do you want to save this room to disk" send_to_char.


------- CUT HERE -------

#define ZCMD zone_table[zone].cmd[cmd_no]

            /* update the zone_table */
          for (zone = 0; zone < top_of_zone_table; zone++)
            for (cmd_no = 0; ZCMD.command != 'S'; cmd_no++)
              switch (ZCMD.command)  {
                case 'M':
                  if (ZCMD.arg3 >= room_num)
                    ZCMD.arg3++;
                  break;
                case 'O':
                  if (ZCMD.arg3 >= room_num)
                    ZCMD.arg3++;
                  break;
                case 'D':
                  if (ZCMD.arg1 >= room_num)
                    ZCMD.arg1++;
                  break;
                case 'R':
                  if (ZCMD.arg1 >= room_num)
                    ZCMD.arg1++;
                  break;
              }
        }

------- END OF CODE -------


This code updates the zone_table, which controls the zone resetting, and
is effectively an online copy of the .zon world files.

There may be other bugs I haven't encountered yet in redit... as for
iedit, who knows. :)


Regards,
	Greg  (aka Ted from here there and everywhere)



This archive was generated by hypermail 2b30 : 12/07/00 PST