Skip to content

Commit

Permalink
Unstable tile now refuses to respawn when tux is occupying original p…
Browse files Browse the repository at this point in the history
…osition
  • Loading branch information
MatusGuy committed Jul 12, 2023
1 parent efd65f4 commit 3fc5112
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/object/unstable_tile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include "object/unstable_tile.hpp"

#include "collision/collision.hpp"
#include "object/explosion.hpp"
#include "object/player.hpp"
#include "sprite/sprite.hpp"
Expand Down Expand Up @@ -198,7 +199,7 @@ UnstableTile::update(float dt_sec)
{
if (m_revive_timer.check())
{
if (Sector::current() && Sector::get().is_free_of_movingstatics(m_col.m_bbox.grown(-1.f)))
if (Sector::current() && Sector::get().is_free_of_movingstatics(Rectf(m_original_pos, get_bbox().get_size())))
{
revive();
}
Expand Down

0 comments on commit 3fc5112

Please sign in to comment.