[ScryMUD] SVN Commit Info r929 - trunk/mud/grrmud/server

scrymud at wanfear.com scrymud at wanfear.com
Sun Jun 10 00:40:18 PDT 2007


Author: eroper
Date: 2007-06-10 00:40:17 -0700 (Sun, 10 Jun 2007)
New Revision: 929

Modified:
   trunk/mud/grrmud/server/gen_cmds.spec
   trunk/mud/grrmud/server/grrmud.cc
   trunk/mud/grrmud/server/misc2.cc
   trunk/mud/grrmud/server/object.cc
Log:
Fixed a typo that accidently made it into grrmud.cc. Updated gen_cmds.spec to
include return values for the new weather commands. This is necessary in order
to keep the compiler quiet about functions that claim to return values, but
don't. Explict downcasting from double->int and float->int in order to make it
explicit that this is intentional, and silence compiler warnings.


Modified: trunk/mud/grrmud/server/gen_cmds.spec
===================================================================
--- trunk/mud/grrmud/server/gen_cmds.spec	2007-06-09 17:24:02 UTC (rev 928)
+++ trunk/mud/grrmud/server/gen_cmds.spec	2007-06-10 07:40:17 UTC (rev 929)
@@ -228,7 +228,7 @@
 chance ~
 return (chance( i, j, k));
 changeweather ~
-changeweather(pc);
+return changeweather(pc);
 ch_ddesc ~
 return ch_ddesc(i, pc);
 ch_kdesc ~
@@ -853,7 +853,7 @@
 set_veh_stop ~ 
 return  set_veh_stop(i, j, &(cooked_strs[1]), pc);
 setweather ~
-setweather(&(cooked_strs[1]), &(cooked_strs[2]), pc);
+return setweather(&(cooked_strs[1]), &(cooked_strs[2]), pc);
 set_zflag ~
 return set_zflag(i, &(cooked_strs[1]), pc);
 show_zones ~
@@ -1022,7 +1022,7 @@
 return withdraw(i, cooked_strs[1], j, cooked_strs[2], pc);
 # IMM Commands - W
 weatherreport ~
-weatherreport(pc);
+return weatherreport(pc);
 wc *channels ~
 NOP
 wizchat *channels ~

Modified: trunk/mud/grrmud/server/grrmud.cc
===================================================================
--- trunk/mud/grrmud/server/grrmud.cc	2007-06-09 17:24:02 UTC (rev 928)
+++ trunk/mud/grrmud/server/grrmud.cc	2007-06-10 07:40:17 UTC (rev 929)
@@ -399,7 +399,7 @@
 void sig_term_handler(int signo) { 
    //reestablish signal handler
    if ((signo != SIGSEGV) && (signo != SIGBUS) && (signo != SIGIOT)) {
-     /cerr << "Got signal: " << signo << " NOT setting to default handler." << endl;
+      cerr << "Got signal: " << signo << " NOT setting to default handler." << endl;
       signal(signo, (&sig_term_handler));
    }
    else {

Modified: trunk/mud/grrmud/server/misc2.cc
===================================================================
--- trunk/mud/grrmud/server/misc2.cc	2007-06-09 17:24:02 UTC (rev 928)
+++ trunk/mud/grrmud/server/misc2.cc	2007-06-10 07:40:17 UTC (rev 929)
@@ -2254,7 +2254,7 @@
    unsigned int i =0;
    
    while(i < length){
-         target[i] *= in[i];
+         target[i] = int(target[i] * in[i]);
          ++i;
    }
 }

Modified: trunk/mud/grrmud/server/object.cc
===================================================================
--- trunk/mud/grrmud/server/object.cc	2007-06-09 17:24:02 UTC (rev 928)
+++ trunk/mud/grrmud/server/object.cc	2007-06-10 07:40:17 UTC (rev 929)
@@ -493,7 +493,7 @@
       while ((tmp_obj = cll.next())) {
          tmp_wt += tmp_obj->getCurWeight();
       }//while
-      return (tmp_wt * (this->bag->percentage_weight/100.00)) + extras[5];  // weight of inv, plus container's wt
+      return int((tmp_wt * (this->bag->percentage_weight/100.00)) + extras[5]);  // weight of inv, plus container's wt
    }//else
 }//cur_weight
 




More information about the ScryMUD mailing list