/[enigma]/enigma/world.cc
ViewVC logotype

Diff of /enigma/world.cc

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

revision 1.28 by dheck, Wed Dec 18 22:48:43 2002 UTC revision 1.29 by dheck, Mon Dec 23 11:13:35 2002 UTC
# Line 396  find_contact_with_stone(Actor *a, StoneC Line 396  find_contact_with_stone(Actor *a, StoneC
396      }      }
397      contact.is_collision  = contact.normal*ai.vel < 0;      contact.is_collision  = contact.normal*ai.vel < 0;
398      contact.response = contact.stone->collision_response(contact);      contact.response = contact.stone->collision_response(contact);
399        contact.sound = contact.stone->collision_sound();
400  }  }
401    
402  /* In Enigma, stones have rounded corners; this leads to realistic  /* In Enigma, stones have rounded corners; this leads to realistic
# Line 477  handle_stone_contact(V3 normal, StoneCon Line 478  handle_stone_contact(V3 normal, StoneCon
478          // The stone may kill itself during a call to actor_hit(), so          // The stone may kill itself during a call to actor_hit(), so
479          // extract all relevant data before invoking this method!          // extract all relevant data before invoking this method!
480          // GridPos stone_pos = sc.stone->get_pos();          // GridPos stone_pos = sc.stone->get_pos();
         string collision_sound = sc.stone->collision_sound();  
481          sc.stone->actor_hit(sc);          sc.stone->actor_hit(sc);
482          if (!sc.fake_collision && sc.response != STONE_PASS) {          if (!sc.fake_collision && sc.response != STONE_PASS) {
483              normal += sc.normal;              normal += sc.normal;
# Line 486  handle_stone_contact(V3 normal, StoneCon Line 486  handle_stone_contact(V3 normal, StoneCon
486              if (length(ai->vel) > 0.1)              if (length(ai->vel) > 0.1)
487              {              {
488                  AddSprite(display::SPRITE_EFFECT, sc.contact_point, "ring-anim");                  AddSprite(display::SPRITE_EFFECT, sc.contact_point, "ring-anim");
489                  sound::PlaySound(collision_sound.c_str());                  sound::PlaySound(sc.sound.c_str()); //collision_sound.c_str());
490              }              }
491          }          }
492      }      }

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29

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