48 |
|
|
49 |
#include "world_internal.hh" |
#include "world_internal.hh" |
50 |
|
|
|
namespace |
|
|
{ |
|
|
} |
|
51 |
|
|
52 |
Object *SimpleSignal::get_target() |
Object *SimpleSignal::get_target() |
53 |
{ |
{ |
626 |
// } |
// } |
627 |
bool new_collision = true; |
bool new_collision = true; |
628 |
|
|
629 |
ai.pos = ai.oldpos; // Reset actor position |
// ai.pos = ai.oldpos; // Reset actor position |
630 |
if (new_collision) { |
if (new_collision) { |
631 |
if (Stone *stone = world::GetStone(sc.stonepos)) { |
if (Stone *stone = world::GetStone(sc.stonepos)) { |
632 |
// V2 pos = ai.pos; |
// V2 pos = ai.pos; |
641 |
sound::PlaySound(sc.sound.c_str(), sc.contact_point); |
sound::PlaySound(sc.sound.c_str(), sc.contact_point); |
642 |
// } |
// } |
643 |
} |
} |
644 |
double restitution = 1.0; //0.95; |
double restitution = 0.95; //1.0; //0.95; |
645 |
ai.vel -= (1 + restitution)*(ai.vel*sc.normal)*sc.normal; |
ai.vel -= (1 + restitution)*(ai.vel*sc.normal)*sc.normal; |
646 |
} |
} |
647 |
} |
} |