From b9833e7e6ee73401e444df3fdad66b6734300df5 Mon Sep 17 00:00:00 2001
From: HarrievG <Harry@vrknight.eu>
Date: Tue, 13 Jul 2021 20:36:53 +0200
Subject: [PATCH] - Fixed Once Breakpoints - Send scriptlist on connect. -
 upped version info

---
 neo/sys/win32/rc/Debugger.rc          | 8 ++++----
 neo/tools/debugger/DebuggerClient.h   | 2 +-
 neo/tools/debugger/DebuggerServer.cpp | 4 ++++
 neo/tools/debugger/DebuggerWindow.cpp | 2 +-
 4 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/neo/sys/win32/rc/Debugger.rc b/neo/sys/win32/rc/Debugger.rc
index d409f48f..e9a1c032 100644
--- a/neo/sys/win32/rc/Debugger.rc
+++ b/neo/sys/win32/rc/Debugger.rc
@@ -149,17 +149,17 @@ END
 // Dialog
 //
 
-IDD_DBG_ABOUT DIALOGEX 0, 0, 250, 80
+IDD_DBG_ABOUT DIALOGEX 0, 0, 250, 90
 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | 
     WS_CAPTION | WS_SYSMENU
 CAPTION "About Script Debugger"
 FONT 8, "MS Shell Dlg", 400, 0, 0x1
 BEGIN
     LTEXT           "Script Debugger",IDC_STATIC,35,7,81,8
-    LTEXT           "Version 1.0",IDC_STATIC,35,17,41,8
+    LTEXT           "Version 1.1",IDC_STATIC,35,17,41,8
     LTEXT           "Original version by Raven", IDC_STATIC, 35,28, 134, 8
-    LTEXT           "Dhewm3 version by Harrie van Ginneken", IDC_STATIC, 35, 38, 134, 8
-    DEFPUSHBUTTON   "OK",IDOK,165,60,50,14
+    LTEXT           "Dhewm3 version by Harrie van Ginneken \n\t\t\t\tand\n\t\t\t Daniel Gibson", IDC_STATIC, 35, 38, 134, 32
+    DEFPUSHBUTTON   "OK",IDOK,100,68,50,14
     ICON            5098,IDC_STATIC,7,7,20,20
 END
 
diff --git a/neo/tools/debugger/DebuggerClient.h b/neo/tools/debugger/DebuggerClient.h
index 10929ecf..0116bf9b 100644
--- a/neo/tools/debugger/DebuggerClient.h
+++ b/neo/tools/debugger/DebuggerClient.h
@@ -91,7 +91,7 @@ public:
 	void						SendCommand				( const char* cmdStr );
 
 	// Breakpoints
-	int							AddBreakpoint			( const char* filename, int lineNumber );
+	int							AddBreakpoint			( const char* filename, int lineNumber, bool onceOnly = false);
 	bool						RemoveBreakpoint		( int bpID );
 	void						ClearBreakpoints		( void );
 	int							GetBreakpointCount		( void );
diff --git a/neo/tools/debugger/DebuggerServer.cpp b/neo/tools/debugger/DebuggerServer.cpp
index e8613a9f..612c22a4 100644
--- a/neo/tools/debugger/DebuggerServer.cpp
+++ b/neo/tools/debugger/DebuggerServer.cpp
@@ -187,11 +187,13 @@ bool rvDebuggerServer::ProcessMessages ( void )
 			case DBMSG_CONNECT:
 				mConnected = true;
 				SendMessage ( DBMSG_CONNECTED );
+				HandleInspectScripts ( nullptr );
 				com_editors |= EDITOR_DEBUGGER;
 				break;
 
 			case DBMSG_CONNECTED:
 				mConnected = true;
+				HandleInspectScripts( nullptr );
 				com_editors |= EDITOR_DEBUGGER;
 				break;
 
@@ -294,11 +296,13 @@ data supplied in the message.
 */
 void rvDebuggerServer::HandleAddBreakpoint ( idBitMsg* msg )
 {
+	bool onceOnly = false;
 	long lineNumber;
 	long id;
 	char filename[2048]; // DG: randomly chose this size
 
 	// Read the breakpoint info
+	onceOnly = msg->ReadBits( 1 ) ? true : false;
 	lineNumber = msg->ReadInt ( );
 	id		   = msg->ReadInt ( );
 
diff --git a/neo/tools/debugger/DebuggerWindow.cpp b/neo/tools/debugger/DebuggerWindow.cpp
index d92f3801..2b756f18 100644
--- a/neo/tools/debugger/DebuggerWindow.cpp
+++ b/neo/tools/debugger/DebuggerWindow.cpp
@@ -170,7 +170,7 @@ bool rvDebuggerWindow::Create ( HINSTANCE instance )
 
 	UpdateTitle ( );
 
-	Printf ( "Dhewm3 Script Debugger v1.0\n\n" );
+	Printf ( "Dhewm3 Script Debugger v1.1\n\n" );
 
 	ShowWindow ( mWnd, SW_SHOW );
 	UpdateWindow ( mWnd );