[ScryMUD] SVN Commit Info r783 - branches/version-2-1/mud/grrmud/server
scrymud at wanfear.com
scrymud at wanfear.com
Sat Dec 18 21:28:07 PST 2004
Author: eroper
Date: 2004-12-18 21:28:06 -0800 (Sat, 18 Dec 2004)
New Revision: 783
Modified:
branches/version-2-1/mud/grrmud/server/misc.cc
Log:
merged -r770:771 (from the former people/eroper/automapper branch).
This makes verifydoors an IMM command and checks door distances.
Modified: branches/version-2-1/mud/grrmud/server/misc.cc
===================================================================
--- branches/version-2-1/mud/grrmud/server/misc.cc 2004-12-19 05:24:32 UTC (rev 782)
+++ branches/version-2-1/mud/grrmud/server/misc.cc 2004-12-19 05:28:06 UTC (rev 783)
@@ -3152,6 +3152,10 @@
String *dr_dir;
String *dst_dir;
+ if (! ok_to_do_action(NULL, "I", 0, pc, pc.getCurRoom(), NULL, TRUE)) {
+ return -1;
+ }
+
for(i=0;i<NUMBER_OF_ROOMS;i++) {
rm_ptr = &room_list[i];
if ( (rm_ptr) && (rm_ptr->isUsed()) &&
@@ -3183,6 +3187,24 @@
pc.show(buf);
//if it isn't reflexive in any direction.
} else {
+ //there's a way back
+
+ //warn us if the distances aren't the same in both directions
+ if ( dr_ptr->distance != dst_dr_ptr->distance ) {
+ Sprintf(buf, "^c[^B%d^c:^B%d^c:^B%S^c] ^m(^M%d^m)"
+ "^w--> <--"
+ "^m(^M%d^m) ^c[^B%d^c:^B%d^c:^B%S^c]"
+ " ^GDistance mismatch.\n"
+ "^cLHS: ^C%S ^cRHS: ^C%S\n\n^0",
+ rm_ptr->getZoneNum(), cur_rm_num, dr_dir,
+ dr_ptr->distance, dst_dr_ptr->distance,
+ dr_ptr->getDestRoom()->getZoneNum(),
+ chk_rm_num, dst_dir, &(rm_ptr->short_desc),
+ &(dr_ptr->getDestRoom()->short_desc));
+ pc.show(buf);
+
+ }
+
//if it does have a way back, make sure it's the opposite
//direction.
dr_dir = dr_ptr->getDirection();
More information about the ScryMUD
mailing list