mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 05:52:59 +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); | ||||
|   | ||||
| @@ -1220,7 +1220,7 @@ EX void animate_parameter(parameter *par, string f) { | ||||
|   aps.emplace_back(animated_parameter{par, f}); | ||||
|   } | ||||
|  | ||||
| int ap_changes; | ||||
| EX int ap_changes; | ||||
|  | ||||
| void apply_animated_parameters() { | ||||
|   ap_changes = 0; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue