Skip to content

Commit

Permalink
Bind Sector in Level_flip_vertically
Browse files Browse the repository at this point in the history
Fixes flip crashes the game #2378
  • Loading branch information
tobbi committed Oct 2, 2023
1 parent 50056c5 commit b6461a7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/scripting/level.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@

#include "scripting/level.hpp"

#include "supertux/d_scope.hpp"
#include "supertux/flip_level_transformer.hpp"
#include "supertux/game_session.hpp"
#include "supertux/sector.hpp"

namespace scripting {

Expand Down Expand Up @@ -75,6 +77,7 @@ void
Level_flip_vertically()
{
SCRIPT_GUARD_GAMESESSION();
BIND_SECTOR(::Sector::get());
FlipLevelTransformer flip_transformer;
flip_transformer.transform(game_session.get_current_level());
}
Expand Down

0 comments on commit b6461a7

Please sign in to comment.