Fix laser_spot.

This commit is contained in:
Night Owl 2018-01-29 18:40:46 +05:00
parent 1f5dd7ac91
commit af6d00dff3

View File

@ -269,18 +269,20 @@ void CMP5::SecondaryAttack( void )
void CMP5::Reload( void ) void CMP5::Reload( void )
{ {
UpdateSpot();
if( m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0 || m_iClip == MP5_MAX_CLIP ) if( m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0 || m_iClip == MP5_MAX_CLIP )
return; return;
int iResult = DefaultReload( MP5_MAX_CLIP, MP5_RELOAD, 3.0 ); int iResult = DefaultReload( MP5_MAX_CLIP, MP5_RELOAD, 1.5 );
if( iResult ) if( iResult )
{ {
#ifndef CLIENT_DLL #ifndef CLIENT_DLL
if( m_pSpot && m_fSpotActive ) if( m_pSpot && m_fSpotActive )
{ {
m_pSpot->Suspend( 3.0 ); m_pSpot->Suspend( 1.5 );
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 3.0; m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.5;
} }
#endif #endif
} }
@ -328,7 +330,6 @@ void CMP5::UpdateSpot( void )
if( !m_pSpot ) if( !m_pSpot )
{ {
m_pSpot = CLaserSpot::CreateSpot(); m_pSpot = CLaserSpot::CreateSpot();
m_pSpot->pev->scale = 0.5;
} }
UTIL_MakeVectors( m_pPlayer->pev->v_angle ); UTIL_MakeVectors( m_pPlayer->pev->v_angle );