projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
#303: Typo fixes from mathnerd314
[supertux.git]
/
src
/
object
/
pushbutton.cpp
diff --git
a/src/object/pushbutton.cpp
b/src/object/pushbutton.cpp
index
38f1119
..
30e364c
100644
(file)
--- a/
src/object/pushbutton.cpp
+++ b/
src/object/pushbutton.cpp
@@
-53,10
+53,10
@@
PushButton::collision(GameObject& other, const CollisionHit& hit)
{
Player* player = dynamic_cast<Player*>(&other);
if (!player) return FORCE_MOVE;
{
Player* player = dynamic_cast<Player*>(&other);
if (!player) return FORCE_MOVE;
- float vy = player->physic.
vy
;
+ float vy = player->physic.
get_velocity_y()
;
//player->add_velocity(Vector(0, -150));
//player->add_velocity(Vector(0, -150));
- player->physic.
vy = -150
;
+ player->physic.
set_velocity_y(-150)
;
if (state != OFF) return FORCE_MOVE;
if (!hit.top) return FORCE_MOVE;
if (state != OFF) return FORCE_MOVE;
if (!hit.top) return FORCE_MOVE;
@@
-71,7
+71,7
@@
PushButton::collision(GameObject& other, const CollisionHit& hit)
// play sound
sound_manager->play(BUTTON_SOUND);
// play sound
sound_manager->play(BUTTON_SOUND);
-
+
// run script
std::istringstream stream(script);
Sector::current()->run_script(stream, "PushButton");
// run script
std::istringstream stream(script);
Sector::current()->run_script(stream, "PushButton");
@@
-80,4
+80,3
@@
PushButton::collision(GameObject& other, const CollisionHit& hit)
}
IMPLEMENT_FACTORY(PushButton, "pushbutton");
}
IMPLEMENT_FACTORY(PushButton, "pushbutton");
-