mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-27 06:07:56 +03:00
Small fixes for issues of various sizes
This commit is contained in:
parent
b04fb3c43f
commit
daa4779978
@ -845,6 +845,7 @@ void CAI_Motor::MoveFacing( const AILocalMoveGoal_t &move )
|
||||
{
|
||||
// Don't let the facing queue interfere with arrival direction in important cases
|
||||
dir = move.facing;
|
||||
VectorNormalize( dir );
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
@ -2789,7 +2789,6 @@ Activity CBaseCombatCharacter::Weapon_BackupActivity( Activity activity, bool we
|
||||
|
||||
if (pTable && GetModelPtr())
|
||||
{
|
||||
int actCount = pWeapon->GetBackupActivityListCount();
|
||||
return Weapon_BackupActivityFromList( this, pTable, actCount, activity, weaponTranslationWasRequired, pWeapon );
|
||||
}
|
||||
|
||||
|
@ -7707,7 +7707,7 @@ bool CBaseEntity::HasContext( const char *name, const char *value ) const
|
||||
if (value == NULL)
|
||||
return true;
|
||||
else
|
||||
return Matcher_Match(STRING(m_ResponseContexts[i].m_iszValue), value);
|
||||
return Matcher_Match( value, STRING(m_ResponseContexts[i].m_iszValue) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2719,7 +2719,7 @@ void CNPC_Combine::HandleAnimEvent( animevent_t *pEvent )
|
||||
else if ( pEvent->event == COMBINE_AE_ALTFIRE )
|
||||
{
|
||||
#ifdef MAPBASE
|
||||
if ( IsAltFireCapable() )
|
||||
if ( IsAltFireCapable() && GetActiveWeapon() )
|
||||
#else
|
||||
if ( IsElite() )
|
||||
#endif
|
||||
|
@ -1539,7 +1539,7 @@ void CNPC_MetroPolice::OnUpdateShotRegulator( )
|
||||
// FIXME: This code (except the burst interval) could be used for all weapon types
|
||||
#ifdef MAPBASE
|
||||
// Only if we actually have the pistol out
|
||||
if ( EntIsClass( GetActiveWeapon(), gm_isz_class_Pistol ) )
|
||||
if ( GetActiveWeapon() && EntIsClass( GetActiveWeapon(), gm_isz_class_Pistol ) )
|
||||
#else
|
||||
if( Weapon_OwnsThisType( "weapon_pistol" ) )
|
||||
#endif
|
||||
|
@ -107,7 +107,7 @@ END_DATADESC()
|
||||
//-----------------------------------------------------------------------------
|
||||
acttable_t CWeaponSniperRifle::m_acttable[] =
|
||||
{
|
||||
{ ACT_RANGE_ATTACK1, ACT_RANGE_ATTACK_SNIPER_RIFLE, true }
|
||||
{ ACT_RANGE_ATTACK1, ACT_RANGE_ATTACK_SNIPER_RIFLE, true },
|
||||
|
||||
#if EXPANDED_HL2_UNUSED_WEAPON_ACTIVITIES
|
||||
// Optional new NPC activities
|
||||
|
@ -662,6 +662,7 @@ void CBasePlayer::CreateHandModel(int index, int iOtherVm)
|
||||
DispatchSpawn(vm);
|
||||
vm->FollowEntity(GetViewModel(iOtherVm), true);
|
||||
m_hViewModel.Set(index, vm);
|
||||
vm->AddEffects( EF_NODRAW );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -368,7 +368,7 @@ void CBaseViewModel::SetWeaponModel( const char *modelname, CBaseCombatWeapon *w
|
||||
|
||||
#ifdef MAPBASE
|
||||
// If our owning weapon doesn't support hands, disable the hands viewmodel(s)
|
||||
bool bSupportsHands = weapon->UsesHands();
|
||||
bool bSupportsHands = weapon != NULL ? weapon->UsesHands() : false;
|
||||
for (CBaseEntity *pChild = FirstMoveChild(); pChild != NULL; pChild = pChild->NextMovePeer())
|
||||
{
|
||||
if (pChild->GetClassname()[0] == 'h')
|
||||
|
@ -344,12 +344,12 @@ inline void CTakeDamageInfo::SetDamageCustom( int iDamageCustom )
|
||||
|
||||
inline int CTakeDamageInfo::GetDamageStats() const
|
||||
{
|
||||
return m_iDamageCustom;
|
||||
return m_iDamageStats;
|
||||
}
|
||||
|
||||
inline void CTakeDamageInfo::SetDamageStats( int iDamageCustom )
|
||||
{
|
||||
m_iDamageCustom = iDamageCustom;
|
||||
m_iDamageStats = iDamageCustom;
|
||||
}
|
||||
|
||||
inline int CTakeDamageInfo::GetAmmoType() const
|
||||
|
Loading…
x
Reference in New Issue
Block a user