[ScryMUD] SVN Commit Info r722 - branches/version-2-1/mud/grrmud/server

scrymud at wanfear.com scrymud at wanfear.com
Wed Dec 1 15:36:47 PST 2004


Author: eroper
Date: 2004-12-01 15:36:46 -0800 (Wed, 01 Dec 2004)
New Revision: 722

Modified:
   branches/version-2-1/mud/grrmud/server/door.h
   branches/version-2-1/mud/grrmud/server/vehicle.cc
Log:
Vehicle doors now open/close the way they were intended to.
--Khaav


Modified: branches/version-2-1/mud/grrmud/server/door.h
===================================================================
--- branches/version-2-1/mud/grrmud/server/door.h	2004-11-28 22:35:52 UTC (rev 721)
+++ branches/version-2-1/mud/grrmud/server/door.h	2004-12-01 23:36:46 UTC (rev 722)
@@ -63,6 +63,8 @@
               // 15 !complete 16 secret_when_open_too, 17 consume_key
               // 18 !passdoor
 
+   int isOpenable() const { return(door_data_flags.get(8)); }
+   int isCloseable() const { return(isOpenable()); }
    int isOpen() const { return !(door_data_flags.get(2)); }
    int canClose() const { return canOpen(); }
    int isVehicleExit() const { return door_data_flags.get(12); }

Modified: branches/version-2-1/mud/grrmud/server/vehicle.cc
===================================================================
--- branches/version-2-1/mud/grrmud/server/vehicle.cc	2004-11-28 22:35:52 UTC (rev 721)
+++ branches/version-2-1/mud/grrmud/server/vehicle.cc	2004-12-01 23:36:46 UTC (rev 722)
@@ -223,7 +223,7 @@
    if (!isStealthy()) { //if not stealth
       if (isAtDestination() && 
           tmp_ptr->dr_data->isOpen() &&
-          tmp_ptr->dr_data->canClose()) {
+          tmp_ptr->dr_data->isCloseable()) {
          if (dr_ptr) {
             Sprintf(buf, "The %S closes.\n", name_of_door(*dr_ptr, ~0));
             showAllCept(buf);
@@ -292,7 +292,8 @@
    }//while
 
    if (isAtDestination()) { //in other words, the one its in NOW
-      if (!isStealthy() && tmp_ptr->dr_data->isClosed()) {
+      if (!isStealthy() && tmp_ptr->dr_data->isClosed() &&
+            tmp_ptr->dr_data->isOpenable() ) {
          if (dr_ptr) {
             Sprintf(buf, "The %S opens.\n", name_of_door(*dr_ptr, ~0));
             showAllCept(buf);




More information about the ScryMUD mailing list