mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-11-26 16:07:11 +00:00
ap_changes no longer set if there was no actual change
This commit is contained in:
1 parent
cb9ad9d0c8
commit
b17b057890
2 files changed
+7
-4
No files matched your search
+6
-3
@@ -222,8 +222,9 @@ template<class T> struct enum_parameter : list_parameter {
|
||||
bool load_from_animation(const string& s) override {
|
||||
if(anim_value != *value) return false;
|
||||
load(s);
|
||||
bool changed = anim_value != *value;
|
||||
anim_value = *value;
|
||||
return true;
|
||||
return changed;
|
||||
}
|
||||
void load_as_animation(const string& s) override {
|
||||
load(s);
|
||||
@@ -278,8 +279,9 @@ template<class T> struct val_parameter : public parameter {
|
||||
bool load_from_animation(const string& s) override {
|
||||
if(anim_value != *value) return false;
|
||||
load(s);
|
||||
bool changed = anim_value != *value;
|
||||
anim_value = *value;
|
||||
return true;
|
||||
return changed;
|
||||
}
|
||||
void load_as_animation(const string& s) override {
|
||||
load(s);
|
||||
@@ -512,8 +514,9 @@ struct custom_parameter : public parameter {
|
||||
bool load_from_animation(const string& s) override {
|
||||
if(anim_value != get_cld()) return false;
|
||||
load(s);
|
||||
auto bak = anim_value;
|
||||
anim_value = get_cld();
|
||||
return true;
|
||||
return anim_value != bak;
|
||||
}
|
||||
void load_as_animation(const string& s) override {
|
||||
load(s);
|
||||
|
||||
Reference in new issue
Block a user