Spammy Rules calls
Posted: Tue Aug 27, 2013 8:20 pm
Jab/Scat/Any,
Should we really be calling the rule_manager inside of Process functions?
I was watching some logging debug level 9, and this one just blew my screen apart with these newer timers. I do not even know what a sscanf is lol... but the logger is inside the GetGlobalRule I believe.
I just ran into this doing the new R_Zone:SpawnUpdateTimer rule, where it was being pounded every tick, and decided to make it an int16 defined once in zone init.
However, since I do not know how well C++ "thinks", I do not know if it's any different slamming GetGlobalRule() repeatedly, or setting it once and using the int.
Thoughts?
Should we really be calling the rule_manager inside of Process functions?
Code: Select all
sscanf (rule_manager.GetGlobalRule(R_World, DuskTime)->GetString(), "%d:%d", &dusk_hour, &dusk_minute);
sscanf (rule_manager.GetGlobalRule(R_World, DawnTime)->GetString(), "%d:%d", &dawn_hour, &dawn_minute);I just ran into this doing the new R_Zone:SpawnUpdateTimer rule, where it was being pounded every tick, and decided to make it an int16 defined once in zone init.
However, since I do not know how well C++ "thinks", I do not know if it's any different slamming GetGlobalRule() repeatedly, or setting it once and using the int.
Thoughts?