projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- added quick&dirty peeking back (not exactly perfect, but better then no peeking)
[supertux.git]
/
src
/
object
/
trampoline.cpp
diff --git
a/src/object/trampoline.cpp
b/src/object/trampoline.cpp
index
e3e32fd
..
4871cf6
100644
(file)
--- a/
src/object/trampoline.cpp
+++ b/
src/object/trampoline.cpp
@@
-70,7
+70,7
@@
Trampoline::collision(GameObject& other, const CollisionHit& hit)
Player* player = dynamic_cast<Player*> (&other);
//Trampoline works for player
if(player) {
Player* player = dynamic_cast<Player*> (&other);
//Trampoline works for player
if(player) {
- float vy = player->physic.
vy
;
+ float vy = player->physic.
get_velocity_y()
;
//player is falling down on trampoline
if(hit.top && vy >= 0) {
if(player->get_controller()->hold(Controller::JUMP)) {
//player is falling down on trampoline
if(hit.top && vy >= 0) {
if(player->get_controller()->hold(Controller::JUMP)) {
@@
-78,7
+78,7
@@
Trampoline::collision(GameObject& other, const CollisionHit& hit)
} else {
vy = VY_INITIAL;
}
} else {
vy = VY_INITIAL;
}
- player->physic.
vy = vy
;
+ player->physic.
set_velocity_y(vy)
;
sound_manager->play(TRAMPOLINE_SOUND);
sprite->set_action("swinging", 1);
return FORCE_MOVE;
sound_manager->play(TRAMPOLINE_SOUND);
sprite->set_action("swinging", 1);
return FORCE_MOVE;