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-07 22:52:17 +0000
committerStijn Buys <ingar@osirion.org>2013-11-07 22:52:17 +0000
commit3aa51da4ec976665a7e74bb659868d474400a101 (patch)
tree8996920adcb3af1e933feef24456116eb7911cdc /src/core/player.h
parent87d5637c09dca61a650fe81d83ef328943176503 (diff)
Track the amount of time the player has spent,
make the 'impulse' command disable the autopilot.
Diffstat (limited to 'src/core/player.h')
-rw-r--r--src/core/player.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/src/core/player.h b/src/core/player.h
index 8b60eee..8d614ee 100644
--- a/src/core/player.h
+++ b/src/core/player.h
@@ -172,6 +172,23 @@ public:
{
return player_pvpkills;
}
+
+ /**
+ * @brief amount of time the player has previously spent in the game
+ * */
+ inline const long time_wasted() const
+ {
+ return player_time_wasted;
+ }
+
+ /**
+ * @brief timestamp of the the moment the player joined the game
+ * */
+ inline const long time_joined() const
+ {
+ return player_time_joined;
+ }
+
/*----- server-side mesage functions ------------------------------ */
@@ -236,6 +253,12 @@ public:
/// set the amount of credits the players has
void set_credits(const long amount);
+
+ /// set the amount of time the player has previously spent in the game
+ void set_time_wasted(const long time_wasted);
+
+ /// set the timestamp the player joined to the current server time
+ void set_time_joined();
/**
* @brief add an amount to the player's credits
@@ -336,9 +359,9 @@ private:
long player_pvpkills;
- unsigned long player_time_previously_wasted;
+ unsigned long player_time_wasted;
- unsigned long player_time_last_joined;
+ unsigned long player_time_joined;
};