mirror of
https://github.com/ENSL/NS.git
synced 2025-02-22 11:51:09 +00:00
Mantis 0000996:
Added checks to m_fInReload to prevent an empty weapon from going in a reloading loop. git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@34 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
parent
2f71850ff0
commit
b206e2b97d
1 changed files with 8 additions and 2 deletions
|
@ -243,6 +243,11 @@ BOOL AvHBasePlayerWeapon::DefaultDeploy( char *szViewModel, char *szWeaponModel,
|
||||||
|
|
||||||
BOOL AvHBasePlayerWeapon::DefaultReload( int iClipSize, int iAnim, float fDelay, int body)
|
BOOL AvHBasePlayerWeapon::DefaultReload( int iClipSize, int iAnim, float fDelay, int body)
|
||||||
{
|
{
|
||||||
|
// tankefugl: 0000996
|
||||||
|
if (m_fInReload == TRUE)
|
||||||
|
return TRUE;
|
||||||
|
// :tankefugl
|
||||||
|
|
||||||
if (m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
if (m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -704,7 +709,8 @@ bool AvHBasePlayerWeapon::ProcessValidAttack(void)
|
||||||
// puzl: 497 call GetEnabledState instead of testing directly
|
// puzl: 497 call GetEnabledState instead of testing directly
|
||||||
int enabledState=this->GetEnabledState();
|
int enabledState=this->GetEnabledState();
|
||||||
|
|
||||||
if(this->m_pPlayer->pev->viewmodel && ( enabledState == 1))
|
// tankefugl: 0000996 - added check vs m_fInReload
|
||||||
|
if(this->m_pPlayer->pev->viewmodel && ( enabledState == 1) && (m_fInReload == FALSE))
|
||||||
{
|
{
|
||||||
// don't fire underwater
|
// don't fire underwater
|
||||||
if((this->m_pPlayer->pev->waterlevel == 3) && !this->GetFiresUnderwater())
|
if((this->m_pPlayer->pev->waterlevel == 3) && !this->GetFiresUnderwater())
|
||||||
|
|
Loading…
Reference in a new issue