|
|
@ -262,7 +262,8 @@ void CBaseMonster::Listen( void ) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//iSound = g_pSoundEnt->m_SoundPool[iSound].m_iNext;
|
|
|
|
//iSound = g_pSoundEnt->m_SoundPool[iSound].m_iNext;
|
|
|
|
iSound = pCurrentSound->m_iNext; |
|
|
|
if( pCurrentSound ) |
|
|
|
|
|
|
|
iSound = pCurrentSound->m_iNext; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -431,18 +432,21 @@ CSound *CBaseMonster::PBestSound( void ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
pSound = CSoundEnt::SoundPointerForIndex( iThisSound ); |
|
|
|
pSound = CSoundEnt::SoundPointerForIndex( iThisSound ); |
|
|
|
|
|
|
|
|
|
|
|
if( pSound && pSound->FIsSound() ) |
|
|
|
if( pSound ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
flDist = ( pSound->m_vecOrigin - EarPosition() ).Length(); |
|
|
|
if( pSound->FIsSound() ) |
|
|
|
|
|
|
|
|
|
|
|
if( flDist < flBestDist ) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
iBestSound = iThisSound; |
|
|
|
flDist = ( pSound->m_vecOrigin - EarPosition() ).Length(); |
|
|
|
flBestDist = flDist; |
|
|
|
|
|
|
|
|
|
|
|
if( flDist < flBestDist ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
iBestSound = iThisSound; |
|
|
|
|
|
|
|
flBestDist = flDist; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
iThisSound = pSound->m_iNextAudible; |
|
|
|
iThisSound = pSound->m_iNextAudible; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if( iBestSound >= 0 ) |
|
|
|
if( iBestSound >= 0 ) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -2367,7 +2371,7 @@ BOOL CBaseMonster::BuildNearestRoute( Vector vecThreat, Vector vecViewOffset, fl |
|
|
|
// try to actually get there
|
|
|
|
// try to actually get there
|
|
|
|
if( BuildRoute( node.m_vecOrigin, bits_MF_TO_LOCATION, NULL ) ) |
|
|
|
if( BuildRoute( node.m_vecOrigin, bits_MF_TO_LOCATION, NULL ) ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
flMaxDist = flDist; |
|
|
|
// flMaxDist = flDist;
|
|
|
|
m_vecMoveGoal = node.m_vecOrigin; |
|
|
|
m_vecMoveGoal = node.m_vecOrigin; |
|
|
|
return TRUE; // UNDONE: keep looking for something closer!
|
|
|
|
return TRUE; // UNDONE: keep looking for something closer!
|
|
|
|
} |
|
|
|
} |
|
|
@ -3278,7 +3282,7 @@ BOOL CBaseMonster::BBoxFlat( void ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return FALSE; |
|
|
|
return FALSE; |
|
|
|
} |
|
|
|
} |
|
|
|
flLength = flLength2; |
|
|
|
// flLength = flLength2;
|
|
|
|
|
|
|
|
|
|
|
|
return TRUE; |
|
|
|
return TRUE; |
|
|
|
} |
|
|
|
} |
|
|
|