mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-23 21:24:27 +00:00
Don't play tripmine draw animation after placing the last tripmine (#300)
This commit is contained in:
parent
4053dca7a9
commit
ae4d65439c
@ -1609,6 +1609,7 @@ void EV_TripmineFire( event_args_t *args )
|
|||||||
pmtrace_t tr;
|
pmtrace_t tr;
|
||||||
|
|
||||||
idx = args->entindex;
|
idx = args->entindex;
|
||||||
|
const bool last = args->bparam1 != 0;
|
||||||
VectorCopy( args->origin, vecSrc );
|
VectorCopy( args->origin, vecSrc );
|
||||||
VectorCopy( args->angles, angles );
|
VectorCopy( args->angles, angles );
|
||||||
|
|
||||||
@ -1631,7 +1632,7 @@ void EV_TripmineFire( event_args_t *args )
|
|||||||
gEngfuncs.pEventAPI->EV_PlayerTrace( vecSrc, vecSrc + forward * 128.0f, PM_NORMAL, -1, &tr );
|
gEngfuncs.pEventAPI->EV_PlayerTrace( vecSrc, vecSrc + forward * 128.0f, PM_NORMAL, -1, &tr );
|
||||||
|
|
||||||
//Hit something solid
|
//Hit something solid
|
||||||
if( tr.fraction < 1.0f )
|
if( tr.fraction < 1.0f && !last )
|
||||||
gEngfuncs.pEventAPI->EV_WeaponAnimation ( TRIPMINE_DRAW, 0 );
|
gEngfuncs.pEventAPI->EV_WeaponAnimation ( TRIPMINE_DRAW, 0 );
|
||||||
|
|
||||||
gEngfuncs.pEventAPI->EV_PopPMStates();
|
gEngfuncs.pEventAPI->EV_PopPMStates();
|
||||||
|
@ -454,7 +454,7 @@ void CTripmine::PrimaryAttack( void )
|
|||||||
#else
|
#else
|
||||||
flags = 0;
|
flags = 0;
|
||||||
#endif
|
#endif
|
||||||
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usTripFire, 0.0f, g_vecZero, g_vecZero, 0.0f, 0.0f, 0, 0, 0, 0 );
|
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usTripFire, 0.0f, g_vecZero, g_vecZero, 0.0f, 0.0f, 0, 0, m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] == 1, 0 );
|
||||||
|
|
||||||
if( tr.flFraction < 1.0f )
|
if( tr.flFraction < 1.0f )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user