From a3b3dbf3ced35ae4c0aca148d89509a12f785062 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Thu, 18 Nov 2010 19:21:57 +0000 Subject: Corrected default light and flare radius. Suppoort for entity, engine and color keys in fx_particles and particle scripts. Have light, fx_flare and fx_particles color override engine color if the engine spawnflag is set. --- src/model/mapfile.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/model/mapfile.cc') diff --git a/src/model/mapfile.cc b/src/model/mapfile.cc index f8e541c..84fd108 100644 --- a/src/model/mapfile.cc +++ b/src/model/mapfile.cc @@ -811,8 +811,7 @@ bool MapFile::got_key_axis(math::Axis &axis) axis.assign(yaw, pitch, roll); } else { unknown_value(); - } - + } return true; } else if (got_key_float("pitch", pitch)) { @@ -1111,7 +1110,7 @@ Model * MapFile::load(std::string const &name) continue; } else if (mapfile.got_key_color("_color", color)) { - tag_light->get_color().assign(color); + tag_light->set_color(color); continue; } else if (mapfile.got_key_int("spawnflags", u)) { @@ -1167,7 +1166,7 @@ Model * MapFile::load(std::string const &name) continue; } else if (mapfile.got_key_color("_color", color)) { - tag_flare->get_color().assign(color); + tag_flare->set_color(color); continue; } else if (mapfile.got_key_int("spawnflags", u)) { @@ -1232,6 +1231,10 @@ Model * MapFile::load(std::string const &name) tag_particles->get_location().assign(location * SCALE); continue; + } else if (mapfile.got_key_color("_color", color)) { + tag_particles->set_color(color); + continue; + } else if (mapfile.got_key_string("script", str)) { tag_particles->set_script(str); continue; -- cgit v1.2.3