[Possible Issue & Fix] With Attribute Auto Update Scheduling

desertGhost_

New member
I think I may have a found an error in the Attribute class in AttributeManager.cs. In the Attribute class's Value property, I think the line

C#:
ScheduleAutoUpdate(0.01f);

should be

Code:
ScheduleAutoUpdate(m_AutoUpdateStartDelay);

because otherwise there is only a .01 second delay between when the value is changed and it auto updated.

I noticed this behavior when setting up the health attribute on a character to auto regenerate. I wanted my character's health to regenerate when damaged after a delay of 10 seconds. I found it was regenerating after .01 seconds until I changed this line of code.
 
Thanks for the report. I need to go back through my commit history but this may have been added when I was making some changes due to a bug report from @devomage.

@devomage - can you make this change and ensure everything still works in your project?
 
Changing line #58 and line #169 to:

C#:
ScheduleAutoUpdate(m_AutoUpdateStartDelay);

Works fine with my project at first glance. I'll post again if I notice anything strange.
 
Top