-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shield regenerates on welcome cam #117
Comments
Hello @N7P0L3ON, thanks for the suggestions and for proposing a fix.
Sabian |
Maybe you can make it to count the time out of combat and after that to start regenerating; not to regenerate during combat. |
…nhlmp#117 * more comments to help code-searching. * stop all shield-regen sounds if the player is spectating or not alive. * stop regenerating the shield if the player is spectating or not alive. TODO: apply these changes to the welcome-cam. Co-Authored-By: Zarko Dinev <[email protected]>
instead of adding the if statements to each other one, I decided to nest the entire suit energy regeneration code in a single if else statement. I haven't been able to test this in-depth with more than one player but it should work okay, if there's any problems I'll do your proposed method. |
@N7P0L3ON Most of your changes have been fully implemented, we haven't been able to crack the shield regenerating in "welcome" or "click to spawn" mode, whatever you wish to call it. The issue with using a fork of AG is that none of the original AG code is really documented very well. Ergo, this issue will be renamed to track that instead and will be moved to 2.10 (it's not essential for the 2.9.1 patch we want to release this week). Thanks for your help though, it's been brilliant. |
I was looking ta the code for the energy regeneration you have in Aura and I noticed few flaws...
I will suggest the solutions to those here:
For 1: the solution is quite simple, increase the time for regen to say 0.5 / 0.3 secs.
For 2: Add a client CVAR to disable the sound or tone the sounds down more...
For 3: You should add some checks and few additional stops for the sounds.
Let's start with the checks:
right after the statements:
if (pev->armorvalue <= 0)
,if (pev->armorvalue < 10)
andif (sv_aura_regeneration.value != 0 && pev->armorvalue < MAX_NORMAL_BATTERY && m_flNextSuitRegenTime < gpGlobals->time)
add this:
The we need to add the stop for the sounds if we die or we get to Spectator/Observer:
In the functions:
void CBasePlayer::StartObserver( Vector vecPosition, Vector vecViewAngle )
andvoid CBasePlayer::Killed( entvars_t *pevAttacker, int iGib )
add this:
And this should fix the issues... IF you have other functions like welcome camera etc you'll have to take that one into account as well.
More clean way would be to create a function to stop those sounds and to call it instead, but it's up to use to decide.
The text was updated successfully, but these errors were encountered: