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

View file

@ -792,6 +792,13 @@ void CPlayerPickupController::Use( CBaseEntity *pActivator, CBaseEntity *pCaller
//Adrian: Oops, our object became motion disabled, let go!
IPhysicsObject *pPhys = pAttached->VPhysicsGetObject();
if ( !pPhys )
{
Shutdown();
return;
}
if ( pPhys && pPhys->IsMoveable() == false )
{
Shutdown();
@ -808,7 +815,7 @@ void CPlayerPickupController::Use( CBaseEntity *pActivator, CBaseEntity *pCaller
}
#endif
// +ATTACK will throw phys objects
if ( m_pPlayer->m_nButtons & IN_ATTACK )
if ( pPhys && m_pPlayer->m_nButtons & IN_ATTACK )
{
Shutdown( true );
Vector vecLaunch;