mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-23 13:14:51 +00:00
Fix env_spritetrain not moving when needed (#373)
This commit is contained in:
parent
341e2767ad
commit
ef2a745a4f
@ -2330,7 +2330,7 @@ void CSpriteTrain::Activate( void )
|
|||||||
if( FStringNull( pev->targetname ) )
|
if( FStringNull( pev->targetname ) )
|
||||||
{
|
{
|
||||||
m_nexting = TRUE;
|
m_nexting = TRUE;
|
||||||
m_nextTime = pev->ltime + 0.1;
|
pev->nextthink = pev->ltime + 0.1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
pev->spawnflags |= SF_TRAIN_WAIT_RETRIGGER;
|
pev->spawnflags |= SF_TRAIN_WAIT_RETRIGGER;
|
||||||
@ -2441,12 +2441,12 @@ void CSpriteTrain::Wait()
|
|||||||
STOP_SOUND( edict(), CHAN_STATIC, STRING( pev->noiseMovement ) );
|
STOP_SOUND( edict(), CHAN_STATIC, STRING( pev->noiseMovement ) );
|
||||||
if( pev->noiseStopMoving )
|
if( pev->noiseStopMoving )
|
||||||
EMIT_SOUND( ENT( pev ), CHAN_VOICE, STRING( pev->noiseStopMoving ), m_volume, ATTN_NORM );
|
EMIT_SOUND( ENT( pev ), CHAN_VOICE, STRING( pev->noiseStopMoving ), m_volume, ATTN_NORM );
|
||||||
pev->nextthink = 0;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( m_flWait != 0 )
|
if( m_flWait != 0 )
|
||||||
{
|
{
|
||||||
|
pev->nextthink = pev->ltime + m_flWait;
|
||||||
if( pev->noiseMovement )
|
if( pev->noiseMovement )
|
||||||
STOP_SOUND( edict(), CHAN_STATIC, STRING( pev->noiseMovement ) );
|
STOP_SOUND( edict(), CHAN_STATIC, STRING( pev->noiseMovement ) );
|
||||||
if( pev->noiseStopMoving )
|
if( pev->noiseStopMoving )
|
||||||
@ -2474,7 +2474,6 @@ void CSpriteTrain::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE
|
|||||||
// Pop back to last target if it's available
|
// Pop back to last target if it's available
|
||||||
if( pev->enemy )
|
if( pev->enemy )
|
||||||
pev->target = pev->enemy->v.targetname;
|
pev->target = pev->enemy->v.targetname;
|
||||||
pev->nextthink = 0;
|
|
||||||
pev->velocity = g_vecZero;
|
pev->velocity = g_vecZero;
|
||||||
if( pev->noiseStopMoving )
|
if( pev->noiseStopMoving )
|
||||||
EMIT_SOUND( ENT( pev ), CHAN_VOICE, STRING( pev->noiseStopMoving ), m_volume, ATTN_NORM );
|
EMIT_SOUND( ENT( pev ), CHAN_VOICE, STRING( pev->noiseStopMoving ), m_volume, ATTN_NORM );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user