summaryrefslogtreecommitdiffhomepage
path: root/StarsEx/Campaign.h
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2024-04-01 05:16:14 +0200
committerAki <please@ignore.pl>2024-04-01 05:21:16 +0200
commit3be3bfaa17773550a696ed2b756136debfe79ae2 (patch)
treedb55a420e43ddaa4a72140d2795892757c1672d3 /StarsEx/Campaign.h
parent0a3451f251f360267e2927d8320787d59148eadd (diff)
downloadstarshatter-3be3bfaa17773550a696ed2b756136debfe79ae2.zip
starshatter-3be3bfaa17773550a696ed2b756136debfe79ae2.tar.gz
starshatter-3be3bfaa17773550a696ed2b756136debfe79ae2.tar.bz2
Fixed date and time consistency across Campaigns and Missions
This fixes campaign mission generation mostly, but a full playthrough will be needed. Missions now serialize and accept stardate setting a bit better. Thanks to this, date is propagated over multiplayer, too. This seems to break points system? Code-wise, this does not workaround the problems from before namely over-reliance on side-effects. Stardate class is at least one small step into good direction. Now, it'd be nice to attach clocks to simulation and campaign and whatever else that needs them.
Diffstat (limited to 'StarsEx/Campaign.h')
-rw-r--r--StarsEx/Campaign.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/StarsEx/Campaign.h b/StarsEx/Campaign.h
index c9bc534..8b38c51 100644
--- a/StarsEx/Campaign.h
+++ b/StarsEx/Campaign.h
@@ -130,7 +130,6 @@ public:
virtual void Unload();
virtual void Clear();
- virtual void CommitExpiredActions();
virtual void LockoutEvents(int seconds);
virtual void CheckPlayerGroup();
void CreatePlanners();
@@ -190,12 +189,8 @@ public:
int GetMissionId() const { return mission_id; }
Bitmap* GetImage(int n) { return &image[n]; }
long double GetTime() const { return time; }
- long double GetStartTime() const { return startTime; }
- void SetStartTime(long double t) { startTime = t; }
- long double GetLoadTime() const { return loadTime; }
- void SetLoadTime(long double t) { loadTime = t; }
- long double GetUpdateTime() const { return updateTime; }
- void SetUpdateTime(long double t) { updateTime = t; }
+ long double LoadTime() const;
+ void SetLoadTime(long double value);
bool InCutscene() const;
bool IsDynamic() const;
@@ -272,9 +267,7 @@ protected:
Mission* net_mission;
long double time;
- long double loadTime;
- long double startTime;
- long double updateTime;
+ long double load_time;
int lockout;
};