Trains: Exclude vphysics

► Instead of forcefully setting velocity on all entities, ensure that physics objects are moved naturally by physics interactions.
This commit is contained in:
speedvoltage 2025-03-12 10:15:12 +01:00
parent a62efecf62
commit 4df91ab14f

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) )
{