Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/base/game.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/game/base/game.cc b/src/game/base/game.cc
index 2d8ddf5..9800eb8 100644
--- a/src/game/base/game.cc
+++ b/src/game/base/game.cc
@@ -1068,6 +1068,8 @@ bool Game::load_world()
if (inifile.got_key_label("zone", label)) {
zone = new core::Zone(label);
+ // set default ambient light color
+ zone->set_ambient_color(0.1f, 0.1f, 0.1f);
core::Zone::add(zone);
} else {
inifile.unknown_key();
@@ -1119,6 +1121,8 @@ bool Game::load_zone(core::Zone *zone)
con_print << "^BLoading zone " << zone->label() << "..." << std::endl;
size_t count = 0;
+
+ math::Color color;
core::Entity *entity = 0;
core::Inventory *inventory = 0;
@@ -1254,6 +1258,9 @@ bool Game::load_zone(core::Zone *zone)
} else if (zoneini.got_key_string("sky", strval)) {
zone->set_sky(strval);
continue;
+ } else if (zoneini.got_key_color("ambient", color)) {
+ zone->set_ambient_color(color);
+ continue;
} else {
zoneini.unknown_key();
}