Skip to content

Commit fa474b9

Browse files
Reset Tux' velocity after using a door (#3279)
This avoids taking any movement from last sector to the new one. Fixes #3272
1 parent 6a13eac commit fa474b9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/supertux/game_session.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,9 @@ GameSession::update(float dt_sec, const Controller& controller)
603603

604604
if (m_spawn_with_invincibility)
605605
{
606+
// Reset velocity to avoid taking any movement from last sector to new one
607+
p->set_velocity(0.0f, 0.0f);
608+
606609
// Make all players temporarily safe after spawning
607610
p->make_temporarily_safe(SAFE_TIME);
608611
}

0 commit comments

Comments
 (0)