diff --git a/src/script/script_manager.cpp b/src/script/script_manager.cpp index 259de775..dbd1d9c4 100644 --- a/src/script/script_manager.cpp +++ b/src/script/script_manager.cpp @@ -321,7 +321,7 @@ void SetScriptManager::updateRecursive(deque& to_update, Age starting_ void SetScriptManager::updateToUpdate(const ToUpdate& u, deque& to_update, Age starting_age) { Age age = u.value->last_script_update; - if (starting_age < age) return; // this value was already updated + if (starting_age <= age) return; // this value was already updated Context& ctx = getContext(u.card); bool changes = false; try { diff --git a/src/util/age.hpp b/src/util/age.hpp index b3a6c24b..2c187da2 100644 --- a/src/util/age.hpp +++ b/src/util/age.hpp @@ -40,6 +40,8 @@ public: /// Compare two ages, smaller means earlier inline bool operator < (Age a) const { return age < a.age; } /// Compare two ages + inline bool operator <= (Age a) const { return age <= a.age; } + /// Compare two ages inline bool operator == (Age a) const { return age == a.age; } /// A number corresponding to the age