Don't store inactive timers in the saved game

Thanks to @fosnola for spotting this.
This commit is contained in:
2023-01-21 10:28:16 -05:00
parent a430abbd50
commit dc716fa5e6
3 changed files with 8 additions and 0 deletions

View File

@@ -22,6 +22,12 @@
#include "damage.hpp"
#include "fields.hpp"
bool cTimer::is_valid() const {
if(time < 0) return false;
if(node < 0) return false;
return true;
}
cSpecial::cSpecial(){
type = eSpecType::NONE;
sd1 = -1;

View File

@@ -98,6 +98,7 @@ public:
long time = 0;
eSpecCtxType node_type = eSpecCtxType::SCEN;
short node = -1;
bool is_valid() const;
};
// HAIL means called when initiating conversation.