projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Had a bit of time today and worked on supertux:
[supertux.git]
/
src
/
object
/
block.cpp
diff --git
a/src/object/block.cpp
b/src/object/block.cpp
index
b3c6fcc
..
3bd3209
100644
(file)
--- a/
src/object/block.cpp
+++ b/
src/object/block.cpp
@@
-13,6
+13,7
@@
#include "flower.h"
#include "oneup.h"
#include "star.h"
#include "flower.h"
#include "oneup.h"
#include "star.h"
+#include "player_status.h"
#include "badguy/badguy.h"
#include "coin.h"
#include "object_factory.h"
#include "badguy/badguy.h"
#include "coin.h"
#include "object_factory.h"
@@
-25,7
+26,7
@@
Block::Block(const Vector& pos, Sprite* newsprite)
: sprite(newsprite), bouncing(false), bounce_dir(0), bounce_offset(0)
{
bbox.set_pos(pos);
: sprite(newsprite), bouncing(false), bounce_dir(0), bounce_offset(0)
{
bbox.set_pos(pos);
- bbox.set_size(32, 32);
+ bbox.set_size(32, 32
.1
);
flags |= FLAG_SOLID;
original_y = pos.y;
}
flags |= FLAG_SOLID;
original_y = pos.y;
}
@@
-88,6
+89,7
@@
Block::draw(DrawingContext& context)
void
Block::start_bounce()
{
void
Block::start_bounce()
{
+ original_y = bbox.p1.y;
bouncing = true;
bounce_dir = -BOUNCY_BRICK_SPEED;
bounce_offset = 0;
bouncing = true;
bounce_dir = -BOUNCY_BRICK_SPEED;
bounce_offset = 0;