Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign up[WIP] Fix for #14719, No more lag on Adrenaline Rush. #14727
Conversation
This comment has been minimized.
This comment has been minimized.
|
Using smartgit leads to unexpected weirdness...oh well, at least my first attempt to push from my pc to my repository and PR to cleverraven succeeded. |
This comment has been minimized.
This comment has been minimized.
|
You're a godsend to high-level survivors everywhere. |
This comment has been minimized.
This comment has been minimized.
|
Thanks for pointing it out in the forums. Do you know of anymore effects like this? It seems like nothing sets the intensity, so it's all suspect right now, since the default is 0. |
This comment has been minimized.
This comment has been minimized.
|
While this does fix the problem, it's not the best way to go about it. Instead we should just add a check for the effects of "int_dur_factor" as part of Creature::add_effect(). That would guarantee that effects apply directly at the correct intensity, without requiring changes to the application code that shouldn't be intended. Basically you want to take this logic from decay() in effect.cpp: if (eff_type->int_dur_factor != 0) {
// + 1 here so that the lowest is intensity 1, not 0
intensity = (duration / eff_type->int_dur_factor) + 1;
}and insert it into the proper locations in Creature::add_effect(). |
This comment has been minimized.
This comment has been minimized.
|
so, before the bit that triggers the debug message and sets intensity to 1, there should be a check. I'll work out what this means when I get back home to my PC. This would make it unnecessary to mess with other effects as well, and I'm all for that. I figured this wasn't the best way to handle it, but I'm not a subtle guy...Thanks for pointing me in the correct direction. I'll do better. |
Malkeus commentedJan 5, 2016
Fixes #14719. Adrenaline CBM and Adrenaline Injector spent 1 turn causing Adrenaline Comedown before becoming Adrenaline Rush, leading to unexpected delays upon activation.
The default intensity is 0, but the duration given requires intensity 2, leading to the 1 turn lag and a debug message.
Mycus Wrath suffered from the same error, this is corrected as well. There may be more effects with this error, I will look into it.
edit: Came at this from the wrong end of things, will try again when I get home in a few hours.