sp/src/game/shared/of2/of2_gamerules.cpp
//-----------------------------------------------------------------------------
// Purpose: Whether or not the NPC should drop a health vial
// Output : Returns true on success, false on failure.
//-----------------------------------------------------------------------------
Whether or not the NPC should drop a health vial
Output : Returns true on success, false on failure.
Whether or not the NPC should drop a health vial Output : Returns true on success false on failure .
bool COpposingForce2::NPC_ShouldDropHealth( CBasePlayer *pRecipient )
	{
		if ( m_flLastHealthDropTime > gpGlobals->curtime )
			return false;
		float healthPerc = ( (float) pRecipient->m_iHealth / (float) pRecipient->m_iMaxHealth );
		if ( random->RandomFloat( 0.0f, 1.0f ) > healthPerc*1.5f )
			return true;
		return false;
	}
bool COpposingForce2 :: NPC_ShouldDropHealth ( CBasePlayer * pRecipient ) { if ( m_flLastHealthDropTime > gpGlobals -> curtime ) return false ; float healthPerc = ( ( float ) pRecipient -> m_iHealth / ( float ) pRecipient -> m_iMaxHealth ) ; if ( random -> RandomFloat ( 0.0f , 1.0f ) > healthPerc * 1.5f ) return true ; return false ; }
Purpose: Whether or not the NPC should drop a health vial
Output : Returns true on success, false on failure.
Purpose : Whether or not the NPC should drop a health vial Output : Returns true on success false on failure .
// Can only do this every so often //Try to throw dynamic health