projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New bomb sprite
[supertux.git]
/
src
/
worldmap
/
worldmap.cpp
diff --git
a/src/worldmap/worldmap.cpp
b/src/worldmap/worldmap.cpp
index
c491470
..
cf48384
100644
(file)
--- a/
src/worldmap/worldmap.cpp
+++ b/
src/worldmap/worldmap.cpp
@@
-54,6
+54,7
@@
#include "main.hpp"
#include "spawn_point.hpp"
#include "file_system.hpp"
#include "main.hpp"
#include "spawn_point.hpp"
#include "file_system.hpp"
+#include "physfs/physfs_stream.hpp"
#include "tile_manager.hpp"
#include "tile_set.hpp"
#include "gui/menu.hpp"
#include "tile_manager.hpp"
#include "tile_set.hpp"
#include "gui/menu.hpp"
@@
-939,6
+940,15
@@
WorldMap::setup()
throw SquirrelError(global_vm, "Couldn't set worldmap in roottable");
sq_pop(global_vm, 1);
throw SquirrelError(global_vm, "Couldn't set worldmap in roottable");
sq_pop(global_vm, 1);
+ //Run default.nut just before init script
+ try {
+ IFileStream in(levels_path + "/default.nut");
+ run_script(in, "WorldMap::default.nut");
+ } catch(std::exception& ) {
+ // doesn't exist or erroneous; do nothing
+ }
+
+
if(init_script != "") {
std::istringstream in(init_script);
run_script(in, "WorldMap::init");
if(init_script != "") {
std::istringstream in(init_script);
run_script(in, "WorldMap::init");