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

Diff of /enigma/src/items.cc

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

revision 1.49 by reallysoft, Fri Jun 20 15:47:15 2003 UTC revision 1.50 by reallysoft, Fri Jun 20 22:28:20 2003 UTC
# Line 686  namespace { Line 686  namespace {
686      public:      public:
687          Bomb(const char *kind) : Item(kind), m_burning(false) {}          Bomb(const char *kind) : Item(kind), m_burning(false) {}
688    
689        protected:
690            virtual void message(const string &msg, const Value &) {
691                if (msg == "ignite" || msg == "expl")
692                    burn();
693                else if (msg == "explode")
694                    explode();
695            }
696    
697      private:      private:
698          // Variables          // Variables
699          bool m_burning;          bool m_burning;
# Line 702  namespace { Line 710  namespace {
710    
711          void animcb() { explode (); }          void animcb() { explode (); }
712    
         void message(const string &msg, const Value &) {  
             if (msg == "ignite" || msg == "expl")  
                 burn();  
             else if (msg == "bombstone") {  
                 KillItem(get_pos());  
             }  
             else if (msg == "explode")  
                 explode();  
         }  
   
713          bool on_laserhit(Direction) {          bool on_laserhit(Direction) {
714              explode();              explode();
715              return false;       // block light              return false;       // block light
# Line 760  namespace Line 758  namespace
758              play_sound("explosion1");              play_sound("explosion1");
759              SetItem(p, MakeItem("it-explosion3"));              SetItem(p, MakeItem("it-explosion3"));
760          }          }
761            void message(const string &msg, const Value &val) {
762                if (msg == "bombstone") {
763                    KillItem(get_pos());
764                }
765                Bomb::message(msg, val);
766            }
767      };      };
768  }  }
769    
# Line 790  namespace Line 794  namespace
794              play_sound("explosion1");              play_sound("explosion1");
795              SetItem(p, MakeItem("it-explosion3"));              SetItem(p, MakeItem("it-explosion3"));
796          }          }
797    
798            // WhiteBomb does not react on message "bombstone" in Oxyd1
799      };      };
800  }  }
801    

Legend:
Removed from v.1.49  
changed lines
  Added in v.1.50

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