Index: game/game_local.h
===================================================================
--- game/game_local.h	(revision 4964)
+++ game/game_local.h	(working copy)
@@ -9,22 +9,7 @@
  ***************************************************************************/
 
 // Copyright (C) 2004 Id Software, Inc.
-//
 
-/** DarkMod AI Note:
-* The following members in class idGameLocal:
-* lastAIAlertEntity, lastAIAlertTime and idGameLocal::AlertAI
-* ALL have nothing to do with DarkMod AI.
-*
-* DarkMod AI alerts are handled in class idAI
-*
-* AIAlertEntity alerts ALL AI to the entity in vanilla D3
-*
-* Unfortunately idGameLocal::AlertAI has the same name as
-* our DarkMod alert function, idAI::AlertAI.  DarkMod
-* alerts do not directly make use of idGameLocal::AlertAI.
-**/
-
 #ifndef __GAME_LOCAL_H__
 #define	__GAME_LOCAL_H__
 
@@ -786,12 +771,6 @@
 
 	bool					RequirementMet( idEntity *activator, const idStr &requires, int removeItem );
 
-/**
-* The following are vanilla D3 functions that have nothing to do with TDM's AI alert system
-**/
-	void					AlertAI( idEntity *ent );
-	idActor *				GetAlertEntity( void );
-
 	bool					InPlayerPVS( idEntity *ent ) const;
 	bool					InPlayerConnectedArea( idEntity *ent ) const;
 
@@ -988,9 +967,6 @@
 	idList<idAAS *>			aasList;				// area system
 	idStrList				aasNames;
 
-	idEntityPtr<idActor>	lastAIAlertEntity;
-	int						lastAIAlertTime;
-
 	idDict					spawnArgs;				// spawn args used during entity spawning  FIXME: shouldn't be necessary anymore
 
 	pvsHandle_t				playerPVS;				// merged pvs of all players
Index: game/game_local.cpp
===================================================================
--- game/game_local.cpp	(revision 4964)
+++ game/game_local.cpp	(working copy)
@@ -358,8 +358,6 @@
 	camera = NULL;
 	aasList.Clear();
 	aasNames.Clear();
-	lastAIAlertEntity = NULL;
-	lastAIAlertTime = 0;
 	spawnArgs.Clear();
 	gravity.Set( 0, 0, -1 );
 	playerPVS.h = (unsigned int)-1;
@@ -987,9 +985,6 @@
 
 	savegame.WriteMaterial( globalMaterial );
 
-	lastAIAlertEntity.Save( &savegame );
-	savegame.WriteInt( lastAIAlertTime );
-
 	savegame.WriteDict( &spawnArgs );
 
 	savegame.WriteInt( playerPVS.i );
@@ -1406,9 +1401,6 @@
 	testmodel		= NULL;
 	testFx			= NULL;
 
-	lastAIAlertEntity = NULL;
-	lastAIAlertTime = 0;
-	
 	previousTime	= 0;
 	time			= 0;
 	framenum		= 0;
@@ -2080,9 +2072,6 @@
 
 	savegame.ReadMaterial( globalMaterial );
 
-	lastAIAlertEntity.Restore( &savegame );
-	savegame.ReadInt( lastAIAlertTime );
-
 	savegame.ReadDict( &spawnArgs );
 
 	savegame.ReadInt( playerPVS.i );
@@ -5523,32 +5512,6 @@
 
 /*
 ============
-idGameLocal::AlertAI
-============
-*/
-void idGameLocal::AlertAI( idEntity *ent ) {
-	if ( ent && ent->IsType( idActor::Type ) ) {
-		// alert them for the next frame
-		lastAIAlertTime = time + msec;
-		lastAIAlertEntity = static_cast<idActor *>( ent );
-	}
-}
-
-/*
-============
-idGameLocal::GetAlertEntity
-============
-*/
-idActor *idGameLocal::GetAlertEntity( void ) {
-	if ( lastAIAlertTime >= time ) {
-		return lastAIAlertEntity.GetEntity();
-	}
-
-	return NULL;
-}
-
-/*
-============
 idGameLocal::RadiusDamage
 ============
 */
Index: game/ai/ai.cpp
===================================================================
--- game/ai/ai.cpp	(revision 4964)
+++ game/ai/ai.cpp	(working copy)
@@ -6009,11 +6009,6 @@
 	// end our looping ambient sound
 	StopSound( SND_CHANNEL_AMBIENT, false );
 
-	/* greebo: This is not needed anymore, I reckon.
-	if ( attacker && attacker->IsType( idActor::Type ) ) {
-		gameLocal.AlertAI( ( idActor * )attacker );
-	}*/
-
 	// activate targets
 	ActivateTargets( attacker );
 
@@ -6934,20 +6929,6 @@
 			// Enemy can't be seen (obscured or hidden in darkness)
 			gameRenderWorld->DebugArrow(colorRed, GetEyePosition(), GetEyePosition() + idVec3(0,0,10), 2, 100);
 		}
-
-		// check if we heard any sounds in the last frame
-		if (enemyEnt == gameLocal.GetAlertEntity())
-		{
-			float dist = (enemyEnt->GetPhysics()->GetOrigin() - org).LengthSqr();
-
-			if (dist < Square(AI_HEARING_RANGE))
-			{
-				// Enemy within hearing distance, update position
-				// greebo: TODO: This also updates lastVisibleReachableEnemyPos, is this ok?
-				enemyDetectable= true;
-
-			}
-		}
 	}
 
 	if (enemyDetectable)
Index: game/ai/ai_events.cpp
===================================================================
--- game/ai/ai_events.cpp	(revision 4964)
+++ game/ai/ai_events.cpp	(working copy)
@@ -41,7 +41,6 @@
 const idEventDef AI_FindEnemyAI( "findEnemyAI", "d", 'e' );
 const idEventDef AI_FindEnemyInCombatNodes( "findEnemyInCombatNodes", NULL, 'e' );
 const idEventDef AI_ClosestReachableEnemyOfEntity( "closestReachableEnemyOfEntity", "E", 'e' );
-const idEventDef AI_HeardSound( "heardSound", "d", 'e' );
 // greebo: TDM Event: Try to find a visible AI of the given team
 const idEventDef AI_FindFriendlyAI( "findFriendlyAI", "d", 'e' );
 const idEventDef AI_ProcessBlindStim( "processBlindStim", "ed" );
@@ -377,7 +376,6 @@
 	EVENT( AI_FindFriendlyAI,					idAI::Event_FindFriendlyAI )
 	EVENT( AI_ProcessBlindStim,					idAI::Event_ProcessBlindStim )
 	EVENT( AI_ProcessVisualStim,				idAI::Event_ProcessVisualStim )
-	EVENT( AI_HeardSound,						idAI::Event_HeardSound )
 	EVENT( AI_SetEnemy,							idAI::Event_SetEnemy )
 	EVENT( AI_ClearEnemy,						idAI::Event_ClearEnemy )
 	EVENT( AI_MuzzleFlash,						idAI::Event_MuzzleFlash )
@@ -757,42 +755,6 @@
 
 /*
 =====================
-idAI::Event_HeardSound
-=====================
-*/
-void idAI::Event_HeardSound( int ignore_team ) {
-
-	// check if we heard any sounds in the last frame
-
-	idActor	*actor = gameLocal.GetAlertEntity();
-
-	if ( actor && ( !ignore_team || ( ReactionTo( actor ) & ATTACK_ON_SIGHT ) ) && gameLocal.InPlayerPVS( this ) ) {
-
-		idVec3 pos = actor->GetPhysics()->GetOrigin();
-
-		idVec3 org = physicsObj.GetOrigin();
-
-		float dist = ( pos - org ).LengthSqr();
-
-		if ( dist < Square( AI_HEARING_RANGE ) ) {
-
-			idThread::ReturnEntity( actor );
-
-			return;
-
-		}
-
-	}
-
-
-
-	idThread::ReturnEntity( NULL );
-
-}
-
-
-/*
-=====================
 idAI::Event_SetEnemy
 =====================
 */
