projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Russian translation update from Constantin Baranov... from December.
[supertux.git]
/
src
/
badguy
/
flame.cpp
diff --git
a/src/badguy/flame.cpp
b/src/badguy/flame.cpp
index
19211d2
..
8f035a7
100644
(file)
--- a/
src/badguy/flame.cpp
+++ b/
src/badguy/flame.cpp
@@
-25,7
+25,7
@@
static const std::string SOUNDFILE = "sounds/flame.wav";
Flame::Flame(const lisp::Lisp& reader)
static const std::string SOUNDFILE = "sounds/flame.wav";
Flame::Flame(const lisp::Lisp& reader)
- : BadGuy(reader, "images/creatures/flame/flame.sprite", LAYER_FLOATINGOBJECTS), angle(0), radius(100), speed(2)
, sound_source(0)
+ : BadGuy(reader, "images/creatures/flame/flame.sprite", LAYER_FLOATINGOBJECTS), angle(0), radius(100), speed(2)
{
reader.get("radius", radius);
reader.get("speed", speed);
{
reader.get("radius", radius);
reader.get("speed", speed);
@@
-33,6
+33,8
@@
Flame::Flame(const lisp::Lisp& reader)
start_position.y + sin(angle) * radius));
countMe = false;
sound_manager->preload(SOUNDFILE);
start_position.y + sin(angle) * radius));
countMe = false;
sound_manager->preload(SOUNDFILE);
+
+ set_colgroup_active(COLGROUP_TOUCHABLE);
}
void
}
void
@@
-51,7
+53,7
@@
Flame::write(lisp::Writer& writer)
void
Flame::active_update(float elapsed_time)
{
void
Flame::active_update(float elapsed_time)
{
- angle = fmodf(angle + elapsed_time * speed,
2*M_PI
);
+ angle = fmodf(angle + elapsed_time * speed,
(float) (2*M_PI)
);
Vector newpos(start_position.x + cos(angle) * radius,
start_position.y + sin(angle) * radius);
movement = newpos - get_pos();
Vector newpos(start_position.x + cos(angle) * radius,
start_position.y + sin(angle) * radius);
movement = newpos - get_pos();
@@
-62,8
+64,6
@@
Flame::active_update(float elapsed_time)
void
Flame::activate()
{
void
Flame::activate()
{
- set_group(COLGROUP_TOUCHABLE);
-
sound_source.reset(sound_manager->create_sound_source(SOUNDFILE));
sound_source->set_position(get_pos());
sound_source->set_looping(true);
sound_source.reset(sound_manager->create_sound_source(SOUNDFILE));
sound_source->set_position(get_pos());
sound_source->set_looping(true);
@@
-75,7
+75,7
@@
Flame::activate()
void
Flame::deactivate()
{
void
Flame::deactivate()
{
- sound_source.re
lease
();
+ sound_source.re
set
();
}
void
}
void
@@
-84,4
+84,3
@@
Flame::kill_fall()
}
IMPLEMENT_FACTORY(Flame, "flame")
}
IMPLEMENT_FACTORY(Flame, "flame")
-