mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-09-05 11:57:58 +00:00
ap_changes no longer set if there was no actual change
This commit is contained in:
@@ -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