projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
-german translation updates
[supertux.git]
/
src
/
object
/
oneup.cpp
diff --git
a/src/object/oneup.cpp
b/src/object/oneup.cpp
index
5a027a0
..
a576bcf
100644
(file)
--- a/
src/object/oneup.cpp
+++ b/
src/object/oneup.cpp
@@
-4,6
+4,7
@@
#include "resources.h"
#include "player.h"
#include "scene.h"
#include "resources.h"
#include "player.h"
#include "scene.h"
+#include "sector.h"
#include "special/sprite_manager.h"
#include "video/drawing_context.h"
#include "special/sprite_manager.h"
#include "video/drawing_context.h"
@@
-23,6
+24,9
@@
OneUp::~OneUp()
void
OneUp::action(float elapsed_time)
{
void
OneUp::action(float elapsed_time)
{
+ if(!Sector::current()->inside(bbox))
+ remove_me();
+
movement = physic.get_movement(elapsed_time);
}
movement = physic.get_movement(elapsed_time);
}
@@
-33,7
+37,7
@@
OneUp::draw(DrawingContext& context)
}
HitResponse
}
HitResponse
-OneUp::collision(GameObject& other, const CollisionHit&
hit
)
+OneUp::collision(GameObject& other, const CollisionHit& )
{
Player* player = dynamic_cast<Player*> (&other);
if(player) {
{
Player* player = dynamic_cast<Player*> (&other);
if(player) {