summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9307150)
If Tux dies while he is subject to increased gravity (jump_early_apex), he
retains this attribute during the dying sequence, which looks weird.
I will attach a patch that resets the safe_timer and gravity and, for
consistency, resets the invincibility upon death instead of checking !dying
when creating sparkles.
Resolves #507. Thanks to Matt McCutchen for this patch.
git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6290
837edb03-e0f3-0310-88ca-
d4d4e8b29345
ice_this_frame = false;
// when invincible, spawn particles
ice_this_frame = false;
// when invincible, spawn particles
- if (invincible_timer.started() && !dying)
+ if (invincible_timer.started())
{
if (systemRandom.rand(0, 2) == 0) {
float px = systemRandom.randf(bbox.p1.x+0, bbox.p2.x-0);
{
if (systemRandom.rand(0, 2) == 0) {
float px = systemRandom.randf(bbox.p1.x+0, bbox.p2.x-0);
GameSession::current()->set_reset_point("", Vector());
}
physic.enable_gravity(true);
GameSession::current()->set_reset_point("", Vector());
}
physic.enable_gravity(true);
+ physic.set_gravity_modifier(1.0f); // Undo jump_early_apex
+ safe_timer.stop();
+ invincible_timer.stop();
physic.set_acceleration(0, 0);
physic.set_velocity(0, -700);
set_bonus(NO_BONUS, true);
physic.set_acceleration(0, 0);
physic.set_velocity(0, -700);
set_bonus(NO_BONUS, true);