From 64b28c073052535cd0ce444292bdfda1629a45d8 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sun, 1 Mar 2020 14:18:10 +0300 Subject: save/load --- src/control/Script.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/control/Script.h') diff --git a/src/control/Script.h b/src/control/Script.h index 18d148bf..5f3175f0 100644 --- a/src/control/Script.h +++ b/src/control/Script.h @@ -382,6 +382,14 @@ class CRunningScript public: void SetIP(uint32 ip) { m_nIp = ip; } CRunningScript* GetNext() const { return next; } + void BuildFromSaved(const CRunningScript& pSaved) + { + CRunningScript* n = next; + CRunningScript* p = prev; + *this = pSaved; + next = n; + prev = p; + } void UpdateTimers(float timeStep) { m_anLocalVariables[NUM_LOCAL_VARS] += timeStep; m_anLocalVariables[NUM_LOCAL_VARS + 1] += timeStep; -- cgit v1.2.3