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

scrymud at wanfear.com scrymud at wanfear.com
Sun Jun 10 11:56:17 PDT 2007


Author: eroper
Date: 2007-06-10 11:56:17 -0700 (Sun, 10 Jun 2007)
New Revision: 937

Modified:
   trunk/mud/grrmud/server/critter.cc
   trunk/mud/grrmud/server/critter.h
Log:
The critter::canSee() family has been declared const.


Modified: trunk/mud/grrmud/server/critter.cc
===================================================================
--- trunk/mud/grrmud/server/critter.cc	2007-06-10 13:46:58 UTC (rev 936)
+++ trunk/mud/grrmud/server/critter.cc	2007-06-10 18:56:17 UTC (rev 937)
@@ -6005,7 +6005,7 @@
    }
 }
 
-bool critter::canSee(critter& mob){
+bool critter::canSee(critter& mob) const {
 	//see if the weather messes with our vision
 	if(((room_list[IN_ROOM].getWeather() == sandstorm) || room_list[IN_ROOM].getWeather() == blizzard)){ 
 		if(rand()%100 <=25) return false;
@@ -6015,7 +6015,8 @@
   }
   return false;
 }
-bool critter::canSee(int vis_bit){
+
+bool critter::canSee(int vis_bit) const {
 /*	if(((room_list[IN_ROOM].getWeather() == sandstorm) || room_list[IN_ROOM].getWeather() == blizzard)){ 
 		if(rand()%100 >25) return false;
 	}*/
@@ -6025,7 +6026,8 @@
    }
    return false;
 }
-bool critter::canSee(object& obj){
+
+bool critter::canSee(object& obj) const {
 	if(((room_list[IN_ROOM].getWeather() == sandstorm) || room_list[IN_ROOM].getWeather() == blizzard)){ 
 		if(rand()%100 <=25) return false;
 	}
@@ -6035,7 +6037,7 @@
    return false;
 }
 
-bool critter::canSee(door& dr){
+bool critter::canSee(door& dr) const {
 	if(((room_list[IN_ROOM].getWeather() == sandstorm) || room_list[IN_ROOM].getWeather() == blizzard)){ 
 		if(rand()%100 <=25) return false;
 	}
@@ -6045,11 +6047,11 @@
    return false;
 }
 
-bool critter::hasLight() const{
+bool critter::hasLight() const {
 	return crit_flags.get(1);
 }
 
-bool critter::isUnaware() const{
+bool critter::isUnaware() const {
 	switch(POS){
 		case POS_STUN:
 		case POS_SLEEP:

Modified: trunk/mud/grrmud/server/critter.h
===================================================================
--- trunk/mud/grrmud/server/critter.h	2007-06-10 13:46:58 UTC (rev 936)
+++ trunk/mud/grrmud/server/critter.h	2007-06-10 18:56:17 UTC (rev 937)
@@ -1165,10 +1165,10 @@
 
    void showWeather(room &rm) const;
 
-   bool canSee(critter& mob);
-   bool canSee(int vis_bit);
-   bool canSee(object& obj);
-   bool canSee(door& dr);
+   bool canSee(critter& mob) const;
+   bool canSee(int vis_bit) const;
+   bool canSee(object& obj) const;
+   bool canSee(door& dr) const;
    bool isUnaware() const;
    bool hasLight() const;	
 };//class critter




More information about the ScryMUD mailing list