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>2013-11-10 01:48:41 +0000
committerStijn Buys <ingar@osirion.org>2013-11-10 01:48:41 +0000
commit9dc3cc532820349a0f0e087afb60132927fd3411 (patch)
treebfdc9d515df65cde07f9fe217e7c87ed1556801f /src/game/base/game.cc
parentd4f8d1c8fde01a58bc757b588c9850e69225bc24 (diff)
Corrected a bug which prevented the patrol profile from being set correctly,
corrected a bug where 'give ship' would forget the last spawn, have NPC ships fire on nearby enemies, made patrol leaders hunt nearby enemies.
Diffstat (limited to 'src/game/base/game.cc')
-rw-r--r--src/game/base/game.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game/base/game.cc b/src/game/base/game.cc
index d5e541b..c4d6069 100644
--- a/src/game/base/game.cc
+++ b/src/game/base/game.cc
@@ -410,6 +410,7 @@ void Game::func_give(core::Player *player, const std::string &args)
ship->get_location().assign(player->control()->location());
ship->set_dock(oldship->dock());
+ ship->set_spawn(oldship->spawn());
ship->get_axis().assign(player->control()->axis());
ship->set_thrust(player->control()->thrust());
@@ -2099,9 +2100,9 @@ bool Game::load_zone(core::Zone *zone)
if (core::Parser::got_entity_key(zoneini, patrol)) {
continue;
} else if (zoneini.got_key_label("profile", strval)) {
- if (strval.compare("convoy")) {
+ if (strval.compare("convoy") == 0) {
patrol->set_profile(Patrol::ProfileConvoy);
- } else if (strval.compare("patrol")) {
+ } else if (strval.compare("patrol") == 0) {
patrol->set_profile(Patrol::ProfilePatrol);
} else {
zoneini.unknown_error("unknown profile '" + strval + "'");