projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updating cherrybomb, adding juicebox (blue bomb).
[supertux.git]
/
src
/
badguy
/
yeti.cpp
diff --git
a/src/badguy/yeti.cpp
b/src/badguy/yeti.cpp
index
12dcd95
..
8528e82
100644
(file)
--- a/
src/badguy/yeti.cpp
+++ b/
src/badguy/yeti.cpp
@@
-32,14
+32,14
@@
namespace {
const float JUMP_DOWN_VX = 250; /**< horizontal speed while jumping off the dais */
namespace {
const float JUMP_DOWN_VX = 250; /**< horizontal speed while jumping off the dais */
- const float JUMP_DOWN_VY = 250; /**< vertical speed while jumping off the dais */
+ const float JUMP_DOWN_VY =
-
250; /**< vertical speed while jumping off the dais */
const float RUN_VX = 350; /**< horizontal speed while running */
const float JUMP_UP_VX = 350; /**< horizontal speed while jumping on the dais */
const float RUN_VX = 350; /**< horizontal speed while running */
const float JUMP_UP_VX = 350; /**< horizontal speed while jumping on the dais */
- const float JUMP_UP_VY = 800; /**< vertical speed while jumping on the dais */
+ const float JUMP_UP_VY =
-
800; /**< vertical speed while jumping on the dais */
- const float STOMP_VY = 250; /** vertical speed while stomping on the dais */
+ const float STOMP_VY =
-
250; /** vertical speed while stomping on the dais */
const float LEFT_STAND_X = 16; /**< x-coordinate of left dais' end position */
const float RIGHT_STAND_X = 800-60-16; /**< x-coordinate of right dais' end position */
const float LEFT_STAND_X = 16; /**< x-coordinate of left dais' end position */
const float RIGHT_STAND_X = 800-60-16; /**< x-coordinate of right dais' end position */
@@
-49,18
+49,17
@@
namespace {
const float SAFE_TIME = .5; /**< the time we are safe when tux just hit us */
const int INITIAL_HITPOINTS = 3; /**< number of hits we can take */
const float SAFE_TIME = .5; /**< the time we are safe when tux just hit us */
const int INITIAL_HITPOINTS = 3; /**< number of hits we can take */
- const float SQUISH_TIME =
3
;
+ const float SQUISH_TIME =
5
;
}
Yeti::Yeti(const lisp::Lisp& reader)
}
Yeti::Yeti(const lisp::Lisp& reader)
+ : BadGuy(reader, "images/creatures/yeti/yeti.sprite")
{
{
- reader.get("x", start_position.x);
- reader.get("y", start_position.y);
- bbox.set_size(60, 90);
- sprite = sprite_manager->create("images/creatures/yeti/yeti.sprite");
hit_points = INITIAL_HITPOINTS;
reader.get("dead-script", dead_script);
countMe = false;
hit_points = INITIAL_HITPOINTS;
reader.get("dead-script", dead_script);
countMe = false;
+ sound_manager->preload("sounds/yeti_gna.wav");
+ sound_manager->preload("sounds/yeti_roar.wav");
}
Yeti::~Yeti()
}
Yeti::~Yeti()
@@
-161,7
+160,7
@@
Yeti::be_angry()
void
Yeti::summon_snowball()
{
void
Yeti::summon_snowball()
{
- Sector::current()->add_object(new BouncingSnowball(
get_pos().x+(dir == RIGHT ? 64 : -64), get_pos().y
, dir));
+ Sector::current()->add_object(new BouncingSnowball(
Vector(get_pos().x+(dir == RIGHT ? 64 : -64), get_pos().y)
, dir));
}
bool
}
bool
@@
-179,10
+178,8
@@
Yeti::kill_squished(Player& player)
take_hit(player);
}
take_hit(player);
}
-void Yeti::take_hit(Player&
player
)
+void Yeti::take_hit(Player& )
{
{
- player.bounce(*this);
-
if(safe_timer.started())
return;
if(safe_timer.started())
return;