diff options
Diffstat (limited to 'src/game/base')
-rw-r--r-- | src/game/base/game.cc | 6 | ||||
-rw-r--r-- | src/game/base/npc.cc | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/game/base/game.cc b/src/game/base/game.cc index a628440..fa3e81a 100644 --- a/src/game/base/game.cc +++ b/src/game/base/game.cc @@ -236,6 +236,12 @@ void Game::func_target_dock(core::Player *player, core::Entity *entity) return; } + if (player->reputation(entity->faction()) <= core::range::reputation_hostile) { + // FIXME replace with "Denied" voice + player->send("Dock denied"); + return; + } + Ship * ship = static_cast<Ship *>(player->control()); ship->set_autopilot_target(entity); diff --git a/src/game/base/npc.cc b/src/game/base/npc.cc index d09f8a2..ca2a1c2 100644 --- a/src/game/base/npc.cc +++ b/src/game/base/npc.cc @@ -140,7 +140,7 @@ Ship *NPC::target_closest_enemy() } // reputation threshold to get attacked - if (reputation >= -50.0f) { + if (reputation > core::range::reputation_hostile) { continue; } |