1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-19 20:16:10 +08:00

Sync with latest source-sdk-2013.

This commit is contained in:
Nicholas Hastings
2014-10-30 12:30:57 -04:00
parent 6abc7fddca
commit aa5841f220
407 changed files with 6784 additions and 10498 deletions

View File

@ -12,6 +12,11 @@
IMPLEMENT_NETWORKCLASS_ALIASED( BaseProjectile, DT_BaseProjectile )
BEGIN_NETWORK_TABLE( CBaseProjectile, DT_BaseProjectile )
#if !defined( CLIENT_DLL )
SendPropEHandle( SENDINFO( m_hOriginalLauncher ) ),
#else
RecvPropEHandle( RECVINFO( m_hOriginalLauncher ) ),
#endif // CLIENT_DLL
END_NETWORK_TABLE()
@ -22,5 +27,63 @@ CBaseProjectile::CBaseProjectile()
{
#ifdef GAME_DLL
m_iDestroyableHitCount = 0;
m_bCanCollideWithTeammates = false;
#endif
m_hOriginalLauncher = NULL;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CBaseProjectile::SetLauncher( CBaseEntity *pLauncher )
{
if ( m_hOriginalLauncher == NULL )
{
m_hOriginalLauncher = pLauncher;
}
#ifdef GAME_DLL
ResetCollideWithTeammates();
#endif // GAME_DLL
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CBaseProjectile::Spawn()
{
BaseClass::Spawn();
#ifdef GAME_DLL
ResetCollideWithTeammates();
#endif // GAME_DLL
}
#ifdef GAME_DLL
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CBaseProjectile::CollideWithTeammatesThink()
{
m_bCanCollideWithTeammates = true;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CBaseProjectile::ResetCollideWithTeammates()
{
// Don't collide with players on the owner's team for the first bit of our life
m_bCanCollideWithTeammates = false;
SetContextThink( &CBaseProjectile::CollideWithTeammatesThink, gpGlobals->curtime + GetCollideWithTeammatesDelay(), "CollideWithTeammates" );
}
#endif // GAME_DLL