mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2024-12-27 07:15:31 +03:00
Fixed a couple obscure crashes
This commit is contained in:
parent
2a24e9782c
commit
200001fdb9
@ -1626,6 +1626,11 @@ bool CNPC_MetroPolice::ShouldAttemptToStitch()
|
||||
//-----------------------------------------------------------------------------
|
||||
Vector CNPC_MetroPolice::StitchAimTarget( const Vector &posSrc, bool bNoisy )
|
||||
{
|
||||
#ifdef MAPBASE
|
||||
if ( !GetEnemy() )
|
||||
return vec3_origin;
|
||||
#endif
|
||||
|
||||
// This will make us aim a stitch at the feet of the player so we can see it
|
||||
if ( !GetEnemy()->IsPlayer() )
|
||||
return GetShootTarget()->BodyTarget( posSrc, bNoisy );
|
||||
|
@ -1363,7 +1363,7 @@ CBaseAnimating *CreateServerRagdollSubmodel( CBaseAnimating *pOwner, const char
|
||||
|
||||
#ifdef MAPBASE_VSCRIPT
|
||||
// Hook for pre-spawn ragdolling
|
||||
if (pOwner->m_ScriptScope.IsInitialized() && CBaseAnimating::g_Hook_OnServerRagdoll.CanRunInScope( pOwner->m_ScriptScope ))
|
||||
if (pOwner && pOwner->m_ScriptScope.IsInitialized() && CBaseAnimating::g_Hook_OnServerRagdoll.CanRunInScope( pOwner->m_ScriptScope ))
|
||||
{
|
||||
// ragdoll, submodel
|
||||
ScriptVariant_t args[] = { ScriptVariant_t( pRagdoll->GetScriptInstance() ), true };
|
||||
|
Loading…
Reference in New Issue
Block a user