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

Diff of /enigma/src/actors.cc

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

revision 1.37 by mhawlisch, Tue Sep 2 07:52:45 2003 UTC revision 1.38 by dheck, Mon Sep 8 08:33:34 2003 UTC
# Line 220  namespace Line 220  namespace
220    
221    
222  //----------------------------------------  //----------------------------------------
223    // Killerball
224    //----------------------------------------
225    namespace
226    {
227        class Killerball : public Actor {
228            CLONEACTOR(Killerball);
229        public:
230    
231            Killerball() : Actor ("ac-killerball", V2()) {
232                world::ActorInfo *ai = get_actorinfo();
233                ai->radius = 13/64.0;
234                ai->mass = 0.7;
235            }
236            bool is_dead() { return false; }
237    
238            void on_hit(Actor *a) {
239                SendMessage(a, "shatter");
240            }
241        };
242    }
243    
244    
245    //----------------------------------------
246  // CannonBall  // CannonBall
247  //----------------------------------------  //----------------------------------------
248  namespace  namespace
# Line 647  namespace Line 670  namespace
670              set_attrib("mouseforce", Value(true));              set_attrib("mouseforce", Value(true));
671              set_attrib("color", Value(0.0));              set_attrib("color", Value(0.0));
672              set_attrib("blackball", Value(true));              set_attrib("blackball", Value(true));
673                set_attrib("player", Value(0.0));
674                set_attrib("controllers", Value(1.0));
675          }          }
676      };      };
677    
# Line 658  namespace Line 683  namespace
683              set_attrib("mouseforce", Value(true));              set_attrib("mouseforce", Value(true));
684              set_attrib("color", Value(1.0));              set_attrib("color", Value(1.0));
685              set_attrib("whiteball", Value(true));              set_attrib("whiteball", Value(true));
686                set_attrib("player", Value(1.0));
687                set_attrib("controllers", Value(2.0));
688          }          }
689      };      };
690    
# Line 669  namespace Line 696  namespace
696              set_attrib("mouseforce", Value(true));              set_attrib("mouseforce", Value(true));
697              set_attrib("color", Value(1.0));              set_attrib("color", Value(1.0));
698              set_attrib("whiteball", Value(true));              set_attrib("whiteball", Value(true));
699                set_attrib("controllers", Value(3.0));
700          }          }
701    
702          void on_hit(Actor *a) {          void on_hit(Actor *a) {
703              if (dynamic_cast<BlackBall*>(a) &&              if (dynamic_cast<BlackBall*>(a) &&
704                  int_attrib("mouseforce") != 0) // passive small whiteball do not shatter (see PerOxyd Linkgame #60)                  int_attrib("mouseforce") != 0)
705                    // passive small whiteball do not shatter (see PerOxyd Linkgame #60)
706              {              {
707                  // collision between WhiteBall_Small and blackball shatters blackball                  // collision between WhiteBall_Small and blackball shatters blackball
708                  SendMessage(a, "shatter");                  SendMessage(a, "shatter");

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38

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