projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
play sound when willowisp is caught
[supertux.git]
/
src
/
object
/
powerup.cpp
diff --git
a/src/object/powerup.cpp
b/src/object/powerup.cpp
index
bb18953
..
09a7470
100644
(file)
--- a/
src/object/powerup.cpp
+++ b/
src/object/powerup.cpp
@@
-36,7
+36,7
@@
PowerUp::PowerUp(const lisp::Lisp& lisp)
lisp.get("script", script);
no_physics = false;
lisp.get("disable-physics", no_physics);
lisp.get("script", script);
no_physics = false;
lisp.get("disable-physics", no_physics);
- physic.
gravity_enabled = true
;
+ physic.
enable_gravity(true)
;
sound_manager->preload("sounds/grow.wav");
sound_manager->preload("sounds/fire-flower.wav");
}
sound_manager->preload("sounds/grow.wav");
sound_manager->preload("sounds/fire-flower.wav");
}
@@
-45,10
+45,10
@@
void
PowerUp::collision_solid(const CollisionHit& hit)
{
if(hit.bottom) {
PowerUp::collision_solid(const CollisionHit& hit)
{
if(hit.bottom) {
- physic.
vy = 0
;
+ physic.
set_velocity_y(0)
;
}
if(hit.right || hit.left) {
}
if(hit.right || hit.left) {
- physic.
vx = -physic.vx
;
+ physic.
set_velocity_x(-physic.get_velocity_x())
;
}
}
}
}