/[enigma]/enigma/src/object_mixins.hh
ViewVC logotype

Diff of /enigma/src/object_mixins.hh

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

revision 1.11 by reallysoft, Sun Jun 22 11:47:23 2003 UTC revision 1.12 by reallysoft, Wed Jun 25 13:28:49 2003 UTC
# Line 63  namespace world Line 63  namespace world
63              SendMessage(a, "shatter");              SendMessage(a, "shatter");
64          }          }
65    
66          void actor_hit(const StoneContact &sc)          void actor_hit(const StoneContact &sc) {
67          {              Direction push_dir = get_push_direction(sc);
68              ActorInfo *ai = sc.actor->get_actorinfo();              if (push_dir != NODIR)
69                    sc.actor->send_impulse(get_pos(), push_dir);
             // If the speed component towards the face of the stone is large  
             // enough (and actually pointing towards the stone), consider  
             // moving the stone.  
             Direction dir=contact_face(sc);  
             if (dir!=enigma::NODIR && ai->vel * sc.normal < -4) {  
                 sc.actor->send_impulse(get_pos(), reverse(dir));  
             }  
70          }          }
71      };      };
72    

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

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