//=========================================================
// SoundPointerForIndex - returns a pointer to the instance
// of CSound at index's position in the sound pool.
//=========================================================
CSound* CSoundEnt :: SoundPointerForIndex( int iIndex )
{
if ( !pSoundEnt )
{
return NULL;
}
if ( iIndex > ( MAX_WORLD_SOUNDS - 1 ) )
{
ALERT ( at_console, "SoundPointerForIndex() - Index too large!\n" );
return NULL;
}
if ( iIndex < 0 )
{
ALERT ( at_console, "SoundPointerForIndex() - Index < 0!\n" );
return NULL;
}
The signature is found and argument/return validates just fine.
However when I register a hook for the function it crashes on mapload and I'm not quite sure why, as the signature should be solid.
For search in IDA "8B ? ? ? ? ? 85 ? 75 ? 33 ? C3 8B ? ? ? 83 ? ? 7E ? 68 ? ? ? ? 6A ?"