-
Notifications
You must be signed in to change notification settings - Fork 599
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
[HL] Glitchy Hivehand #556
Comments
I think this is the same kind of bug with the shotguns on CS and CZ that I just posted beneath(#555). |
@Matthaiks, can you give text description? |
Occasionally, there is a problem with sound when one shoots during hornets regeneration (and ammo counter shows 0). Sometimes there is a sound glitch, sometimes there are no sound and movement at all (except hornets). |
Most likely caused by #1621 due to the client hitting the <= 0 condition before the server does, resulting in the client simulating the attack twice instead of once. |
These bugs happen because the client is also simulating the ammo regeneration and not properly synchronizing the ammo value with the server. Because the reload time variable is an absolute time value it will vary and cause inconsistent regeneration intervals. These bugs can be mostly fixed by making the following changes. Change these lines: Line 136 in c7240b9
Line 186 in c7240b9
To this: if (m_pPlayer->ammo_hornets <= 0) Change this function: Lines 265 to 275 in c7240b9
To this: void CHgun::Reload( void )
{
#ifndef CLIENT_DLL
if (m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] >= HORNET_MAX_CARRY)
return;
while (m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] < HORNET_MAX_CARRY && m_flRechargeTime < gpGlobals->time)
{
m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]++;
m_flRechargeTime += 0.5;
}
m_pPlayer->TabulateAmmo();
#endif
} I say mostly because with high ping the attack animation will sometimes not play. This is because the client isn't simulating ammo regeneration so the client thinks it's out of ammo. I tried to implement that, but it caused the client to simulate attacks at a higher rate than the server so i opted for this instead. |
…ing animation Resolves ValveSoftware/halflife#556
This is an old bug. The Hivehand sometimes behaves oddly when its magazine is empty.
In this video there are 3 examples. The first one seems rather normal. Check it out:
http://youtu.be/R4alKH4uEpQ
The text was updated successfully, but these errors were encountered: