projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Mr Bomb turns arround again when colliding with other badguys.
[supertux.git]
/
src
/
badguy
/
kugelblitz.cpp
diff --git
a/src/badguy/kugelblitz.cpp
b/src/badguy/kugelblitz.cpp
index
697678d
..
68fc066
100644
(file)
--- a/
src/badguy/kugelblitz.cpp
+++ b/
src/badguy/kugelblitz.cpp
@@
-54,16
+54,16
@@
Kugelblitz::write(lisp::Writer& writer)
void
Kugelblitz::activate()
{
void
Kugelblitz::activate()
{
- physic.set_velocity_y(
-
300);
+ physic.set_velocity_y(300);
physic.set_velocity_x(-20); //fall a little to the left
direction = 1;
dying = false;
}
physic.set_velocity_x(-20); //fall a little to the left
direction = 1;
dying = false;
}
-HitResponse
-Kugelblitz::collision_solid(
GameObject& ,
const CollisionHit& chit)
+void
+Kugelblitz::collision_solid(const CollisionHit& chit)
{
{
-
return
hit(chit);
+ hit(chit);
}
HitResponse
}
HitResponse
@@
-97,10
+97,10
@@
Kugelblitz::collision_badguy(BadGuy& other , const CollisionHit& chit)
}
HitResponse
}
HitResponse
-Kugelblitz::hit(const CollisionHit&
c
hit)
+Kugelblitz::hit(const CollisionHit& hit)
{
// hit floor?
{
// hit floor?
- if(
chit.normal.y < -.5
) {
+ if(
hit.bottom
) {
if (!groundhit_pos_set)
{
pos_groundhit = get_pos();
if (!groundhit_pos_set)
{
pos_groundhit = get_pos();
@@
-115,7
+115,7
@@
Kugelblitz::hit(const CollisionHit& chit)
movement_timer.start(MOVETIME);
lifetime.start(LIFETIME);
movement_timer.start(MOVETIME);
lifetime.start(LIFETIME);
- } else if(
chit.normal.y < .5
) { // bumped on roof
+ } else if(
hit.top
) { // bumped on roof
physic.set_velocity_y(0);
}
physic.set_velocity_y(0);
}