Index: Daodan/src/Daodan_Config.c
===================================================================
--- Daodan/src/Daodan_Config.c	(revision 1007)
+++ Daodan/src/Daodan_Config.c	(revision 1008)
@@ -48,4 +48,9 @@
 	} },
 	{ "gameplay", "Gameplay", {
+		{ "characterawareness",
+			"Makes AI remember the player.",
+			C_BOOL,
+			{.intBoolVal = true},
+			{.intBoolVal = true} },
 		{ "cheatsenabled",
 			"Enables cheats without having to beat the game first.",
Index: Daodan/src/Daodan_Patch.c
===================================================================
--- Daodan/src/Daodan_Patch.c	(revision 1007)
+++ Daodan/src/Daodan_Patch.c	(revision 1008)
@@ -242,4 +242,25 @@
 }
 
+void* DDrPatch_ExecutableASM(char* from, char* nextInst, const unsigned char* code, int length)
+{
+	char* newCode = malloc(length+5);
+	if (!DDrPatch_NOOP(newCode, length+5))
+		return (void*)-1;
+
+	memcpy(newCode, code, length);
+	if (!DDrPatch_MakeJump(&newCode[length], nextInst))
+		return (void*)-1;
+
+	DWORD oldp;
+	if (!VirtualProtect(newCode, length+5, PAGE_EXECUTE_READWRITE, &oldp)) {
+		STARTUPMESSAGE("ExecASM: Could not mark page for new code as executable: from address 0x%08x", from);
+		return (void*)-1;
+	}
+	
+	if (!DDrPatch_MakeJump(from, newCode))
+		return (void*)-1;
+
+	return newCode;
+}
 
 void DDrPatch_PrintDisasm(void* addr, int instLimit, int sizeLimit)
Index: Daodan/src/Daodan_Patch.h
===================================================================
--- Daodan/src/Daodan_Patch.h	(revision 1007)
+++ Daodan/src/Daodan_Patch.h	(revision 1008)
@@ -16,4 +16,5 @@
 bool DDrPatch_Int16(short* dest, unsigned short value);
 bool DDrPatch_NOOP(char* dest, unsigned int length);
+void* DDrPatch_ExecutableASM(char* from, char* nextInst, const unsigned char* code, int length);
 
 void DDrPatch_PrintDisasm(void* addr, int instLimit, int sizeLimit);
Index: Daodan/src/Patches/Patches.c
===================================================================
--- Daodan/src/Patches/Patches.c	(revision 1007)
+++ Daodan/src/Patches/Patches.c	(revision 1008)
@@ -278,5 +278,27 @@
 
 
-
+void DD_Patch_CharacterAwareness()
+{
+	const unsigned char patch[] =
+	{
+		0x52,				//  0: push   edx
+		0xBA, 0xA0, 0x16, 0x00, 0x00,	//  1: mov    edx,0x16a0
+		0x89, 0xF8,			//  6: mov    eax,edi
+		0xF7, 0xE2,			//  8: mul    edx
+		0x89, 0xC2,			//  a: mov    edx,eax
+		0xE8, 0x00, 0x00, 0x00, 0x00,	//  c: call   ONrGameState_LivingCharacterList_Get (-> OniExe + 0x000fca90)
+		0x8B, 0x00,			// 11: mov    eax,[eax]
+		0x01, 0xD0,			// 13: add    eax,edx
+		0x89, 0xC6,			// 15: mov    esi,eax
+		0x5A,				// 17: pop    edx 
+		0x8B, 0x46, 0x04,		// 18: (ORIG) mov        eax, dword [ds:esi+0x4]
+		0xF6, 0xC4, 0x80		// 1b: (ORIG) test       ah, 0x80
+	};
+	void* newCode = DDrPatch_ExecutableASM((char*)(OniExe + 0x0009A609), (char*)(OniExe + 0x0009A60F), patch, sizeof(patch));
+	if ((int)newCode > 0) {
+		DDrPatch_MakeCall((char*)(newCode+0xC), (char*)(OniExe + 0x000FCA90));
+		DDrPatch_NOOP((char*)(OniExe + 0x0009A60E), 1);
+	}
+}
 
 
@@ -321,4 +343,7 @@
 	if (DDrConfig_GetOptOfType("modding.d_regen", C_BOOL)->value.intBoolVal)
 		DD_Patch_Regeneration();
+
+	if (DDrConfig_GetOptOfType("gameplay.characterawareness", C_BOOL)->value.intBoolVal)
+		DD_Patch_CharacterAwareness();
 
 	// Cheats always enabled
Index: Daodan/src/_Version.h
===================================================================
--- Daodan/src/_Version.h	(revision 1007)
+++ Daodan/src/_Version.h	(revision 1008)
@@ -6,5 +6,5 @@
 
 #define DAODAN_VERSION_MAJOR 3
-#define DAODAN_VERSION_MINOR 8
+#define DAODAN_VERSION_MINOR 9
 #define DAODAN_VERSION_STRING STRINGIZE(DAODAN_VERSION_MAJOR) "." STRINGIZE(DAODAN_VERSION_MINOR)
 
