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-03 23:35:59 +0000
committerStijn Buys <ingar@osirion.org>2013-11-03 23:35:59 +0000
commit8126e1941666f5dccd61e9ecc60db162049bb8ff (patch)
tree9468363f1670352ec8d5f2155cfcfa77b602d772 /src/game/base/npc.cc
parentfb18eff66171e855e378575b534683e4fb9c20f5 (diff)
Added initial support for NPC patrol routes,
added support for lawfull/unlawfull factions.
Diffstat (limited to 'src/game/base/npc.cc')
-rw-r--r--src/game/base/npc.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/game/base/npc.cc b/src/game/base/npc.cc
index 8b81f04..f8c27d9 100644
--- a/src/game/base/npc.cc
+++ b/src/game/base/npc.cc
@@ -6,6 +6,7 @@
#include "base/npc.h"
#include "base/game.h"
+#include "base/patrol.h"
namespace game {
@@ -72,6 +73,9 @@ NPC::NPC(const Profile profile, const ShipModel *shipmodel) : Ship(0, shipmodel)
npc_profile = profile;
npc_mood = MoodWander;
npc_destroyed_timestamp = 0;
+
+ npc_patrol = 0;
+ npc_leader = 0;
}
void NPC::set_mood(const Mood mood)
@@ -84,6 +88,11 @@ void NPC::set_leader(Ship *leader)
npc_leader = leader;
}
+void NPC::set_patrol(Patrol *patrol)
+{
+ npc_patrol = patrol;
+}
+
void NPC::frame(const unsigned long elapsed)
{
if (state() == core::Entity::Destroyed) {