mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-26 21:57:57 +03:00
Merge pull request #266 from rlenhub/develop
Implement "OnPhysGunPull" output in CPhysicsProp
This commit is contained in:
commit
72bd5fe948
@ -2723,6 +2723,11 @@ CWeaponPhysCannon::FindObjectResult_t CWeaponPhysCannon::FindObject( void )
|
||||
pullDir *= (mass + 0.5) * (1/50.0f);
|
||||
}
|
||||
|
||||
CPhysicsProp* pProp = dynamic_cast<CPhysicsProp*>(pObj);
|
||||
if (pProp) {
|
||||
pProp->OnPhysGunPull( pOwner );
|
||||
}
|
||||
|
||||
// Nudge it towards us
|
||||
pObj->ApplyForceCenter( pullDir );
|
||||
return OBJECT_NOT_FOUND;
|
||||
|
@ -3021,6 +3021,7 @@ BEGIN_DATADESC( CPhysicsProp )
|
||||
DEFINE_OUTPUT( m_MotionEnabled, "OnMotionEnabled" ),
|
||||
DEFINE_OUTPUT( m_OnPhysGunPickup, "OnPhysGunPickup" ),
|
||||
DEFINE_OUTPUT( m_OnPhysGunOnlyPickup, "OnPhysGunOnlyPickup" ),
|
||||
DEFINE_OUTPUT( m_OnPhysGunPull, "OnPhysGunPull" ),
|
||||
DEFINE_OUTPUT( m_OnPhysGunPunt, "OnPhysGunPunt" ),
|
||||
DEFINE_OUTPUT( m_OnPhysGunDrop, "OnPhysGunDrop" ),
|
||||
DEFINE_OUTPUT( m_OnPlayerUse, "OnPlayerUse" ),
|
||||
@ -3391,6 +3392,13 @@ void CPhysicsProp::OnPhysGunPickup( CBasePlayer *pPhysGunUser, PhysGunPickup_t r
|
||||
CheckRemoveRagdolls();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void CPhysicsProp::OnPhysGunPull( CBasePlayer* pPhysGunUser ) {
|
||||
m_OnPhysGunPull.FireOutput(pPhysGunUser, this);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -413,6 +413,7 @@ public:
|
||||
void EnableMotion( void );
|
||||
bool CanBePickedUpByPhyscannon( void );
|
||||
void OnPhysGunPickup( CBasePlayer *pPhysGunUser, PhysGunPickup_t reason );
|
||||
void OnPhysGunPull( CBasePlayer *pPhysGunUser );
|
||||
void OnPhysGunDrop( CBasePlayer *pPhysGunUser, PhysGunDrop_t reason );
|
||||
|
||||
bool GetPropDataAngles( const char *pKeyName, QAngle &vecAngles );
|
||||
@ -446,6 +447,7 @@ private:
|
||||
COutputEvent m_OnPhysGunPickup;
|
||||
COutputEvent m_OnPhysGunPunt;
|
||||
COutputEvent m_OnPhysGunOnlyPickup;
|
||||
COutputEvent m_OnPhysGunPull;
|
||||
COutputEvent m_OnPhysGunDrop;
|
||||
COutputEvent m_OnPlayerUse;
|
||||
COutputEvent m_OnPlayerPickup;
|
||||
|
Loading…
x
Reference in New Issue
Block a user