projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changed jump behaviour: Tux will now jump even if the button was pressed (up to)...
[supertux.git]
/
src
/
object
/
powerup.cpp
diff --git
a/src/object/powerup.cpp
b/src/object/powerup.cpp
index
bb18953
..
429e284
100644
(file)
--- a/
src/object/powerup.cpp
+++ b/
src/object/powerup.cpp
@@
-36,8
+36,8
@@
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
;
- sound_manager->preload("sounds/grow.
wav
");
+ physic.
enable_gravity(true)
;
+ sound_manager->preload("sounds/grow.
ogg
");
sound_manager->preload("sounds/fire-flower.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())
;
}
}
}
}
@@
-70,7
+70,7
@@
PowerUp::collision(GameObject& other, const CollisionHit&)
if (sprite_name == "images/powerups/egg/egg.sprite") {
if(!player->add_bonus(GROWUP_BONUS, true))
return FORCE_MOVE;
if (sprite_name == "images/powerups/egg/egg.sprite") {
if(!player->add_bonus(GROWUP_BONUS, true))
return FORCE_MOVE;
- sound_manager->play("sounds/grow.
wav
");
+ sound_manager->play("sounds/grow.
ogg
");
} else if (sprite_name == "images/powerups/fireflower/fireflower.sprite") {
if(!player->add_bonus(FIRE_BONUS, true))
return FORCE_MOVE;
} else if (sprite_name == "images/powerups/fireflower/fireflower.sprite") {
if(!player->add_bonus(FIRE_BONUS, true))
return FORCE_MOVE;