Skip to content

Commit

Permalink
Add DisplayEffect to WorldMap
Browse files Browse the repository at this point in the history
Fixes data/levels/world1/worldmap.stwm:

[WARNING] /home/ingo/projects/supertux/trunk/supertux/src/squirrel/squirrel_environment.cpp:171 Error running script: Squirrel error: Couldn't start script (the index 'Effect' does not exist)
  • Loading branch information
Grumbel committed Dec 16, 2018
1 parent d0af0eb commit 17c0f03
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/worldmap/worldmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "gui/menu_manager.hpp"
#include "object/ambient_light.hpp"
#include "object/decal.hpp"
#include "object/display_effect.hpp"
#include "object/music_object.hpp"
#include "object/tilemap.hpp"
#include "physfs/ifile_stream.hpp"
Expand Down Expand Up @@ -115,6 +116,10 @@ WorldMap::finish_construction()
add<MusicObject>();
}

if (!get_object_by_type<DisplayEffect>()) {
add<DisplayEffect>("Effect");
}

flush_game_objects();
}

Expand Down

0 comments on commit 17c0f03

Please sign in to comment.