Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2010-11-13 18:42:15 +0000
committerStijn Buys <ingar@osirion.org>2010-11-13 18:42:15 +0000
commit8506f3a8af135c55fdf9adae2859dfa210a2aa0f (patch)
treed952fcefb529159fde6d49d3b77c0275341b9019 /src/game/base/game.cc
parenta2c7b459910ca386117cc115a40da77be5224225 (diff)
adds a ship key for world entities which applies ship model settings to a world entity
Diffstat (limited to 'src/game/base/game.cc')
-rw-r--r--src/game/base/game.cc17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/game/base/game.cc b/src/game/base/game.cc
index d80fb3e..c8f3cc6 100644
--- a/src/game/base/game.cc
+++ b/src/game/base/game.cc
@@ -32,7 +32,7 @@
namespace game
{
-/* -- class Default ----------- ----------------------------------- */
+/* -- class Default ----------------------------------------------- */
// default player settings
core::Zone *Default::zone = 0;
@@ -1348,6 +1348,21 @@ bool Game::load_zone(core::Zone *zone)
} else {
entitytemplate->apply(entity);
}
+ } else if (zoneini.got_key_label("ship", strval)) {
+ ShipModel *shipmodel = ShipModel::find(strval);
+ if (!shipmodel) {
+ zoneini.unknown_error("unkown ship type '" + strval + "'");
+ } else {
+ shipmodel->apply(entity);
+ }
+
+ } else if (zoneini.got_key_label("ship", strval)) {
+ ShipModel *shipmodel = ShipModel::find(strval);
+ if (!shipmodel) {
+ zoneini.unknown_error("unkown ship type '" + strval + "'");
+ } else {
+ // TODO apply ship model
+ }
} else {
zoneini.unkown_key();
}