/[enigma]/enigma/src/objects.cc
ViewVC logotype

Diff of /enigma/src/objects.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.77 by reallysoft, Wed May 14 10:46:46 2003 UTC revision 1.78 by reallysoft, Wed May 14 14:10:30 2003 UTC
# Line 1712  namespace Line 1712  namespace
1712              GridPos   last_pos = get_pos();              GridPos   last_pos = get_pos();
1713              Direction dir      = get_dir();              Direction dir      = get_dir();
1714    
1715              if (move_stone(dir)) {              move_stone(dir);
                 // send a message to the stone that's blocking our way  
                 if (Stone *st = GetStone(move (get_pos(), dir)))  
                     SendMessage(st, "trigger", Value(dir));  
             }  
1716              state = IDLE;              state = IDLE;
1717          }          }
1718    
1719            void on_move() {
1720                // send a message to the stone that's blocking our way
1721                Direction dir = get_dir();
1722    
1723                if (Stone *st = GetStone(move(get_pos(), dir))) {
1724                    SendMessage(st, "trigger", Value(dir));
1725                }
1726            }
1727    
1728          // Stone interface.          // Stone interface.
1729          void init_model()          void init_model()
1730          {          {
# Line 1744  namespace Line 1749  namespace
1749          }          }
1750    
1751          void on_impulse (const Impulse& impulse) {          void on_impulse (const Impulse& impulse) {
             move_stone(impulse.dir);  
1752              if (impulse.sender && 0 == strncmp(impulse.sender->get_kind(), "st-rotator-", 11)) {              if (impulse.sender && 0 == strncmp(impulse.sender->get_kind(), "st-rotator-", 11)) {
1753                  set_dir(impulse.dir);                  set_dir(impulse.dir);
1754              }              }
1755              init_model();              init_model();
1756                move_stone(impulse.dir);
1757          }          }
1758    
1759          void actor_inside(Actor *a) {SendMessage(a, "shatter");}          void actor_inside(Actor *a) {SendMessage(a, "shatter");}

Legend:
Removed from v.1.77  
changed lines
  Added in v.1.78

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26