projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rolled back bomb to old behaviour, some bomb gfx tuning
[supertux.git]
/
src
/
badguy
/
spidermite.cpp
diff --git
a/src/badguy/spidermite.cpp
b/src/badguy/spidermite.cpp
index
af88274
..
8ea7e74
100644
(file)
--- a/
src/badguy/spidermite.cpp
+++ b/
src/badguy/spidermite.cpp
@@
-22,19
+22,19
@@
#include "spidermite.hpp"
#include "spidermite.hpp"
-static const float FLYTIME = 1.2;
-static const float FLYSPEED = -100.0;
+static const float FLYTIME = 1.2
f
;
+static const float FLYSPEED = -100.0
f
;
SpiderMite::SpiderMite(const lisp::Lisp& reader)
: BadGuy(reader, "images/creatures/spidermite/spidermite.sprite")
{
SpiderMite::SpiderMite(const lisp::Lisp& reader)
: BadGuy(reader, "images/creatures/spidermite/spidermite.sprite")
{
- physic.
gravity_enabled = false
;
+ physic.
enable_gravity(false)
;
}
SpiderMite::SpiderMite(const Vector& pos)
: BadGuy(pos, "images/creatures/spidermite/spidermite.sprite")
{
}
SpiderMite::SpiderMite(const Vector& pos)
: BadGuy(pos, "images/creatures/spidermite/spidermite.sprite")
{
- physic.
gravity_enabled = false
;
+ physic.
enable_gravity(false)
;
}
void
}
void
@@
-49,11
+49,11
@@
SpiderMite::write(lisp::Writer& writer)
}
void
}
void
-SpiderMite::
activat
e()
+SpiderMite::
initializ
e()
{
sprite->set_action(dir == LEFT ? "left" : "right");
mode = FLY_UP;
{
sprite->set_action(dir == LEFT ? "left" : "right");
mode = FLY_UP;
- physic.
vy = FLYSPEED
;
+ physic.
set_velocity_y(FLYSPEED)
;
timer.start(FLYTIME/2);
}
timer.start(FLYTIME/2);
}
@@
-69,7
+69,7
@@
void
SpiderMite::collision_solid(const CollisionHit& hit)
{
if(hit.top || hit.bottom) { // hit floor or roof?
SpiderMite::collision_solid(const CollisionHit& hit)
{
if(hit.top || hit.bottom) { // hit floor or roof?
- physic.
vy = 0
;
+ physic.
set_velocity_y(0)
;
}
}
}
}
@@
-79,10
+79,10
@@
SpiderMite::active_update(float elapsed_time)
if(timer.check()) {
if(mode == FLY_UP) {
mode = FLY_DOWN;
if(timer.check()) {
if(mode == FLY_UP) {
mode = FLY_DOWN;
- physic.
vy = -FLYSPEED
;
+ physic.
set_velocity_y(-FLYSPEED)
;
} else if(mode == FLY_DOWN) {
mode = FLY_UP;
} else if(mode == FLY_DOWN) {
mode = FLY_UP;
- physic.
vy = FLYSPEED
;
+ physic.
set_velocity_y(FLYSPEED)
;
}
timer.start(FLYTIME);
}
}
timer.start(FLYTIME);
}