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 19:01:43 +0000
committerStijn Buys <ingar@osirion.org>2013-11-10 19:01:43 +0000
commitf009487bbe6120f8f487302f5e1bb4ae606a51af (patch)
treeedb7d8a2bbbfba3adf5641180dc221a7269c74ab /src/game/base/patrol.cc
parentaaf57b8aa9cbc8287f298de2b19861eb23aec2f3 (diff)
Made NPCs only fire weapons on enemies within weapon range.
Diffstat (limited to 'src/game/base/patrol.cc')
-rw-r--r--src/game/base/patrol.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/game/base/patrol.cc b/src/game/base/patrol.cc
index 6640cb8..3df277a 100644
--- a/src/game/base/patrol.cc
+++ b/src/game/base/patrol.cc
@@ -362,6 +362,8 @@ void Patrol::create_patrol()
npc->inventory()->recalculate();
+ npc->calculate_weapon_range();
+
// dock npc at spawn
npc->set_zone(spawn->zone());
npc->set_dock(spawn);