This commit is contained in:
speedvoltage 2025-03-29 21:43:58 +01:00 committed by GitHub
commit 8fa4bbf2af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1694,11 +1694,14 @@ void CFuncTrackTrain::Blocked( CBaseEntity *pOther )
}
else
{
Vector vecNewVelocity;
vecNewVelocity = pOther->GetAbsOrigin() - GetAbsOrigin();
VectorNormalize(vecNewVelocity);
vecNewVelocity *= m_flBlockDamage;
pOther->SetAbsVelocity( vecNewVelocity );
if ( pOther->GetMoveType() != MOVETYPE_VPHYSICS )
{
Vector vecNewVelocity;
vecNewVelocity = pOther->GetAbsOrigin() - GetAbsOrigin();
VectorNormalize( vecNewVelocity );
vecNewVelocity *= m_flBlockDamage;
pOther->SetAbsVelocity( vecNewVelocity );
}
}
if ( HasSpawnFlags(SF_TRACKTRAIN_UNBLOCKABLE_BY_PLAYER) )
{