Index: Daodan/MSVC/Daodan.c
===================================================================
--- Daodan/MSVC/Daodan.c	(revision 572)
+++ Daodan/MSVC/Daodan.c	(revision 573)
@@ -10,4 +10,6 @@
 #include "Daodan_Console.h"
 
+#include "Flatline_BSL.h"
+#include "Flatline_Hooks.h"
 #include "Daodan_WindowHack.h"
 
@@ -233,6 +235,9 @@
 		DDrPatch_Const(0x0051BB64, regen_patch);
 	}
-
-
+	DDrPatch_MakeCall(0x004FBCEA, DDrText_Hook);
+	DDrPatch_Int32(	0x004B24D2, 	FLrSpawnHack);
+	DDrPatch_NOOP(0x004C26CB, 6);
+	DDrPatch_MakeCall( 0x004C26CB, FLrHook_DoorOpen); 
+	
 	return true;
 }
Index: Daodan/MSVC/Daodan_Utility.c
===================================================================
--- Daodan/MSVC/Daodan_Utility.c	(revision 572)
+++ Daodan/MSVC/Daodan_Utility.c	(revision 573)
@@ -127,19 +127,60 @@
 	
 }
-	typedef struct
+
+typedef struct
+{
+	uint16_t x;
+	uint16_t y;
+
+} IMtPoint2D;
+IMtPoint2D Point = {256, 250};
+extern void* TSrTest;
+extern void* TSrScores;
+unsigned int lastPasteTime;
+
+void DDrPasteHack()
+{
+	COtTextArea* cons = *(COtTextArea**)0x00571B74;
+	char* clipboardText = 0;
+	if(GetAsyncKeyState(0x56) && GetAsyncKeyState(VK_CONTROL) )
 	{
-		uint16_t x;
-		uint16_t y;
-		
-	} IMtPoint2D;
-		IMtPoint2D Point = {256, 250};
-		extern void* TSrTest;
+		if(cons && cons->text_entries && cons->num_text_entries)
+		{
+			//why abs()? so we dont have to reset the timer after a level load.
+			if( abs(ONgGameState->GameTime - lastPasteTime) > 60) {
+				//DDrConsole_Print(cons->text_entries[0].text);
+				if(OpenClipboard(ONgPlatformData.Window))
+				{
+					unsigned short charsUsed = strlen(cons->text_entries[0].text);
+					//get rid of the v character
+					if(charsUsed) charsUsed--;
+					clipboardText = GetClipboardData(CF_TEXT);
+					if(clipboardText && strlen(clipboardText) + charsUsed < 502)
+					{
+						strcpy_s( cons->text_entries[0].text + charsUsed, 502 - charsUsed - 1, clipboardText);
+						lastPasteTime = ONgGameState->GameTime;
+					}
+				}
+			}
+			else
+			{
+				//need to hook whatever controls however often you can repeat characters...i guess.
+				//cons->text_entries[0].text[strlen(cons->text_entries[0].text) - 1] = 0;
+			}
+		}
+	}
+}
 void ONICALL DDrText_Hook()
 {
+
 	if(TSrTest)
 	{
 		TSrContext_DrawText(TSrTest, "FINALLY THIS BLOODY TEXT THING WORKS\n Gotta call it at the right point...", 128, 0, &Point);	
+
 	}
-COrConsole_StatusLine_Display();
+	FLrRun_Scores();
+	DDrPasteHack();
+	
+	COrConsole_StatusLine_Display();
 
 }
Index: Daodan/MSVC/FixedDaodan.sln
===================================================================
--- Daodan/MSVC/FixedDaodan.sln	(revision 572)
+++ Daodan/MSVC/FixedDaodan.sln	(revision 573)
@@ -1,6 +1,6 @@
 ﻿
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual C++ Express 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FixedDaodan", "FixedDaodan.vcproj", "{6138BFC9-DCAD-4525-90BE-D84703282A4A}"
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual C++ Express 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FixedDaodan", "FixedDaodan.vcxproj", "{6138BFC9-DCAD-4525-90BE-D84703282A4A}"
 EndProject
 Global
Index: Daodan/MSVC/FixedDaodan.vcproj
===================================================================
--- Daodan/MSVC/FixedDaodan.vcproj	(revision 572)
+++ Daodan/MSVC/FixedDaodan.vcproj	(revision 573)
@@ -5,4 +5,5 @@
 	Name="FixedDaodan"
 	ProjectGUID="{6138BFC9-DCAD-4525-90BE-D84703282A4A}"
+	RootNamespace="FixedDaodan"
 	Keyword="Win32Proj"
 	TargetFrameworkVersion="0"
@@ -40,4 +41,5 @@
 				Name="VCCLCompilerTool"
 				Optimization="0"
+				AdditionalIncludeDirectories="FFI\src;FFI\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FIXEDDAODAN_EXPORTS;"
 				MinimalRebuild="true"
@@ -63,6 +65,6 @@
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="ws2_32.lib winmm.lib"
-				OutputFile="C:\Program Files\Oni\edition\binkw32.dll"
+				AdditionalDependencies="ws2_32.lib winmm.lib opengl32.lib"
+				OutputFile="d:\Program Files\Oni\edition\binkw32.dll"
 				LinkIncremental="2"
 				ModuleDefinitionFile="binkw32.def"
@@ -119,5 +121,5 @@
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FIXEDDAODAN_EXPORTS;"
 				MinimalRebuild="true"
-				RuntimeLibrary="2"
+				RuntimeLibrary="0"
 				StructMemberAlignment="1"
 				UsePrecompiledHeader="0"
@@ -140,5 +142,5 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="ws2_32.lib winmm.lib"
-				OutputFile="C:\Program Files\Oni\Edition\binkw32.dll"
+				OutputFile="Release\binkw32.dll"
 				LinkIncremental="2"
 				GenerateManifest="true"
@@ -314,4 +316,8 @@
 			</File>
 			<File
+				RelativePath=".\glxext.h"
+				>
+			</File>
+			<File
 				RelativePath=".\inifile.h"
 				>
@@ -343,4 +349,8 @@
 			<File
 				RelativePath=".\Oni_Symbols.h"
+				>
+			</File>
+			<File
+				RelativePath=".\wglext.h"
 				>
 			</File>
Index: Daodan/MSVC/FixedDaodan.vcproj.KYLEPC.Kyle.user
===================================================================
--- Daodan/MSVC/FixedDaodan.vcproj.KYLEPC.Kyle.user	(revision 572)
+++ Daodan/MSVC/FixedDaodan.vcproj.KYLEPC.Kyle.user	(revision 573)
@@ -12,5 +12,5 @@
 				Command="C:\Program Files\Oni\edition\oni.exe"
 				WorkingDirectory="C:\Program Files\Oni\edition"
-				CommandArguments="-noswitch"
+				CommandArguments="-noswitch -debugfiles"
 				Attach="false"
 				DebuggerType="3"
Index: Daodan/MSVC/Flatline.c
===================================================================
--- Daodan/MSVC/Flatline.c	(revision 572)
+++ Daodan/MSVC/Flatline.c	(revision 573)
@@ -2,4 +2,6 @@
 #include "Oni_Character.h"
 #include "Flatline_Server.h"
+#include "Flatline_Client.h"
+#include "Daodan_Utility.h"
 //#include <sys/time.h>
 #include <time.h>
@@ -16,4 +18,15 @@
 
 #define BETTER_SYNC
+
+void PlayerDisconnect( int Player )
+{
+	ONrGameState_DeleteCharacter(PlayerList[Player]->Chr);
+	memset(PlayerList[Player], 0, sizeof(player_info));
+	PlayerList[Player] = 0;
+	if(server_started)
+	{
+		FLsPublic_Event( EV_DISCONNECT, &Player );
+	}
+}
 
 void DoRareSync( short Player, sockaddr_in * sender )
@@ -75,5 +88,5 @@
 			//if(Players[i].ip == sender.sin_addr.S_un.S_addr) break; //needs to send an error message
 			sender.sin_addr.S_un.S_addr = htonl(sender.sin_addr.S_un.S_addr);
-			playah = FLrServer_AddPlayer(from,packet->connect_send.name, 0);
+			playah = FLrServer_AddPlayer(from,packet->connect_send.name, 0, 0);
 			DDrConsole_PrintF("%s connected from %s", packet->connect_send.name, inet_ntoa(sender.sin_addr ) );
 			if(!((int)playah > -5 && (int)playah <= 0)) {
@@ -97,4 +110,5 @@
 				Char->Header.Type = 'CHAR';
 				Char->OSD.Options = chr_dontaim;
+				//Build the NEWCHARACTERs for the new player
 				for(j = 0; j < max_connections; j++) {
 					if(PlayerList[j] != 0) {
@@ -201,4 +215,16 @@
 			DoRareSync( packet->sync_request , &sender);
 			break;
+		case NULL_PACKET:
+			if(1)
+			{
+				int p;
+				char arr[9999];
+				for (p = 0; p < datalen; p++)
+				{
+					sprintf(arr,"%x",((char*)&packet)[p]);
+				}
+				DDrStartupMessage(arr);
+			}
+			break;
 		default:
 			DDrConsole_PrintF("Warning, recieved badly formed packet!");
@@ -206,4 +232,89 @@
 	}
 	return true;
+}
+
+void* TSrScores = 0;
+
+void FLrInit_Scores()
+{
+	void* TSFFTahoma;
+	int returnval;
+
+	if(!TSrScores){
+		TMrInstance_GetDataPtr( 'TSFF', "Tahoma", &TSFFTahoma);
+		returnval = TSrContext_New( TSFFTahoma, 7, 1, 1,  0, &TSrScores);
+		TSrContext_SetShade(TSrScores, 0xFFFFFFFF);
+	}
+	return;
+}
+
+void FLrRun_Scores()
+{
+	if(TSrScores)
+	{
+		const int scores_top = 20;
+		const int scores_left = 15;
+		//Convert to grabbing the height directly plox
+		const int line_height = 15;
+						unsigned char alpha = 0xCC;
+		unsigned int z;
+		uint16_t point[2] = {scores_left,scores_top};
+		//TSrContext_DrawText(TSrScores, "Name HP/HP", 0xCC, 0, point);	
+		point[0] += 20;
+		TSrContext_DrawText(TSrScores, "Name", alpha, 0, point);
+		point[0] += 100;
+		TSrContext_DrawText(TSrScores, "Dmg", alpha, 0, point);
+		point[0] += 30;
+		TSrContext_DrawText(TSrScores, "K", alpha, 0, point);
+		point[0] += 30;
+		TSrContext_DrawText(TSrScores, "D", alpha, 0, point);
+		point[0] += 30;
+		TSrContext_DrawText(TSrScores, "Health", alpha, 0, point);
+		point[0] = scores_left;
+
+		point[1] += line_height;
+		for(z = 0; z < MAX_CONNECTIONS; z++)
+		{
+			if(PlayerList[z])
+			{
+
+				char tempString[32];
+
+				sprintf(tempString, "%i", z);
+				TSrContext_DrawText(TSrScores, tempString, alpha, 0, point);
+				point[0] += 20;
+				
+
+				TSrContext_DrawText(TSrScores, PlayerList[z]->Chr->Name, alpha, 0, point);
+				point[0] += 100;
+
+				sprintf(tempString, "%i", PlayerList[z]->Chr->Damage);
+				TSrContext_DrawText(TSrScores, tempString, alpha, 0, point);
+				point[0] += 30;
+				sprintf(tempString, "%i", PlayerList[z]->Chr->Kills);
+				TSrContext_DrawText(TSrScores, tempString, alpha, 0, point);
+				point[0] += 30;
+				sprintf(tempString, "%i", PlayerList[z]->player_data.Deaths);
+				TSrContext_DrawText(TSrScores, tempString, alpha, 0, point);
+				point[0] += 30;
+				if(PlayerList[z]->Chr->Health)
+				{
+					sprintf(tempString, "%i", PlayerList[z]->Chr->Health);
+					TSrContext_DrawText(TSrScores, tempString, alpha, 0, point);
+					point[0] += 25;
+					sprintf(tempString, "/%i", PlayerList[z]->Chr->MaxHealth);
+					TSrContext_DrawText(TSrScores, tempString, alpha, 0, point);
+				}
+				else
+				{
+					TSrContext_SetShade(TSrScores, 0x00FF0000);
+					TSrContext_DrawText(TSrScores, "DEAD", alpha, 0, point);
+					TSrContext_SetShade(TSrScores, 0xFFFFFFFF);
+				}
+				point[0] = scores_left;
+				point[1] += line_height;
+			}
+		}
+	}
 }
 
@@ -214,5 +325,5 @@
 		struct hostent *host_entry;
 	gethostname(szHostName, 255);
-
+	FLrInit_Scores();
 	host_entry=gethostbyname(szHostName);
 	DDrConsole_PrintF("Server started at %s...", inet_ntoa (*(struct in_addr *)*host_entry->h_addr_list));
@@ -286,4 +397,5 @@
 		ActiveCharacter * Active;
 		flatline_packet packet;
+			FLrInit_Scores();
 //#define SPAM_INPUT
 #ifdef SPAM_INPUT
@@ -329,4 +441,16 @@
 			COrMessage_Print(packet.data, "chat", 0);
 			break;
+		case NULL_PACKET:
+			if(1)
+			{
+				int p;
+				char arr[9999];
+				for (p = 0; p < len; p++)
+				{
+					sprintf(arr,"%x",((char*)&packet)[p]);
+				}
+				DDrStartupMessage(arr);
+			}
+			break;
 		case CONNECT_SEND:
 			;if(1) {
@@ -340,5 +464,5 @@
 			;if(1) { //haxhaxhax
 			CharacterObject* Char = &(packet.new_player.Character);
-			uint32_t chr_index = 0;
+			uint32_t chr_index = packet.new_player.Playernumber;
 			Character* PC;
 			DDrConsole_PrintF("%i |  %i", packet.new_player.Playernumber ,client_slot);
@@ -352,8 +476,9 @@
 			else {
 				ONrGameState_NewCharacter(Char, NULL, NULL, &chr_index);
-				ONgGameState->CharacterStorage[chr_index].field_1E8 = 0;
+				ONgGameState->CharacterStorage[chr_index].charType = 0;
 				PlayerList[packet.new_player.Playernumber] = &Players[chr_index];
 				Players[chr_index].Chr = &(ONgGameState->CharacterStorage[chr_index]);
 				Players[chr_index].Chr->Flags &= 0xFFBFFFFF;
+				Players[chr_index].Chr->MaxHealth = 200;
 				Players[chr_index].spawnnumber = chr_index;
 				DDrConsole_PrintF("Spawning player %s, class %s, slot  %i", ((new_player*)(packet.data))->Character.OSD.Name, ((new_player*)(packet.data))->Character.OSD.Class,chr_index) ;
@@ -404,5 +529,5 @@
 					sync_request.id = RARE_SYNC_DATA_REQUEST;
 					sync_request.sync_request = i;
-					DDrConsole_PrintF( "Requesting sync data for player %i, old index %u", i, PlayerList[i]->rare_sync_index);
+					//DDrConsole_PrintF( "Requesting sync data for player %i, old index %u, new index %i", i, PlayerList[i]->rare_sync_index, data->rare_sync_index);
 					sent_bytes = NetUDPSocket_Send(client_sock,(sockaddr *) &address, (char*)&sync_request, FLATLINE_HEADER + sizeof(int) );
 			}
@@ -471,5 +596,6 @@
 			}
 			break;
-			
+		case FLATLINE_EVENT:
+			FLcEvent_Handler(packet.flatline_event.event_index, packet.flatline_event.intArray);
 		default:
 			DDrConsole_PrintF("Warning, recieved badly formed packet!");
@@ -514,4 +640,58 @@
 static flatline_packet cache_input = {0};
 extern void* TSrTest;
+
+void ONrCharacter_SetAnimationInternal(Character *ioCharacter, ActiveCharacter *ioActiveCharacter,
+									   short inFromState, short inNextAnimType, const void *inAnimation)
+{
+	void		*characterClass = ioCharacter->ONCC;
+	//void	*collection = ioCharacter->characterClass;
+	short index = ioCharacter->Number;//ONrCharacter_GetIndex(ioCharacter);
+	short animType;
+	if(inAnimation == NULL) return;
+	//UUmAssert(NULL != inAnimation);
+	
+	animType = *((char*)inAnimation  + 0x15A);
+	
+	ioActiveCharacter->Animation = inAnimation;
+	ioActiveCharacter->Frame = 0;
+	ioActiveCharacter->AnimationFromState = inFromState;
+	ioActiveCharacter->AnimationType = animType;
+	ioActiveCharacter->NextAnimationType = inNextAnimType;
+	ioActiveCharacter->AnimationToState = TRrAnimation_GetTo((void *)inAnimation);
+
+	//UUmAssertTrigRange(ioCharacter->facing);
+
+/*	if (gDebugCharacters && (index == gDebugCharacterTarget)) {
+		COrConsole_Printf("anim %s state %s type %s length %d", 
+			TRrAnimation_GetName(inAnimation), 
+			ONrAnimStateToString(TRrAnimation_GetTo(inAnimation)),	
+			ONrAnimTypeToString(TRrAnimation_GetType(inAnimation)), 
+			TRrAnimation_GetDuration(inAnimation));
+	}*/
+
+	return;
+}
+
+char ONrAnimState_IsFallen(short inAnimState)
+{
+	char result = false;
+
+	switch(inAnimState)
+	{
+	case 18://ONcAnimState_Fallen_Back:
+	case 50://ONcAnimState_Fallen_Front:
+			result = true;
+		break;
+	}
+
+	return result;
+}
+
+void FLrRespawn(int i)
+{
+	DDrConsole_Print( "Respawn!");
+	ONrCorpse_Create(PlayerList[i]->Chr);
+	ONrCharacter_SetHitPoints( PlayerList[i]->Chr, PlayerList[i]->Chr->MaxHealth);
+}
 void * ONICALL FLrInput_Update_Keys(void) 
 {
@@ -525,7 +705,7 @@
 	*/	
 	ActiveCharacter * Active_Player = ONgGameState->ActiveCharacters;
-	Active_Player->PhyContext->Rotation;
-	Active_Player->PhyContext->Position;
-	ONgGameState->PlayerCharacter->Position;
+	//Active_Player->PhyContext->Rotation;
+	//Active_Player->PhyContext->Position;
+	//ONgGameState->PlayerCharacter->Position;
 
  
@@ -564,13 +744,5 @@
 	}
 #endif
-	//Testing drawing text to the screen...this failed. Will need to get it working eventually.
-	if( TSrTest )
-	{
-//		OniRectangle TextRect = { 128, 128, 256, 256 };
-		IMtPoint2D Point = {50, 50};
-		//TSrContext_DrawText(TSrTest, "Testing woohoo", 255, 0, &Point);
-		TSrContext_DrawText(TSrTest, "WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW", 255, 0, &Point);	
-		
-	}
+
 	if(!(server_started || client_connected)) return ONgGameState;
 
@@ -579,100 +751,100 @@
 		GameInput * Active_Input;
 		if(PlayerList[i] == 0) continue;
-		
-		//is this right?
-		Active_Player = (void*)ONrGetActiveCharacter( PlayerList[i]->Chr);
-	
+		if( !PlayerList[i]->Chr || (PlayerList[i]->flags == PF_SCRIPTEDAI && PlayerList[i]->Chr->Flags & ONcCharacterFlag_Dead ) )
+		{
+			PlayerDisconnect(i);
+			continue;
+		}
+		PlayerList[i]->Chr->Inventory.Weapons[0] = 0;
+		PlayerList[i]->Chr->Inventory.Weapons[1] = 0;
+		PlayerList[i]->Chr->Inventory.Weapons[2] = 0;
+		if( !client_connected && PlayerList[i]->Chr->Flags & ONcCharacterFlag_Dead )//dead
+		{
+			char doRespawn = false;
+			uint32_t Actions1Bitmask = Action_Punch | Action_Kick;
+			uint32_t Actions2Bitmask = Action2_Fire1 | Action2_Fire2;
+			if(client_connected) continue;
+			if(PlayerList[i]->state == STATE_ALIVE)
+			{
+				PlayerList[i]->state = STATE_DEAD;
+				PlayerList[i]->player_data.Deaths++;
+			}
+			if((i == 0 && ( ONgGameState->Input.Current.Actions1 & Actions1Bitmask || ONgGameState->Input.Current.Actions2 & Actions2Bitmask ))
+				|| (PlayerList[i]->Actions1 & Actions1Bitmask) || (PlayerList[i]->Actions2 & Actions2Bitmask) )
+			{
+				FLrRespawn(i);
+				PlayerList[i]->state = STATE_ALIVE;
+			}
+			continue;
+		}
+		else
+		{
+			Active_Player = (void*)ONrGetActiveCharacter( PlayerList[i]->Chr);
+		//	if(Active_Player == 0) continue;
+			//Active_Input = &(Active_Player->Input);
+			if(server_started) {
+				player_data * data;
+				flatline_packet data_out = {0};
+
+				//if( PlayerList[i]->Chr->Health == 0) PlayerList[i]->Chr->Health = PlayerList[i]->Chr->MaxHealth;
+
+				data_out.id = PLAYER_DATA;
+				data = (void*)&(data_out.data);
+				data->Deaths = PlayerList[i]->player_data.Deaths;
+				data->PlayerNum = i;
+				data->Kills = PlayerList[i]->Chr->Kills;
+				data->Damage = PlayerList[i]->Chr->Damage;
+				data->Health = PlayerList[i]->Chr->Health;
+				data->MaxHealth = PlayerList[i]->Chr->MaxHealth;
+				data->Facing = PlayerList[i]->Chr->Facing;
+				data->DesiredFacing = PlayerList[i]->Chr->DesiredFacing;
+				if(Active_Player && Active_Player->PhyContext)
+					data->Position = Active_Player->PhyContext->Position;
+
+				if( PlayerList[i]->OldClass != PlayerList[i]->Chr->ONCC || memcmp( &(PlayerList[i]->Inventory), &(PlayerList[i]->Chr->Inventory), sizeof(Inventory) ) )
+				{
+					PlayerList[i]->OldClass = PlayerList[i]->Chr->ONCC;
+					memcpy( &(PlayerList[i]->Inventory), &(PlayerList[i]->Chr->Inventory), sizeof(Inventory) );
+					PlayerList[i]->rare_sync_index++;
+
+				}
+				data->rare_sync_index = PlayerList[i]->rare_sync_index;
+				if(Active_Player)
+				{
+					data->Frame = Active_Player->Frame;	
+					memcpy(data->Animation, TMrInstance_GetInstanceName(Active_Player->Animation), 32);
+
+					if(Active_Player->targetThrow)
+					{
+						ActiveCharacter* Target = ONrGetActiveCharacter(Active_Player->ThrowTargetCharacter);
+						if(Target)
+						{
+							data->throw_data.throwing = Players[Active_Player->throwing].list_slot;
+							data->throw_data.throwFrame = Target->Frame;
+							strcpy_s(data->throw_data.throwName, 32, TMrInstance_GetInstanceName(Active_Player->targetThrow));
+						}
+					}
+				}
+				if(i == 0) {
+					data->Inputs.Actions1 = ((GameState*)(ONgGameState))->Input.Current.Actions1;
+					data->Inputs.Actions2 = ((GameState*)(ONgGameState))->Input.Current.Actions2;
+					data->Inputs.MouseDeltaX = ONgGameState->Input.MouseDeltaX;
+					data->Inputs.MouseDeltaY = ONgGameState->Input.MouseDeltaY;
+				}
+				else{
+					data->Inputs.Actions1 = PlayerList[i]->Actions1;
+					data->Inputs.Actions2 = PlayerList[i]->Actions2;
+					data->Inputs.MouseDeltaX = PlayerList[i]->MouseDeltaX;
+					data->Inputs.MouseDeltaY = PlayerList[i]->MouseDeltaY;
+				}
+				memcpy( &(PlayerList[i]->player_data), data, sizeof(player_data) );
+
+				UDPServer_SendToAll(&data_out, sizeof(player_data) + FLATLINE_HEADER);
+			}
+		}
 		if(Active_Player == 0) continue;
-		Active_Input = &(Active_Player->Input);
-		if(server_started) {
-			player_data * data;
-			flatline_packet data_out = {0};
-
-			//if( PlayerList[i]->Chr->Health == 0) PlayerList[i]->Chr->Health = PlayerList[i]->Chr->MaxHealth;
-
-			data_out.id = PLAYER_DATA;
-			data = (void*)&(data_out.data);
-			data->PlayerNum = i;
-			data->Health = PlayerList[i]->Chr->Health;
-			data->MaxHealth = PlayerList[i]->Chr->MaxHealth;
-			data->Position = PlayerList[i]->Chr->Position;
-			data->Location = PlayerList[i]->Chr->Location;
-			data->LastPosition = PlayerList[i]->Chr->LastPosition;
-			data->Facing = PlayerList[i]->Chr->Facing;
-			data->DesiredFacing = PlayerList[i]->Chr->DesiredFacing;
-			data->CosmeticFacing = PlayerList[i]->Chr->CosmeticFacing;
-
-
-			data->Position = Active_Player->PhyContext->Position;
-			
-			if( PlayerList[i]->OldClass != PlayerList[i]->Chr->ONCC || memcmp( &(PlayerList[i]->Inventory), &(PlayerList[i]->Chr->Inventory), sizeof(Inventory) ) )
-			{
-				PlayerList[i]->OldClass = PlayerList[i]->Chr->ONCC;
-				memcpy( &(PlayerList[i]->Inventory), &(PlayerList[i]->Chr->Inventory), sizeof(Inventory) );
-				PlayerList[i]->rare_sync_index++;
-
-			}
-			
-			data->rare_sync_index = PlayerList[i]->rare_sync_index;
-			
-#if 0
-			data->Frame = Active_Player->Frame;	
-			memcpy(data->Animation, TMrInstance_GetInstanceName(Active_Player->Animation), 32);
-			data->AnimationToState = Active_Player->AnimationToState;
-			data->AnimationFromState = Active_Player->AnimationFromState;
-			data->AnimationType = Active_Player->AnimationType;
-			data->NextAnimationType = Active_Player->NextAnimationType;
-			data->InterpolationCurrentFrame = Active_Player->InterpolationCurrentFrame;
-			data->InterpolationFromState = Active_Player->InterpolationFromState;
-			data->InterpolationLength = Active_Player->InterpolationLength;
-			memcpy(data->InterpolationStartRotations, Active_Player->InterpolationStartRotations, 
-				sizeof(Quaternion) * 19);
-			//			data->InterpolationStartRotations = Active_Player->InterpolationStartRotations;
-			memcpy(data->BoneMatrices, Active_Player->BoneMatrices,
-				sizeof(Quaternion) * 19);
-			data->Stitch = Active_Player->Stitch;
-			data->StitchHeight = Active_Player->StitchHeight;
-			data->StitchVelocity = Active_Player->StitchVelocity;
-			
-			data->Overlay = Active_Player->Overlay;
-			memcpy( data->OverlayRotations, Active_Player->OverlayRotations
-				,sizeof(Quaternion) * 19);
-#endif
-			if(i == 0) {
-				data->Inputs.Actions1 = ((GameState*)(ONgGameState))->Input.Current.Actions1;
-				data->Inputs.Actions2 = ((GameState*)(ONgGameState))->Input.Current.Actions2;
-				data->Inputs.MouseDeltaX = ONgGameState->Input.MouseDeltaX;
-				data->Inputs.MouseDeltaY = ONgGameState->Input.MouseDeltaY;
-			}
-			else{
-				data->Inputs.Actions1 = PlayerList[i]->Actions1;
-				data->Inputs.Actions2 = PlayerList[i]->Actions2;
-				data->Inputs.MouseDeltaX = PlayerList[i]->MouseDeltaX;
-				data->Inputs.MouseDeltaY = PlayerList[i]->MouseDeltaY;
-			}
-			memcpy( &(PlayerList[i]->player_data), data, sizeof(player_data) );
-			
-			UDPServer_SendToAll(&data_out, sizeof(player_data) + FLATLINE_HEADER);
-		}
-		
+		else Active_Input = &(Active_Player->Input);
 		if( (server_started && i !=0)  || (!server_started/* && i != client_slot*/) ) 
 		{
-			//this just made sync even worse...
-#ifdef JITTER_FIX
-			input_struct * New_Input = &PlayerList[i]->MouseDeltaX;
-			input_struct * Cache_Input = &PlayerList[i]->CacheInput;
-			Active_Input->Stop.Actions1 = ~Cache_Input->Actions1 & Active_Input->Current.Actions1;
-			Active_Input->Stop.Actions2 = ~Cache_Input->Actions2 & Active_Input->Current.Actions2;
-			Active_Input->Start.Actions1 = ~Active_Input->Current.Actions1 & Cache_Input->Actions1;
-			Active_Input->Start.Actions2 = ~Active_Input->Current.Actions2 & Cache_Input->Actions2;
-			Active_Input->Current.Actions1 = Cache_Input->Actions1;
-			Active_Input->Current.Actions2 = Cache_Input->Actions2;
-			Active_Input->Stopped.Actions1 = ~Active_Input->Current.Actions1;
-			Active_Input->Stopped.Actions2 = ~Active_Input->Current.Actions2;
-			Active_Input->MouseDeltaX = Cache_Input->MouseDeltaX;
-			Active_Input->MouseDeltaY = Cache_Input->MouseDeltaY;
-			memcpy( Cache_Input, New_Input, sizeof(input_struct));
-#else
-	
 			Active_Input->Stop.Actions1 = ~PlayerList[i]->Actions1 & Active_Input->Current.Actions1;
 			Active_Input->Stop.Actions2 = ~PlayerList[i]->Actions2 & Active_Input->Current.Actions2;
@@ -699,25 +871,143 @@
 		*/
 			
-		
-#endif
-
-#ifdef BETTER_SYNC
-			if( !server_started && PlayerList[i]->player_data.Health != 0) {
-				PlayerList[i]->Chr->Health = PlayerList[i]->player_data.Health;
-				PlayerList[i]->Chr->MaxHealth = PlayerList[i]->player_data.MaxHealth;
-				PlayerList[i]->Chr->Position = PlayerList[i]->player_data.Position;
-				PlayerList[i]->Chr->Location = PlayerList[i]->player_data.Location;
-				PlayerList[i]->Chr->LastPosition = PlayerList[i]->player_data.LastPosition;
-				PlayerList[i]->Chr->Facing = PlayerList[i]->player_data.Facing;
-				PlayerList[i]->Chr->DesiredFacing = PlayerList[i]->player_data.DesiredFacing;
-				PlayerList[i]->Chr->CosmeticFacing = PlayerList[i]->player_data.CosmeticFacing;
-				PlayerList[i]->Actions1 = PlayerList[i]->player_data.Inputs.Actions1;
-				PlayerList[i]->Actions2 = PlayerList[i]->player_data.Inputs.Actions2;
-				PlayerList[i]->MouseDeltaX = PlayerList[i]->player_data.Inputs.MouseDeltaX;
-				PlayerList[i]->MouseDeltaY = PlayerList[i]->player_data.Inputs.MouseDeltaY;
-				Active_Player->PhyContext->Position = PlayerList[i]->player_data.Position;
-			}
-#endif
-
+			if( !server_started )
+			{
+				if(PlayerList[i]->player_data.Health != 0) 
+				{
+					Character* character = PlayerList[i]->Chr;
+					void* animation;
+					void* prev_character_animation = Active_Player->Animation;
+					int error;
+					td* throw_data= &PlayerList[i]->player_data.throw_data;
+
+					if(PlayerList[i]->Chr->Flags & ONcCharacterFlag_Dead) 
+					{
+						FLrRespawn(i);
+					}
+
+					PlayerList[i]->Chr->Health = PlayerList[i]->player_data.Health;
+					PlayerList[i]->Chr->MaxHealth = PlayerList[i]->player_data.MaxHealth;
+					PlayerList[i]->Chr->Facing = PlayerList[i]->player_data.Facing;
+					PlayerList[i]->Chr->DesiredFacing = PlayerList[i]->player_data.DesiredFacing;
+					PlayerList[i]->Actions1 = PlayerList[i]->player_data.Inputs.Actions1;
+					PlayerList[i]->Actions2 = PlayerList[i]->player_data.Inputs.Actions2;
+					PlayerList[i]->MouseDeltaX = PlayerList[i]->player_data.Inputs.MouseDeltaX;
+					PlayerList[i]->MouseDeltaY = PlayerList[i]->player_data.Inputs.MouseDeltaY;
+					PlayerList[i]->Chr->Damage = PlayerList[i]->player_data.Damage;
+					PlayerList[i]->Chr->Kills = PlayerList[i]->player_data.Kills;
+					if(Active_Player->PhyContext)
+						Active_Player->PhyContext->Position = PlayerList[i]->player_data.Position;
+
+					if (!(character->Flags & ONcCharacterFlag_BeingThrown/*ONcCharacterFlag_BeingThrown*/) &&
+						(PlayerList[i]->player_data.Animation[0] != '\0'))
+					{
+						// get a pointer to the animation
+						error =
+							TMrInstance_GetDataPtr(
+							'TRAM',
+							PlayerList[i]->player_data.Animation,
+							&animation);
+						if (error == 0)
+						{
+							short	num_frames;
+							char		updateAnimation = true;
+
+							// if the character is dead, make sure this animation is appropriate for death
+							if (character->Flags & 0x00000001)
+							{
+								int curToState = TRrAnimation_GetTo(Active_Player->Animation);
+								int newToState = TRrAnimation_GetTo(animation);
+
+								// if we are currently heading towards fallen and the new animation would not
+								// then this is a better animation to run when we are dead
+								if ((ONrAnimState_IsFallen(curToState)) &&
+									(!ONrAnimState_IsFallen(newToState)))
+								{
+									updateAnimation = false;
+								}
+							}
+
+							if ((updateAnimation) && (Active_Player->Animation == animation))
+							{
+								int	oldFrame = Active_Player->Frame;
+								int	newFrame = PlayerList[i]->player_data.Frame;
+
+								if (abs(oldFrame - newFrame) < 2)
+								{
+									updateAnimation = false;
+								}
+							}
+
+							if (updateAnimation)
+							{
+								// set the characters animation
+								ONrCharacter_SetAnimationInternal(
+									character, Active_Player,
+									TRrAnimation_GetFrom(Active_Player->Animation),
+									0,
+									animation);
+								//PlayerList[i]->player_data.Animation[0] = 0;
+							}
+
+							num_frames = TRrAnimation_GetDuration(Active_Player->Animation);
+
+							if (PlayerList[i]->player_data.Frame >= num_frames)
+							{
+								Active_Player->Frame = num_frames - 1;
+							}
+							else
+							{
+								Active_Player->Frame = PlayerList[i]->player_data.Frame ;
+							}
+						}
+					}
+
+					if (throw_data->throwName[0] && PlayerList[throw_data->throwing])
+					{
+						int realIndex = PlayerList[throw_data->throwing]->Chr->Number;
+						if ((throw_data->throwing != 0xFFFF) &&
+							(realIndex != Active_Player->throwing) &&
+							(throw_data->throwFrame < 10))
+						{
+							void	*throw_animation;
+							ActiveCharacter* Target;
+
+							// get the animation
+							error =
+								TMrInstance_GetDataPtr(
+								'TRAM',
+								throw_data->throwName,
+								&throw_animation);
+							if (error != 0) return ONgGameState;
+
+							// set the throw target
+							Active_Player->ThrowTargetCharacter = &ONgGameState->CharacterStorage[realIndex];
+							Target = ONrGetActiveCharacter(Active_Player->ThrowTargetCharacter);
+							if(Target)
+							{
+								if ((Target->Animation != throw_animation) &&
+									(prev_character_animation != animation) &&
+									!(Active_Player->ThrowTargetCharacter->Flags & ONcCharacterFlag_BeingThrown))
+								{
+									// set the throw variables
+									Active_Player->targetThrow	= throw_animation;
+									Active_Player->throwing		= realIndex;
+
+									// run the throw
+									ONrCharacter_NewAnimationHook(character, Active_Player);
+									if (Active_Player->ThrowTargetCharacter)
+									{
+										Target->Frame += 2;
+										Target->thrownBy = character->Number;
+										DDrConsole_PrintF("Thrownby %i!!!!", Target->thrownBy);
+										DDrStartupMessage("Thrownby %i!!!!", Target->thrownBy);
+									}
+								}
+							}
+						}
+					}
+				}
+
+			}
 		}
 	}
@@ -725,2 +1015,25 @@
 	return ONgGameState;
 }
+
+int EventPlusArgs[EV_MAX + 1][2] = 
+{
+	{EV_RESPAWN,	1},
+	{EV_DISCONNECT, 1},
+	{EV_DOOR_OPEN,  1},
+	{EV_MAX,		0},
+};
+
+int FLrEvent_GetNumArgs( int eventIndex )
+{
+	return EventPlusArgs[1][eventIndex];
+
+}
+
+char * FLrHook_DoorOpen( DoorObject *inDoor, Character *Char)
+{
+	if(server_started)
+	{
+		FLsPublic_Event( EV_DOOR_OPEN, &inDoor->Door.ID );
+	}
+	return (inDoor->Door.class);
+}
Index: Daodan/MSVC/Flatline.h
===================================================================
--- Daodan/MSVC/Flatline.h	(revision 572)
+++ Daodan/MSVC/Flatline.h	(revision 573)
@@ -108,35 +108,24 @@
 //AC->HeadPitch
 typedef struct {
+	uint16_t				throwing;
+	uint16_t				throwFrame;
+	char					throwName[32];
+} td;
+typedef struct {
 	uint16_t PlayerNum;
 	Vector3 Position;
-	Vector3 LastPosition;
-	Vector3 Location;
 	float Facing;
 	float DesiredFacing;
-	float CosmeticFacing;
 	uint32_t Health;
 	uint32_t MaxHealth;
 	input_struct Inputs;
 	int rare_sync_index;
-	//__int16 Varient;
-#if 0
+	char Animation[32];
 	uint16_t Frame;
-	char Animation[32];
-	uint16_t AnimationToState;
-	uint16_t AnimationFromState;
-	uint16_t AnimationType;
-	uint16_t NextAnimationType;
-	uint16_t AnimationType2;
-	__int16 InterpolationCurrentFrame;
-	__int16 InterpolationFromState;
-	__int16	InterpolationLength;
-	Quaternion InterpolationStartRotations[19];
-	Vector3 StitchVelocity;
-	int		StitchHeight;
-	char	Stitch;
-	Quaternion BoneMatrices[19];
-	int Overlay;
-	Quaternion OverlayRotations[19];
-#endif
+	td throw_data;
+	int Kills;
+	int Damage;
+	int Deaths;
+
 } player_data;
 
@@ -149,4 +138,9 @@
 } rare_sync_data;
 
+typedef struct {
+	unsigned int event_index;
+	int intArray[];
+} flatline_event;
+
 //used for storing data about each player
 typedef struct {
@@ -154,5 +148,5 @@
 	char	id;
 	int		packet_index;
-	union	payload
+	union	
 	{
 		char			data[1080];
@@ -165,4 +159,5 @@
 		rare_sync_data  rare_sync_data;
 		uint16_t		sync_request;
+		flatline_event	flatline_event;
 	};
 } flatline_packet;
@@ -177,4 +172,5 @@
 
 enum {
+	NULL_PACKET, //
 	CONNECT_SEND,
 	CONNECT_REPLY,
@@ -188,7 +184,26 @@
 	RARE_SYNC_DATA,
 	RARE_SYNC_DATA_REQUEST,
-};
-
-
+	FLATLINE_EVENT,
+};
+
+enum FlatlineEvent {
+	EV_RESPAWN,
+	EV_DISCONNECT,
+	EV_DOOR_OPEN,
+	EV_MAX,
+};
+
+
+
+
+enum {
+	STATE_ALIVE,
+	STATE_DEAD,
+};
+enum {
+	PF_HOST,
+	PF_BOT,
+	PF_SCRIPTEDAI,
+};
 typedef struct {
 	int	 ip;
@@ -198,5 +213,4 @@
 	uint16_t spawnnumber;
 	uint16_t list_slot;
-
 	float MouseDeltaX;
 	float MouseDeltaY;
@@ -205,10 +219,10 @@
 	unsigned int LastInputTime;
 	input_struct CacheInput;
-
 	player_data player_data;
-
 	unsigned int rare_sync_index;
 	void* OldClass;
 	Inventory Inventory;
+	uint16_t state;
+	int flags;
 } player_info;
 
@@ -233,4 +247,6 @@
 extern bool server_started;
 extern char player_name[];
-
+void FLrRun_Scores();
+void PlayerDisconnect( int Player );
+int FLrEvent_GetNumArgs( int eventIndex );
 #endif
Index: Daodan/MSVC/Flatline_BSL.c
===================================================================
--- Daodan/MSVC/Flatline_BSL.c	(revision 572)
+++ Daodan/MSVC/Flatline_BSL.c	(revision 573)
@@ -41,4 +41,8 @@
 		NetUDPSocket_Send(client_sock, (sockaddr*)&address, (char*)&packet, 257);
 	}
+	if(server_started)
+	{
+		sprintf_s(PlayerList[0]->Chr->Name,32, args[0].value_str32);
+	}
 	return 0;
 }
@@ -118,7 +122,62 @@
 {
 	player_info * info;
-info = FLrServer_AddPlayer( 0, "Fake", 0 );
-info->Actions1 = Action_Forward;
-return 0;
+	info = FLrServer_AddPlayer( 0, "shinny", 0 , 1);
+	return 0;
+}
+
+uint16_t ONICALL kick(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret)
+{
+	PlayerDisconnect(args[0].value_int32);
+	return 0;
+}
+
+CharacterObject* spawnObject = 0;
+char BINACHARCallback(CharacterObject* inObj, char* userdata)
+{
+	if(strcmp(userdata, inObj->OSD.Name))
+	{
+		return 1;
+	}
+	spawnObject = inObj;
+	return 0;
+}
+uint16_t ONICALL FLrSpawnHack(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret)
+{
+	flatline_packet new_char = {0};
+	int i;
+	if(client_connected) return 0;
+	AI2iScript_Spawn(callinfo, numargs, args, dontuse1, dontuse2, ret);
+	if(!server_started) return 0;
+	for(i = 0; i < 64; i++)
+	{
+		if(!strcmp(ONgGameState->CharacterStorage[i].Name, args[0].value_str32))
+		{
+			//DDrConsole_PrintF("%s spawned, slot %i", args[0].value_str32, i);
+			int		playerlist_slot = FLr_FindEmptyListSlot();
+			int player_slot = i;
+			new_char.new_player.Playernumber = playerlist_slot; 
+			new_char.id = NEW_PLAYER;
+			OBJrObjectType_EnumerateObjects('CHAR',BINACHARCallback, (int)args[0].value_str32);
+		//	while(!spawnObject);
+			if(spawnObject)
+			{
+				memcpy(&new_char.new_player.Character, spawnObject, sizeof(CharacterObject) );
+			}
+			else return 1;
+			//new_char.new_player.Character;
+			PlayerList[playerlist_slot] = Players+player_slot;
+			PlayerList[playerlist_slot]->spawnnumber = player_slot;
+			PlayerList[playerlist_slot]->Chr = &((Character *)(((GameState * )(ONgGameState))->CharacterStorage))[player_slot];
+			//			PlayerList[playerlist_slot]->Chr->Flags = chr_dontaim | chr_unkillable; //&= 0xFFBFFFFF; //WTF
+			//			if(!is_bot) PlayerList[playerlist_slot]->Chr->Flags &= 0xFFBFFFFF; //WTF
+			//			sprintf(PlayerList[playerlist_slot]->Chr->Name, "%.31s", name);		
+			UDPServer_SendToAll( (char*)&new_char, sizeof(new_player) + FLATLINE_HEADER );
+			PlayerList[playerlist_slot]->flags = PF_SCRIPTEDAI;
+			PlayerList[playerlist_slot]->list_slot = playerlist_slot;
+			return 0;
+		}
+	}
+	
+		return 0;
 }
 
@@ -140,12 +199,14 @@
 	
 	DDrPatch_MakeCall(0x004FA88B, FLrInput_Update_Keys);
-	
+	FLrInput_Update_Keys();
 	SLrGlobalVariable_Register_Int32("skip", "skips", &(((GameState*)ONgGameState)->field_40) );
 	SLrScript_Command_Register_ReturnType("connect","Connects to a server", "ip:string", sl_void, connect_to_server);
 	SLrScript_Command_Register_Void("host","Starts a server", "", start_server);
 	SLrScript_Command_Register_Void("msg","Sends a message", "", send_message);
-	SLrScript_Command_Register_ReturnType("name","changes your name", "name:str", sl_void, change_name);
+	SLrScript_Command_Register_ReturnType("name","changes your name", "name:string", sl_void, change_name);
 	SLrScript_Command_Register_Void("status","shows the connection status", "", status);
 	SLrGlobalVariable_Register_String("country", "Your Multiplayer country", player_name);
-	SLrScript_Command_Register_ReturnType("addfakeclient","adds a fake client", "", sl_void, addfake);
-}
+	SLrScript_Command_Register_ReturnType("addbot","adds a fake client", "", sl_void, addfake);
+	SLrScript_Command_Register_Void("kick", "Kicks a client from the server", "clientnum:int", kick);
+	//SLrScript_Command_Register_ReturnType("ai2_spawn","creates and starts an AI from a character object","ai_name:string [force_spawn:string{\"force\"} | ]", sl_void, spawnAI);
+}
Index: Daodan/MSVC/Flatline_BSL.h
===================================================================
--- Daodan/MSVC/Flatline_BSL.h	(revision 572)
+++ Daodan/MSVC/Flatline_BSL.h	(revision 573)
@@ -3,4 +3,4 @@
 
 void SLrFlatline_Initialize();
-
+uint16_t ONICALL FLrSpawnHack(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret);
 #endif
Index: Daodan/MSVC/Flatline_Server.c
===================================================================
--- Daodan/MSVC/Flatline_Server.c	(revision 572)
+++ Daodan/MSVC/Flatline_Server.c	(revision 573)
@@ -5,5 +5,5 @@
 uint16_t max_connections = MAX_CONNECTIONS;
 
-player_info* FLrServer_AddPlayer(int ip, char* name, bool is_server) {
+player_info* FLrServer_AddPlayer(int ip, char* name, bool is_server, bool is_bot) {
 	flatline_packet new_char = {0};
 	CharacterObject* Char;
@@ -38,4 +38,5 @@
 		//memset( new_char, 0, sizeof(new_char);
 		//new_char = {0};
+		new_char.new_player.Playernumber = playerlist_slot; 
 		Char = &new_char.new_player.Character;
 		memset(Char, 0, sizeof(CharacterObject));
@@ -44,6 +45,18 @@
 		sprintf(Char->OSD.Name,"%s",name);
 		sprintf(Char->OSD.Class, "%s", "konoko_generic");
-		
-		
+		if(is_bot) {
+			Char->OSD.MeleeID = 22;
+			Char->OSD.JobID = 1;
+			Char->OSD.MinimalAlertLevel = 4;
+			Char->OSD.InvestigatingAlertLevel = 4;
+			Char->OSD.InitialAlertLevel = 4;
+			Char->OSD.StartJobAlertLevel = 4;
+		}
+		else if( !is_server )
+		{
+			Char->Header.Position.X = PlayerList[0]->Chr->Position.X;
+			Char->Header.Position.Y = PlayerList[0]->Chr->Position.Y;
+			Char->Header.Position.Z = PlayerList[0]->Chr->Position.Z;
+		}
 		
 		//TMrInstance_GetDataPtr('ONCC', "striker_easy_1", PlayerList[playerlist_slot]->Chr->ONCC);
@@ -54,5 +67,5 @@
 			ONrGameState_NewCharacter(Char, NULL, NULL, &(player_slot));
 			//move this to a set up characters function...
-			ONgGameState->CharacterStorage[player_slot].field_1E8 = 0;
+			if(!is_bot) ONgGameState->CharacterStorage[player_slot].charType = 0;
 
 			PlayerList[playerlist_slot] = Players+player_slot;
@@ -60,5 +73,5 @@
 			PlayerList[playerlist_slot]->Chr = &((Character *)(((GameState * )(ONgGameState))->CharacterStorage))[player_slot];
 //			PlayerList[playerlist_slot]->Chr->Flags = chr_dontaim | chr_unkillable; //&= 0xFFBFFFFF; //WTF
-			PlayerList[playerlist_slot]->Chr->Flags &= 0xFFBFFFFF; //WTF
+			if(!is_bot) PlayerList[playerlist_slot]->Chr->Flags &= 0xFFBFFFFF; //WTF
 			sprintf(PlayerList[playerlist_slot]->Chr->Name, "%.31s", name);		
 			UDPServer_SendToAll( (char*)&new_char, sizeof(new_player) + FLATLINE_HEADER );
@@ -82,5 +95,5 @@
 
 void FLrServer_Initialize(){
-	FLrServer_AddPlayer(inet_addr("127.0.0.1"), "host", 1);
+	FLrServer_AddPlayer(inet_addr("127.0.0.1"), "host", 1, 0);
 }
 
@@ -107,2 +120,13 @@
 	return players;
 }
+
+void FLsPublic_Event( unsigned int eventIndex, int * args )
+{
+	int numArgs = FLrEvent_GetNumArgs( eventIndex );
+	flatline_packet eventPacket = {0};
+	eventPacket.id = FLATLINE_EVENT;
+	eventPacket.flatline_event.event_index = eventIndex;
+	memcpy( eventPacket.flatline_event.intArray, args, sizeof(int) * numArgs );
+	UDPServer_SendToAll( &eventPacket, sizeof(int) * (numArgs + 1) + FLATLINE_HEADER );
+}
+
Index: Daodan/MSVC/Flatline_Server.h
===================================================================
--- Daodan/MSVC/Flatline_Server.h	(revision 572)
+++ Daodan/MSVC/Flatline_Server.h	(revision 573)
@@ -8,5 +8,7 @@
 
 extern uint16_t max_connections;
-player_info* FLrServer_AddPlayer(int ip, char* name, bool is_server);
+player_info* FLrServer_AddPlayer(int ip, char* name, bool is_server, bool is_bot);
+void FLsPublic_Event( unsigned int eventIndex, int * args);
+
 void FLrServer_Initialize();
 #endif
Index: Daodan/MSVC/Oni_Character.h
===================================================================
--- Daodan/MSVC/Oni_Character.h	(revision 572)
+++ Daodan/MSVC/Oni_Character.h	(revision 573)
@@ -38,5 +38,53 @@
 //We need a Oni_Structs #include file.
 
+typedef enum {
+	ONcCharacterFlag_Dead_1_Animating		=	0x00000001,	// health is 0
+	ONcCharacterFlag_Dead					=	ONcCharacterFlag_Dead_1_Animating,
+	ONcCharacterFlag_Dead_2_Moving			=	0x00000002,	// no longer animating
+	ONcCharacterFlag_Dead_3_Cosmetic		=	0x00000004,	// no longer moving
+	ONcCharacterFlag_Dead_4_Gone			=	0x00000008,	// dead except but still drawn
 
+	ONcCharacterFlag_HastyAnim				=	0x00000010,	// do this queued animation ASAP
+	ONcCharacterFlag_Unkillable				=	0x00000020,	// the character cannot be killed, only defeated
+	ONcCharacterFlag_InfiniteAmmo			=	0x00000040,	// the character always has infinite ammo
+	ONcCharacterFlag_PleaseBlock			=	0x00000080,	// set if the character should block, cleared once block begins
+	
+	ONcCharacterFlag_Unstoppable			=	0x00000100,	// this character cannot be knocked down, staggered, stunned, etc
+	ONcCharacterFlag_ScriptControl			=	0x00000200,	// set if the character is completely under script control
+	ONcCharacterFlag_DeathLock				=	0x00000400,	// this character should never die all the way
+	ONcCharacterFlag_WasUpdated				=	0x00000800,	// this character's animation was changed
+		
+	ONcCharacterFlag_BeingThrown			=	0x00001000,	// this character is being thrown
+	ONcCharacterFlag_DontUseGunVarient		=	0x00002000,	// this character should not use a weapon varient
+	ONcCharacterFlag_Draw					=	0x00004000,	// DoFrame has been executed for this character
+	ONcCharacterFlag_InUse					=	0x00008000,	// this character is active and in use
+
+	ONcCharacterFlag_DontUseFightVarient	=	0x00010000,
+	ONcCharacterFlag_NoCollision			=	0x00020000,	// no collision for this character
+	ONcCharacterFlag_Teleporting			=	0x00040000,	// this character is teleporting and does not accept collision
+	ONcCharacterFlag_NoCorpse				=	0x00080000,	// no corpse for this character
+
+	ONcCharacterFlag_ActiveLock				=	0x00100000,	// the character is locked active
+	ONcCharacterFlag_ChrAnimate				=	0x00200000,	// the character is currently runing a chr_animate command
+	ONcCharacterFlag_AIMovement				=	0x00400000,	// the character is using AI movement
+	ONcCharacterFlag_NeutralUninterruptable	=	0x00800000,	// running an uninterruptable neutral interaction
+
+	ONcCharacterFlag_NoShadow				=	0x01000000,	// 
+	ONcCharacterFlag_Invincible				=	0x02000000,	// character is invincible
+	ONcCharacterFlag_NoAutoDrop				=	0x04000000,	// character should not automatically drop items when killed (invisibility, shield, LSI)
+	ONcCharacterFlag_RestrictedMovement		=	0x08000000,	// character cannot move fast (used for player holding barabbas' gun)
+
+	ONcCharacterFlag_Boss					=	0x10000000,	// character is a boss (used for final muro group fight)
+	ONcCharacterFlag_FinalFlash				=	0x20000000,	// 'final flash' has been played for this character's death
+	ONcCharacterFlag_BossShield				=	0x40000000, // this character has the boss shield
+	ONcCharacterFlag_WeaponImmune			=	0x80000000	// this character is immune to weapon damage
+
+} ONtCharacterFlags;
+
+typedef enum {
+	ONcCharacterFlag2_WeaponEmpty			=	0x00000001, // character's weapon is empty, punch instead
+	ONcCharacterFlag2_UltraMode				=	0x00000002
+
+} ONtCharacterFlags2;
 
 #endif
Index: Daodan/MSVC/Oni_GameState.h
===================================================================
--- Daodan/MSVC/Oni_GameState.h	(revision 572)
+++ Daodan/MSVC/Oni_GameState.h	(revision 573)
@@ -361,4 +361,32 @@
 } OSD_Header;
 
+typedef struct 
+{
+	short ID;	
+	short flags;
+
+	short keys;
+	short open_time;
+
+	float activate_radius_squared;
+
+	short state;	
+	short blocked_frames;						
+
+	short open_time_left;						
+	short some_timer;
+
+	Vector3 center_offset;						
+	char name[63];
+	char pad;
+	void *class;
+} DoorOSD;
+
+typedef struct {
+	OSD_Header OSD;
+	DoorOSD Door; //incomplete
+} DoorObject;
+
+
 typedef struct {
 	int32_t Flags;
@@ -515,5 +543,6 @@
 typedef struct { //Inventory
 	Weapon* Weapons[3];
-	int16_t field_1A0; //10 bucks says this is the current weapon
+	int8_t z_forced_holster;
+	int8_t z_forced_holster_is_magic;
 	int16_t AmmoUsed;				//Ammo given for the char to use
 	int16_t HypoUsed;				//Hypo given for the char to use
@@ -522,13 +551,13 @@
 	int16_t HypoDropped;			//Hypo the char drops
 	int16_t CellsDropped;			//Cells the char drops
-	int16_t field_1A;	//who knows? InverseHypoRegenRate?
-	int16_t field_1C;	
-	int16_t field_1E;
+	int16_t hypoRemaining;	//who knows? InverseHypoRegenRate?
+	int16_t hypoTimer;	
+	int16_t pad;
 	char hasLSI;
 	char field_1B5;
-	int16_t	field_1B6;
+	int16_t	shieldDisplayAmount;
 	int16_t ShieldUsed;				//Bullet shield given for the char to use
 	int16_t CloakUsed;				//Phase Cloak given for the char to use
-	int32_t field_28;			//probably bullet shield dropped
+	int32_t numInvisibleFrames;			//probably bullet shield dropped
 	int32_t DoorKeys;		//Lol. We can use this later for other sorts of items.
 } Inventory;
@@ -565,294 +594,4 @@
   int NotifyKnowledgeCallback;
 } AI2KnowledgeState;
-
-/*  388 */ typedef struct //activecharacter
-{
-  __int16 Number;
-  __int16 field_2;
-  PhyContext* PhyContext;
-  SphereTreeNode SphereTree;
-  SphereTreeNode SphereTree3[4];
-  SphereTreeNode SphereTree2[2];
-  __int16 field_B0;
-  __int16 field_B2;
-  __int16 field_B4;
-  char field_B6;
-  char gap_b7[1];
-  Vector3 field_B8;
-  Vector3 AccelerateWith;
-  int field_D0;
-  Vector3 field_D4;
-  __int16 field_E0;
-  char gap_e2[2];
-  int field_E4;
-  int field_E8;
-  int field_EC;
-  int field_F0;
-  __int16 field_F4;
-  __int16 IsInAir;
-  Vector3 FallingVelocity;
-  Vector3 JumpVelocity;
-  char field_110;
-  char field_111;
-  __int16 field_112;
-  __int16 field_114;
-  char gap_116[2];
-  int field_118;
-  int field_11C;
-  int field_120;
-  int field_124;
-  int field_128;
-  int field_12C;
-  BoundingSphere BoundingSphere;
-  Vector3 field_140;
-  Vector3 field_14C;
-  int field_158;
-  int field_15C;
-  Vector3 Location;
-  char gap_16c[24];
-  int AkiraNode;
-  int GraphNode;
-  int PelvisHeight;
-  int Movement_StatePtr;
-  int ActiveWeapon;
-  int field_198;
-  int InventoryWeapon;
-  char gap_1a0[2];
-  __int16 RedAmmoClipCount;
-  __int16 HypoCount;
-  __int16 GreenAmmoClipCount;
-  __int16 RedAmmoClipDropCount;
-  __int16 HypoDropCount;
-  __int16 GreenAmmoClipDropCount;
-  __int16 field_1AE;
-  __int16 InverseHypoRegenerationRate;
-  char DropShield;
-  char DropPhaseCloack;
-  char field_1B4;
-  char gap_1b5[1];
-  __int16 field_1B6;
-  __int16 Shield;
-  __int16 PhaseCloacking;
-  int field_1BC;
-  char gap_1c0[4];
-  __int16 field_1C4;
-  char gap_1c6[10];
-  int field_1D0;
-  int field_1D4;
-  char gap_1d8[4];
-  int field_1DC;
-  int NotIdleStartTime;
-  int TimeToIdle;
-  int field_1E8;
-  char gap_1ec[4];
-  int field_1F0;
-  char gap_1f4[2048];
-  int field_9F4;
-  char gap_9f8[36];
-  int field_A1C;
-  char gap_a20[3020];
-  int field_15EC;
-  char gap_15f0[60];
-  int field_162C;
-  int field_1630;
-  int field_1634;
-  int field_1638;
-  int field_163C;
-  char gap_1640[8];
-  BoundingBox BoundingBox;
-  int field_1660;
-  char gap_1664[4];
-  int ShieldPower;
-  char gap_166c[4];
-  int NumberOfKills;
-  int InflictedDamage;
-  int field_1678;
-  int field_167C;
-  char gap_1680[8];
-  __int16 field_1688;
-  __int16 field_168A;
-  int field_168C;
-  int field_1690;
-  char field_1694;
-  char field_1695;
-  __int16 field_1696;
-  int field_1698;
-  int field_169C;
-  char gap_16a0[2];
-  int field_16A2;
-  char gap_16a6[994];
-  char field_1A88;
-  char field_1A89;
-  char field_1A8A;
-  char field_1A8B;
-  Vector3 Executor_AimingDirection;
-  int field_1A98;
-  int field_1A9C;
-  int Executor_ActualMovementMode;
-  int field_1AA4;
-  int field_1AA8;
-  int field_1AAC;
-  char Executor_HasFacingOverride;
-  char gap_1ab1[3];
-  int Executor_AimingSpeed;
-  char field_1AB8;
-  char Executor_HasMoveOverride;
-  char gap_1aba[6];
-  int field_1AC0;
-  int field_1AC4;
-  int Executor_FacingOverride;
-  char Executor_HasAttackOverride;
-  char gap_1acd[1];
-  __int16 field_1ACE;
-  __int16 field_1AD0;
-  char gap_1ad2[6];
-  int field_1AD8;
-  int field_1ADC;
-  int field_1AE0;
-  int field_1AE4;
-  char Executor_HasThrowOverride;
-  char gap_1ae9[3];
-  int field_1AEC;
-  int field_1AF0;
-  int field_1AF4;
-  int Animation;
-  __int16 AnimationToState;
-  __int16 AnimationFromState;
-  __int16 AnimationType;
-  __int16 NextAnimationType;
-  __int16 field_1B04;
-  __int16 field_1B06;
-  char Stitch;
-  char gap_1b09[3];
-  int StitchHeight;
-  __int16 InterpolationFromState;
-  char gap_1b12[2];
-  Vector3 StitchVelocity;
-  __int16 InterpolationCurrentFrame;
-  __int16 InterpolationLength;
-  Quaternion InterpolationStartRotations[19];
-  char gap_1c54[4];
-  int field_1C58;
-  int field_1C5C;
-  int field_1C60;
-  int Overlay;
-  __int16 field_1C68;
-  __int16 field_1C6A;
-  int field_1C6C;
-  int field_1C70;
-  __int16 field_1C74;
-  char gap_1c76[2];
-  int field_1C78;
-  char gap_1c7c[12];
-  __int16 Frame;
-  __int16 SoftPause;
-  __int16 HardPause;
-  __int16 field_1C8E;
-  int field_1C90;
-  __int16 field_1C94;
-  __int16 field_1C96;
-  __int16 Dizzy;
-  __int16 field_1C9A;
-  int field_1C9C;
-  __int16 AnimationVarient;
-  __int16 TimeToPeace;
-  char NumAnimationAttachedParticles;
-  char gap_1ca5[1];
-  __int16 field_1CA6;
-  AttachedParticle AnimationAttachedParticles[16];
-  int TRAMParticles;
-  char FixedParticlesAttached;
-  char FixedParticlesStarted;
-  __int16 NumFixedParticles;
-  AttachedParticle FixedParticles[16];
-  __int16 CurrentAnimationType;
-  char gap_1eb2[2];
-  int field_1EB4;
-  char field_1EB8;
-  char gap_1eb9[33];
-  __int16 field_1EDA;
-  int field_1EDC;
-  char gap_1ee0[4];
-  int field_1EE4;
-  int field_1EE8;
-  int field_1EEC;
-  Quaternion Rotations[19];
-  Quaternion OverlayRotations[19];
-  int field_2150;
-  char gap_2154[4];
-  GameInput Input;
-  int PrevActions1;
-  int PrevActions2;
-  int SprintTimer;
-  char field_2194;
-  char field_2195;
-  char gap_2196[2];
-  Vector3 field_2198;
-  int field_21A4;
-  int field_21A8;
-  int field_21AC;
-  Vector3 field_21B0;
-  int HeadFacing;
-  int HeadPitch;
-  int field_21C4;
-  int field_21C8;
-  int field_21CC;
-  int field_21D0;
-  char field_21D4;
-  char gap_21d5[3];
-  int field_21D8;
-  char field_21DC;
-  char field_21DD;
-  char field_21DE;
-  char field_21DF;
-  char field_21E0;
-  char HasAlternateTrigger;
-  char field_21E2;
-  char ReleaseTrigger;
-  char ReleaseAlternateTrigger;
-  char TurningLeft;
-  char TurningRight;
-  char gap_21e7[1];
-  int field_21E8;
-  int field_21EC;
-  __int16 field_21F0;
-  char gap_21f2[2];
-  PlayingFilm PlayingFilm;
-  char gap_2218[4];
-  int field_221C;
-  char gap_2220[8];
-  int field_2228;
-  char gap_222c[76];
-  Matrix4x3 BoneMatrices[19];
-  Matrix4x3 WeaponMatrix;
-  char gap_2638[432];
-  int field_27E8;
-  char gap_27ec[4];
-  __int16 field_27F0;
-  __int16 field_27F2;
-  int field_27F4;
-  int field_27F8;
-  __int16 ShadowIndex;
-  char field_27FE;
-  char gap_27ff[1];
-  char field_2800;
-  char field_2801;
-  char ShieldParts[19];
-  char field_2815;
-  char gap_2816[2];
-  int field_2818;
-  __int16 field_281C;
-  char gap_281e[2];
-  int field_2820;
-  int field_2824;
-  int field_2828;
-  int field_282C;
-  __int16 field_2830;
-  __int16 field_2832;
-  char gap_2834[1];
-  char field_2835;
-  char field_2836;
-  char field_2837;
-} ActiveCharacter;
 
 typedef struct 
@@ -1071,5 +810,5 @@
   int field_1E0;
   int IdleDelay;
-  int field_1E8;
+  int charType;
   char gap_1ec[4];
   int CombatFlags;
@@ -1290,4 +1029,296 @@
 ;
 
+/*  388 */ typedef struct //activecharacter
+{
+  __int16 Number;
+  __int16 field_2;
+  PhyContext* PhyContext;
+  SphereTreeNode SphereTree;
+  SphereTreeNode SphereTree3[4];
+  SphereTreeNode SphereTree2[2];
+  __int16 field_B0;
+  __int16 field_B2;
+  __int16 field_B4;
+  char field_B6;
+  char gap_b7[1];
+  Vector3 field_B8;
+  Vector3 AccelerateWith;
+  int field_D0;
+  Vector3 field_D4;
+  __int16 field_E0;
+  char gap_e2[2];
+  int field_E4;
+  int field_E8;
+  int field_EC;
+  int field_F0;
+  __int16 field_F4;
+  __int16 IsInAir;
+  Vector3 FallingVelocity;
+  Vector3 JumpVelocity;
+  char field_110;
+  char field_111;
+  __int16 field_112;
+  __int16 field_114;
+  char gap_116[2];
+  int field_118;
+  int field_11C;
+  int field_120;
+  int field_124;
+  int field_128;
+  int field_12C;
+  BoundingSphere BoundingSphere;
+  Vector3 field_140;
+  Vector3 field_14C;
+  int field_158;
+  int field_15C;
+  Vector3 Location;
+  char gap_16c[24];
+  int AkiraNode;
+  int GraphNode;
+  int PelvisHeight;
+  int Movement_StatePtr;
+  int ActiveWeapon;
+  int field_198;
+  int InventoryWeapon;
+  char gap_1a0[2];
+  __int16 RedAmmoClipCount;
+  __int16 HypoCount;
+  __int16 GreenAmmoClipCount;
+  __int16 RedAmmoClipDropCount;
+  __int16 HypoDropCount;
+  __int16 GreenAmmoClipDropCount;
+  __int16 field_1AE;
+  __int16 InverseHypoRegenerationRate;
+  char DropShield;
+  char DropPhaseCloack;
+  char field_1B4;
+  char gap_1b5[1];
+  __int16 field_1B6;
+  __int16 Shield;
+  __int16 PhaseCloacking;
+  int field_1BC;
+  char gap_1c0[4];
+  __int16 field_1C4;
+  char gap_1c6[10];
+  int field_1D0;
+  int field_1D4;
+  char gap_1d8[4];
+  int field_1DC;
+  int NotIdleStartTime;
+  int TimeToIdle;
+  int field_1E8;
+  char gap_1ec[4];
+  int field_1F0;
+  char gap_1f4[2048];
+  int field_9F4;
+  char gap_9f8[36];
+  int field_A1C;
+  char gap_a20[3020];
+  int field_15EC;
+  char gap_15f0[60];
+  int field_162C;
+  int field_1630;
+  int field_1634;
+  int field_1638;
+  int field_163C;
+  char gap_1640[8];
+  BoundingBox BoundingBox;
+  int field_1660;
+  char gap_1664[4];
+  int ShieldPower;
+  char gap_166c[4];
+  int NumberOfKills;
+  int InflictedDamage;
+  int field_1678;
+  int field_167C;
+  char gap_1680[8];
+  __int16 field_1688;
+  __int16 field_168A;
+  int field_168C;
+  int field_1690;
+  char field_1694;
+  char field_1695;
+  __int16 field_1696;
+  int field_1698;
+  int field_169C;
+  char gap_16a0[2];
+  int field_16A2;
+  char gap_16a6[994];
+  char field_1A88;
+  char field_1A89;
+  char field_1A8A;
+  char field_1A8B;
+  Vector3 Executor_AimingDirection;
+  int field_1A98;
+  int field_1A9C;
+  int Executor_ActualMovementMode;
+  int field_1AA4;
+  int field_1AA8;
+  int field_1AAC;
+  char Executor_HasFacingOverride;
+  char gap_1ab1[3];
+  int Executor_AimingSpeed;
+  char field_1AB8;
+  char Executor_HasMoveOverride;
+  char gap_1aba[6];
+  int field_1AC0;
+  int field_1AC4;
+  int Executor_FacingOverride;
+  char Executor_HasAttackOverride;
+  char gap_1acd[1];
+  __int16 field_1ACE;
+  __int16 field_1AD0;
+  char gap_1ad2[6];
+  int field_1AD8;
+  int field_1ADC;
+  int field_1AE0;
+  int field_1AE4;
+  char Executor_HasThrowOverride;
+  char gap_1ae9[3];
+  int field_1AEC;
+  int field_1AF0;
+  int field_1AF4;
+  void* Animation;
+  __int16 AnimationToState;
+  __int16 AnimationFromState;
+  __int16 AnimationType;
+  __int16 NextAnimationType;
+  __int16 field_1B04;
+  __int16 field_1B06;
+  char Stitch;
+  char gap_1b09[3];
+  int StitchHeight;
+  __int16 InterpolationFromState;
+  char gap_1b12[2];
+  Vector3 StitchVelocity;
+  __int16 InterpolationCurrentFrame;
+  __int16 InterpolationLength;
+  Quaternion InterpolationStartRotations[19];
+  char gap_1c54[4];
+  int field_1C58;
+  int field_1C5C;
+  int field_1C60;
+  int Overlay;
+  __int16 field_1C68;
+  __int16 field_1C6A;
+  int field_1C6C;
+  int field_1C70;
+  __int16 field_1C74;
+  char gap_1c76[2];
+  int field_1C78;
+  char gap_1c7c[12];
+  __int16 Frame;
+  __int16 SoftPause;
+  __int16 HardPause;
+  __int16 field_1C8E;
+  int field_1C90;
+  __int16 field_1C94;
+  __int16 field_1C96;
+  __int16 Dizzy;
+  __int16 field_1C9A;
+  int field_1C9C;
+  __int16 AnimationVarient;
+  __int16 TimeToPeace;
+  char NumAnimationAttachedParticles;
+  char gap_1ca5[1];
+  __int16 field_1CA6;
+  AttachedParticle AnimationAttachedParticles[16];
+  int TRAMParticles;
+  char FixedParticlesAttached;
+  char FixedParticlesStarted;
+  __int16 NumFixedParticles;
+  AttachedParticle FixedParticles[16];
+  __int16 CurrentAnimationType;
+  char gap_1eb2[2];
+  int field_1EB4;
+  char field_1EB8;
+  char gap_1eb9[30];
+  char field_1ED7;
+  __int16 throwing;
+  __int16 thrownBy;
+  Character* ThrowTargetCharacter;
+  int targetThrow; //animation
+  int field_1EE4;
+  int field_1EE8;
+  int field_1EEC;
+  Quaternion Rotations[19];
+  Quaternion OverlayRotations[19];
+  int field_2150;
+  char gap_2154[4];
+  GameInput Input;
+  int PrevActions1;
+  int PrevActions2;
+  int SprintTimer;
+  char field_2194;
+  char field_2195;
+  char gap_2196[2];
+  Vector3 field_2198;
+  int field_21A4;
+  int field_21A8;
+  int field_21AC;
+  Vector3 field_21B0;
+  int HeadFacing;
+  int HeadPitch;
+  int field_21C4;
+  int field_21C8;
+  int field_21CC;
+  int field_21D0;
+  char field_21D4;
+  char gap_21d5[3];
+  int field_21D8;
+  char field_21DC;
+  char field_21DD;
+  char field_21DE;
+  char field_21DF;
+  char field_21E0;
+  char HasAlternateTrigger;
+  char field_21E2;
+  char ReleaseTrigger;
+  char ReleaseAlternateTrigger;
+  char TurningLeft;
+  char TurningRight;
+  char gap_21e7[1];
+  int field_21E8;
+  int field_21EC;
+  __int16 field_21F0;
+  char gap_21f2[2];
+  PlayingFilm PlayingFilm;
+  char gap_2218[4];
+  int field_221C;
+  char gap_2220[8];
+  int field_2228;
+  char gap_222c[76];
+  Matrix4x3 BoneMatrices[19];
+  Matrix4x3 WeaponMatrix;
+  char gap_2638[432];
+  int field_27E8;
+  char gap_27ec[4];
+  __int16 field_27F0;
+  __int16 field_27F2;
+  int field_27F4;
+  int field_27F8;
+  __int16 ShadowIndex;
+  char field_27FE;
+  char gap_27ff[1];
+  char field_2800;
+  char field_2801;
+  char ShieldParts[19];
+  char field_2815;
+  char gap_2816[2];
+  int field_2818;
+  __int16 field_281C;
+  char gap_281e[2];
+  int field_2820;
+  int field_2824;
+  int field_2828;
+  int field_282C;
+  __int16 field_2830;
+  __int16 field_2832;
+  char gap_2834[1];
+  char field_2835;
+  char field_2836;
+  char field_2837;
+} ActiveCharacter;
+
 typedef struct
 {
@@ -1397,2 +1428,35 @@
 } GameState;
 #endif
+
+typedef struct 
+{
+	int			priority;
+	int timer;						// amount of time to display the text
+	char				prefix[10];	// prefix for the line
+	char				text[502];		// text on the line
+	const char			*identifier;
+	int			text_color;
+	int			text_shadow;
+} COtTextEntry;
+
+typedef struct 
+{
+	void		*font_family;
+	void *text_context;				// text context to do the drawing
+	short			formatting;
+	short			font_size;
+	char				scale_font;
+	char				bottom_justify;
+	char				display_completion;
+	char				fade_over_bounds;
+	char				use_formatting_commands;
+
+	short				bounds[4];
+	short			num_text_entries;
+	short max_text_entries;
+	char pad[3];
+	COtTextEntry		*text_entries;				// an array (num_text_entries long) of COtTextEntry
+		int blah;
+		int blah2;
+			int blah3;
+} COtTextArea;
Index: Daodan/MSVC/Oni_Symbols.c
===================================================================
--- Daodan/MSVC/Oni_Symbols.c	(revision 572)
+++ Daodan/MSVC/Oni_Symbols.c	(revision 573)
@@ -126,4 +126,6 @@
 DefFunc( oni_fprintf                            , 0x0051ebbf );
 
+
+DefFunc( AI2iScript_Spawn						, 0x004B4780 );
 DefFunc( AUrMessageBox                          , 0x004378c0 );
 
@@ -131,9 +133,16 @@
 DefFunc( COrTextArea_Print						, 0x00431340 );
 DefFunc( COrConsole_StatusLine_Display			, 0x00431E70 );
+
+DefFunc( OBJrObjectType_EnumerateObjects		, 0x004D0080 );
+//DefFunc( OBJiObjectGroup_GetNumObjects			, 
+
 DefFunc( ONiGameState_FindAutoPromptMessage		, 0x004FDBE0 );
 DefFunc( ONiMain								, 0x004d3280 );
 
+DefFunc( ONrCharacter_NewAnimationHook			, 0x004E97A0 );
 DefFunc( ONrCheater                             , 0x004f5c30 );
+DefFunc( ONrCorpse_Create						, 0x004EF340 );
 DefFunc( ONrGameState_NewCharacter				, 0x004dac50 );
+DefFunc( ONrGameState_DeleteCharacter			, 0x004DC480 );
 DefFunc( ONrGetActiveCharacter					, 0x004f1180 );
 DefFunc( ONrPersist_GetGamma                    , 0x0050f450 );
@@ -141,12 +150,14 @@
 DefFunc( ONrPlatform_Initialize					, 0x0050f670 );
 DefFunc( ONrPlatform_WindowProc					, 0x0050f7a0 );
+DefFunc( ONrCharacter_SetHitPoints				, 0x004EB220 );
+
 DefFunc( iSetCharacterClass						, 0x004D99D0 );
 
 
-DefFunc( SLrGlobalVariable_Register_Int32		,	0x0477e30);
-DefFunc( SLrGlobalVariable_Register_Float		,	0x0477ec0);
-DefFunc( SLrGlobalVariable_Register_String		,	0x0477fe0);
-DefFunc( SLrScript_Command_Register_ReturnType	,	0x0477b20);
-DefFunc( SLrScript_Command_Register_Void		,   0x0477b40);
+DefFunc( SLrGlobalVariable_Register_Int32		, 0x00477e30 );
+DefFunc( SLrGlobalVariable_Register_Float		, 0x00477ec0 );
+DefFunc( SLrGlobalVariable_Register_String		, 0x00477fe0 );
+DefFunc( SLrScript_Command_Register_ReturnType	, 0x00477b20 );
+DefFunc( SLrScript_Command_Register_Void		, 0x00477b40 );
 
 DefFunc( SSrMessage_Find						, 0x0047F550 );
@@ -155,7 +166,10 @@
 DefFunc( TMrInstance_GetDataPtr					, 0x004232E0 );
 
-DefFunc( TSrContext_DrawText                   , 0x0042DF00 );
-DefFunc( TSrContext_New                        , 0x0042EA30 );
-
+DefFunc( TSrContext_DrawText					, 0x0042DF00 );
+DefFunc( TSrContext_New							, 0x0042EA30 );
+DefFunc( TSrContext_SetShade					, 0x0042EE50 );
+DefFunc( TRrAnimation_GetDuration				, 0x00428740 );
+DefFunc( TRrAnimation_GetFrom					, 0x00428720 );
+DefFunc( TRrAnimation_GetTo						, 0x00428730 );
 
 DefFunc( UUrMachineTime_High					, 0x04026480 );
@@ -165,4 +179,6 @@
 DefFunc( UUrPlatform_Terminate					, 0x04026310 );
 DefFunc( UUrStartupMessage                      , 0x00424860 );
+DefFunc( OBJrDoor_Open							, 0x004C26C0 );
+DefFunc( OBJrDoor_ForceOpen						, 0x004C1EE0 );
 
 #define DefVar(type, name, address) type* _##name = (type*)address
Index: Daodan/MSVC/Oni_Symbols.h
===================================================================
--- Daodan/MSVC/Oni_Symbols.h	(revision 572)
+++ Daodan/MSVC/Oni_Symbols.h	(revision 573)
@@ -58,4 +58,6 @@
 #define COgDefaultTextShadow (*_COgDefaultTextShadow)
 #define ONgFileStartup (*_ONgFileStartup)
+
+
 #undef $
 
@@ -87,4 +89,5 @@
 												   void* flag, uint32_t* list_location);
 typedef ActiveCharacter*	( *_ONrGetActiveCharacter)(void* CharacterPtr);
+typedef void ( *_ONrCharacter_NewAnimationHook)(Character *ioCharacter, ActiveCharacter *ioActiveCharacter);
 //int16_t ONICALL ONrGameState_GetPlayerCharacter();
 
@@ -113,6 +116,36 @@
 typedef int16_t ( *_TSrContext_New)( void* FontInstance, int size, int hthsik1,int hthsik2,int hthsik3, void* TSrContext); 
 
+typedef int16_t ( *_TSrContext_SetShade)(
+	void		*ioTextContext,
+	uint32_t	inShade);
+
+typedef uint16_t ( *_TRrAnimation_GetDuration)(int Animation);
+typedef uint16_t ( *_TRrAnimation_GetTo)(int Animation);
+typedef uint16_t ( *_TRrAnimation_GetFrom)(int Animation);
+
+typedef void
+( *_ONrCharacter_SetHitPoints)(
+	Character		*ioCharacter,
+	uint32_t			inHitPoints);
+typedef void ( *_ONrCorpse_Create)(Character* Character);
 //yes im cheating so badly.
 typedef uint16_t ( *_iSetCharacterClass)(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret);
+typedef uint16_t ( *_AI2iScript_Spawn)(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret);
+typedef void * ( *_OBJrObjectType_GetObject_ByNumber)(int inObjectType, int inIndex);
+typedef int ( *_OBJiObjectGroup_GetNumObjects)(void *inObjectGroup);
+
+typedef void ( *_ONrGameState_DeleteCharacter)(Character *inCharacter);
+
+typedef char (*OBJtEnumCallback_Object)(
+	void				*inObject,
+	int				inUserData);
+
+typedef int ( *_OBJrObjectType_EnumerateObjects)(
+	int								inObjectType,
+	OBJtEnumCallback_Object			inEnumCallback,
+	int						inUserData);
+
+typedef void ( *_OBJrDoor_Open)( DoorObject *inObject, Character *inCharacter );
+typedef void ( *_OBJrDoor_ForceOpen)(short id);
 
 #define ExtFunc(name) extern _##name name
@@ -123,4 +156,11 @@
 ExtFunc(SLrGlobalVariable_Register_String);
 ExtFunc(COrConsole_StatusLine_Display);
+ExtFunc(OBJrObjectType_EnumerateObjects);
+//ExtFunc(OBJiObjectGroup_GetNumObjects);
+ExtFunc(AI2iScript_Spawn);
+
+ExtFunc(TRrAnimation_GetDuration);
+ExtFunc(TRrAnimation_GetFrom);
+ExtFunc(TRrAnimation_GetTo); 
 
 extern _UUrMachineTime_High UUrMachineTime_High;
@@ -150,7 +190,10 @@
 ExtFunc(UUrStartupMessage);
 
+ExtFunc(ONrCharacter_NewAnimationHook);
+ExtFunc(ONrCharacter_SetHitPoints);
 ExtFunc(ONrGameState_NewCharacter);
+ExtFunc(ONrGameState_DeleteCharacter);
 ExtFunc(ONrGetActiveCharacter);
-
+ExtFunc(ONrCorpse_Create);
 ExtFunc(iSetCharacterClass);
 
@@ -165,3 +208,6 @@
 ExtFunc(TSrContext_DrawText);
 ExtFunc(TSrContext_New);
+ExtFunc(TSrContext_SetShade);
+ExtFunc(OBJrDoor_Open);
+ExtFunc(OBJrDoor_ForceOpen);
 #endif
