From 3e0b5ef1cd18057a72d099754eca95c75c25c56c Mon Sep 17 00:00:00 2001
From: Alam Ed Arias <alam@srb2.org>
Date: Sat, 15 Mar 2014 18:55:07 -0400
Subject: [PATCH] SRB2 2.1.1 release

---
 readme.txt                                       | 2 +-
 src/d_main.c                                     | 7 ++++---
 src/doomdef.h                                    | 6 +++---
 src/m_misc.c                                     | 4 ++++
 src/p_mobj.c                                     | 3 +++
 src/sdl/macosx/Srb2mac.xcodeproj/project.pbxproj | 4 ++--
 6 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/readme.txt b/readme.txt
index f60648a518..16ed771940 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,4 +1,4 @@
-Here it is! SRB2 v2.0 source code!
+Here it is! SRB2 v2.1 (.1) source code!
 
 
 Win32 with Visual C (6SP6+Processor Pack OR 7)
diff --git a/src/d_main.c b/src/d_main.c
index 6a0be9ceb9..8b97c8f0bf 100644
--- a/src/d_main.c
+++ b/src/d_main.c
@@ -802,6 +802,9 @@ static void IdentifyVersion(void)
 	// Add the weapons
 	D_AddFile(va(pandf,srb2waddir,"rings.dta"));
 
+	// Add our crappy patches to fix our bugs
+	D_AddFile(va(pandf,srb2waddir,"patch.dta"));
+
 #if !defined (SDL) || defined (HAVE_MIXER)
 	{
 #if defined (DC) && 0
@@ -817,8 +820,6 @@ static void IdentifyVersion(void)
 			I_Error("File %s has been modified with non-music lumps",musicfile);
 	}
 #endif
-
-	// D_AddFile(va(pandf,srb2waddir,"patch.dta")); //for dev
 }
 
 /* ======================================================================== */
@@ -1095,7 +1096,7 @@ void D_SRB2Main(void)
 	W_VerifyFileMD5(1, "a894044b555dfcc71865cee16a996e88"); // zones.dta
 	W_VerifyFileMD5(2, "4c410c1de6e0440cc5b2858dcca80c3e"); // player.dta
 	W_VerifyFileMD5(3, "85901ad4bf94637e5753d2ac2c03ea26"); // rings.dta
-	//W_VerifyFileMD5(5, ""); // patch.dta (dev changable)
+	W_VerifyFileMD5(4, "c529930ee5aed6dbe33625dc8075520b"); // patch.dta
 
 	// don't check music.dta because people like to modify it, and it doesn't matter if they do
 	// ...except it does if they slip maps in there, and that's what W_VerifyNMUSlumps is for.
diff --git a/src/doomdef.h b/src/doomdef.h
index 535bcc1443..6d6e745d66 100644
--- a/src/doomdef.h
+++ b/src/doomdef.h
@@ -144,8 +144,8 @@ extern FILE *logstream;
 #define VERSIONSTRING "Trunk"
 #else
 #define VERSION    201 // Game version
-#define SUBVERSION 0   // more precise version number
-#define VERSIONSTRING "v2.1.0"
+#define SUBVERSION 1   // more precise version number
+#define VERSIONSTRING "v2.1.1"
 #endif
 
 // Modification options
@@ -201,7 +201,7 @@ extern FILE *logstream;
 // it's only for detection of the version the player is using so the MS can alert them of an update.
 // Only set it higher, not lower, obviously.
 // Note that we use this to help keep internal testing in check; this is why v2.1.0 is not version "1".
-#define MODVERSION 4
+#define MODVERSION 5
 
 
 
diff --git a/src/m_misc.c b/src/m_misc.c
index ac26fae317..5e6f5508aa 100644
--- a/src/m_misc.c
+++ b/src/m_misc.c
@@ -1503,6 +1503,10 @@ void M_StartupLocale(void)
 	CONS_Printf("M_StartupLocale...\n");
 
 	setlocale(LC_ALL, "");
+
+	// Do not set numeric locale as that affects atof
+	setlocale(LC_NUMERIC, "C");
+
 	// FIXME: global name define anywhere?
 #ifdef GETTEXTDOMAIN1
 	textdomhandle = bindtextdomain("srb2", GETTEXTDOMAIN1);
diff --git a/src/p_mobj.c b/src/p_mobj.c
index 1c2a789bd8..1c4a193a26 100644
--- a/src/p_mobj.c
+++ b/src/p_mobj.c
@@ -1219,6 +1219,9 @@ void P_XYMovement(mobj_t *mo)
 	else if (mo->player)
 		moved = true;
 
+	if (P_MobjWasRemoved(mo)) // MF_SPECIAL touched a player! O_o;;
+		return;
+
 	// Check the gravity status.
 	P_CheckGravity(mo, false);
 
diff --git a/src/sdl/macosx/Srb2mac.xcodeproj/project.pbxproj b/src/sdl/macosx/Srb2mac.xcodeproj/project.pbxproj
index 195d01cba6..cf9ceec65d 100644
--- a/src/sdl/macosx/Srb2mac.xcodeproj/project.pbxproj
+++ b/src/sdl/macosx/Srb2mac.xcodeproj/project.pbxproj
@@ -1212,7 +1212,7 @@
 		C01FCF4B08A954540054247B /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				CURRENT_PROJECT_VERSION = 2.1.0;
+				CURRENT_PROJECT_VERSION = 2.1.1;
 				GCC_PREPROCESSOR_DEFINITIONS = (
 					"$(inherited)",
 					NORMALSRB2,
@@ -1224,7 +1224,7 @@
 		C01FCF4C08A954540054247B /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				CURRENT_PROJECT_VERSION = 2.1.0;
+				CURRENT_PROJECT_VERSION = 2.1.1;
 				GCC_ENABLE_FIX_AND_CONTINUE = NO;
 				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
 				GCC_PREPROCESSOR_DEFINITIONS = (
-- 
GitLab