Update of /cvsroot/playerstage/code/player/server/drivers/map
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19082/drivers/map

Modified Files:
        mapcspace.cc maptransform.h 
Log Message:
fixed bug in mapcspace semantics, and in MAP_VALID macro

Index: mapcspace.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/server/drivers/map/mapcspace.cc,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** mapcspace.cc        19 Apr 2006 20:30:46 -0000      1.13
--- mapcspace.cc        23 Jan 2007 02:10:40 -0000      1.14
***************
*** 192,196 ****
  
        // grow both occupied and unknown regions
!       if(state <= 0)
        {
          for(dj = -r; dj <= r; dj++)
--- 192,196 ----
  
        // grow both occupied and unknown regions
!       if(state >= 0)
        {
          for(dj = -r; dj <= r; dj++)
***************
*** 207,211 ****
  
              // don't change occupied to uknown
!             if(this->new_data[MAP_IDX(new_map,i+di,j+dj)] > state)
              {
                this->new_data[MAP_IDX(new_map,i+di,j+dj)] = state;
--- 207,211 ----
  
              // don't change occupied to uknown
!             if(this->new_data[MAP_IDX(new_map,i+di,j+dj)] < state)
              {
                this->new_data[MAP_IDX(new_map,i+di,j+dj)] = state;

Index: maptransform.h
===================================================================
RCS file: /cvsroot/playerstage/code/player/server/drivers/map/maptransform.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** maptransform.h      19 Apr 2006 13:04:27 -0000      1.1
--- maptransform.h      23 Jan 2007 02:10:40 -0000      1.2
***************
*** 41,45 ****
  
  // check that given coords are valid (i.e., on the map)
! #define MAP_VALID(mf, i, j) ((i >= 0) && (i < mf.width) && (j >= 0) && (j < 
mf.width))
  
  class MapTransform : public Driver
--- 41,45 ----
  
  // check that given coords are valid (i.e., on the map)
! #define MAP_VALID(mf, i, j) ((i >= 0) && (i < mf.width) && (j >= 0) && (j < 
mf.height))
  
  class MapTransform : public Driver


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to