enigma-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Enigma-cvs] enigma/src stones_complex.cc, 1.49, 1.50 world.cc, 1.75, 1


From: Martin Hawlisch <address@hidden>
Subject: [Enigma-cvs] enigma/src stones_complex.cc, 1.49, 1.50 world.cc, 1.75, 1.76 world.hh, 1.35, 1.36
Date: Wed, 22 Oct 2003 10:30:14 +0000

Update of /cvsroot/enigma/enigma/src
In directory subversions:/tmp/cvs-serv5005/src

Modified Files:
        stones_complex.cc world.cc world.hh 
Log Message:
do not mail items outside the level


Index: world.cc
===================================================================
RCS file: /cvsroot/enigma/enigma/src/world.cc,v
retrieving revision 1.75
retrieving revision 1.76
diff -C2 -d -r1.75 -r1.76
*** world.cc    20 Oct 2003 17:03:17 -0000      1.75
--- world.cc    22 Oct 2003 10:30:10 -0000      1.76
***************
*** 856,859 ****
--- 856,864 ----
  }
  
+ bool world::IsInsideLevel(GridPos p)
+ {
+     return level->contains(p);
+ }
+ 
  //----------------------------------------
  // Force fields

Index: stones_complex.cc
===================================================================
RCS file: /cvsroot/enigma/enigma/src/stones_complex.cc,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** stones_complex.cc   21 Oct 2003 19:47:56 -0000      1.49
--- stones_complex.cc   22 Oct 2003 10:30:10 -0000      1.50
***************
*** 3030,3045 ****
          if (Item *it = inv->get_item(0)) {
              GridPos p = find_pipe_endpoint();
! 
!             if (it->is_kind("it-brake")) {
!                 if (!GetStone(p)) {
!                     it = inv->yield_first();
!                     world::SetItemAsStone(p, it);
!                 }
!             }
!             else {
!                 if (!GetItem (p)) {
!                     it = inv->yield_first();
!                     world::SetItem(p, it);
!                     it->on_drop(sc.actor);
                  }
              }
--- 3030,3045 ----
          if (Item *it = inv->get_item(0)) {
              GridPos p = find_pipe_endpoint();
!             if (world::IsInsideLevel(p)) {
!                 if (it->is_kind("it-brake")) {
!                     if (!GetStone(p)) {
!                         it = inv->yield_first();
!                         world::SetItemAsStone(p, it);
!                     }
!                 } else {
!                     if (!GetItem (p)) {
!                         it = inv->yield_first();
!                         world::SetItem(p, it);
!                         it->on_drop(sc.actor);
!                     }
                  }
              }

Index: world.hh
===================================================================
RCS file: /cvsroot/enigma/enigma/src/world.hh,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** world.hh    20 Oct 2003 08:05:46 -0000      1.35
--- world.hh    22 Oct 2003 10:30:10 -0000      1.36
***************
*** 180,183 ****
--- 180,184 ----
  
      bool world::IsLevelBorder(GridPos p);
+     bool world::IsInsideLevel(GridPos p);
      Object *GetObject (const GridLoc &l);
  





reply via email to

[Prev in Thread] Current Thread [Next in Thread]