projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reimplemented fish. The code quality isn't comparable to Matze or Wansti's, who I...
[supertux.git]
/
src
/
sector.cpp
diff --git
a/src/sector.cpp
b/src/sector.cpp
index
f1f4bae
..
2464ccc
100644
(file)
--- a/
src/sector.cpp
+++ b/
src/sector.cpp
@@
-170,14
+170,16
@@
Sector::parse(const lisp::Lisp& sector)
}
update_game_objects();
}
update_game_objects();
+
+ if(!solids)
+ throw std::runtime_error("sector does not contain a solid tile layer.");
+
fix_old_tiles();
if(!camera) {
std::cerr << "sector '" << name << "' does not contain a camera.\n";
update_game_objects();
add_object(new Camera(this));
}
fix_old_tiles();
if(!camera) {
std::cerr << "sector '" << name << "' does not contain a camera.\n";
update_game_objects();
add_object(new Camera(this));
}
- if(!solids)
- throw std::runtime_error("sector does not contain a solid tile layer.");
update_game_objects();
}
update_game_objects();
}
@@
-306,10
+308,12
@@
Sector::parse_old_format(const lisp::Lisp& reader)
add_object(camera);
update_game_objects();
add_object(camera);
update_game_objects();
+
+ if(solids == 0)
+ throw std::runtime_error("sector does not contain a solid tile layer.");
+
fix_old_tiles();
update_game_objects();
fix_old_tiles();
update_game_objects();
- if(solids == 0)
- throw std::runtime_error("sector does not contain a solid tile layer.");
}
void
}
void
@@
-338,7
+342,7
@@
Sector::fix_old_tiles()
add_object(new SequenceTrigger(pos, sequence));
solids->change(x, y, 0);
}
add_object(new SequenceTrigger(pos, sequence));
solids->change(x, y, 0);
}
- }
+ }
}
}
}
}