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>2014-12-22 16:57:20 +0000
committerStijn Buys <ingar@osirion.org>2014-12-22 16:57:20 +0000
commite7061d6fed8bdfc1828315eb8745cd919cb96bbc (patch)
treede614d556c748542ef169f1e4c295a832efdaae9 /src/game/base/npc.h
parent871552eab28d07c3aaf0cabb5fb167c0eb365bdf (diff)
Prevent wingmen from getting destroyed when you buy a new ship or use the 'give ship' engine command.
Diffstat (limited to 'src/game/base/npc.h')
-rw-r--r--src/game/base/npc.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/game/base/npc.h b/src/game/base/npc.h
index 39395c0..411f807 100644
--- a/src/game/base/npc.h
+++ b/src/game/base/npc.h
@@ -31,7 +31,7 @@ public:
/* ---- inspectors ----------------------------------------- */
/**
- * @brief returns the general moode of the NPC
+ * @brief returns the general mood of the NPC
* */
inline const Mood mood() const
{
@@ -39,7 +39,7 @@ public:
}
/**
- * @brief returns this NPC's leader.
+ * @brief returns this NPC's leader
* */
inline Ship *leader()
{
@@ -47,13 +47,21 @@ public:
}
/**
- * @brief returns this NPC's patrol.
+ * @brief returns this NPC's patrol
* */
inline Patrol *patrol()
{
return npc_patrol;
}
+ /**
+ * @brief return this NPC;s fleet commander
+ * */
+ inline core::Player *commander()
+ {
+ return npc_commander;
+ }
+
/* ---- mutators ------------------------------------------- */
/**
@@ -72,6 +80,11 @@ public:
void set_patrol(Patrol *patrol);
/**
+ * @brief set the NPC's fleet commander
+ * */
+ void set_commander(core::Player *player);
+
+ /**
* @brief game frame
* */
virtual void frame(const unsigned long elapsed);
@@ -103,6 +116,8 @@ private:
float npc_weapon_range;
+ core::Player *npc_commander;
+
}; // class NPC
} // namespace game