From aaa4ff61f7b17759c4f4ccb3ac9011dd5f8a93f5 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Thu, 24 Jul 2008 00:47:13 +0000 Subject: primary, secondary, tertiary color rendering --- src/game/game.cc | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'src/game') diff --git a/src/game/game.cc b/src/game/game.cc index 50ac3ec..8fe2ad4 100644 --- a/src/game/game.cc +++ b/src/game/game.cc @@ -98,6 +98,7 @@ void func_buy(core::Player *player, std::string const &args) player->player_control = new Ship(player, shipmodel); player->control()->entity_color = player->color(); + player->control()->entity_color_second = player->color_second(); core::server()->broadcast("^B" + player->name() + " ^Bpurchased " + aux::article(shipmodel->name())); core::server()->send_sound(player, "game/buy-ship"); @@ -200,7 +201,6 @@ void Game::init() con_warn << worldini.name() << " unknown key '" << worldini.key() << "' at line " << worldini.line() << std::endl; } else if (worldini.section().compare("entity") == 0) { - std::string shapename; if (worldini.got_key_string("shape", shapename)) { if (shapename.compare("axis") == 0) { @@ -215,13 +215,13 @@ void Game::init() con_warn << worldini.name() << " unknown shape '" << shapename << "' at line " << worldini.line() << std::endl; } continue; - } else if (worldini.got_key_string("label", entity->entity_label)) + } else if (worldini.got_key_string("label", entity->entity_label)) { continue; - else if (worldini.got_key_string("name", entity->entity_name)) + } else if (worldini.got_key_string("name", entity->entity_name)) { continue; - else if (worldini.got_key_string("model", entity->entity_modelname)) + } else if (worldini.got_key_string("model", entity->entity_modelname)) { continue; - else if (worldini.got_key_angle("direction", direction)) { + } else if (worldini.got_key_angle("direction", direction)) { entity->axis().change_direction(direction); continue; } else if (worldini.got_key_angle("pitch", pitch)) { @@ -230,14 +230,17 @@ void Game::init() } else if (worldini.got_key_angle("roll", roll)) { entity->axis().change_roll(roll); continue; - } else if (worldini.got_key_angle("radius", entity->entity_radius)) + } else if (worldini.got_key_angle("radius", entity->entity_radius)) { continue; - else if (worldini.got_key_vector3f("location", entity->entity_location)) + } else if (worldini.got_key_vector3f("location", entity->entity_location)) { continue; - else if (worldini.got_key_color("color", entity->entity_color)) + } else if (worldini.got_key_color("color", entity->entity_color)) { continue; - else + } else if (worldini.got_key_color("colorsecond", entity->entity_color_second)) { + continue; + } else { con_warn << worldini.name() << " unknown key '" << worldini.key() << "' at line " << worldini.line() << std::endl; + } } } else if (worldini.got_section("star")) { star = new Star(); -- cgit v1.2.3