From efb30f93abb5bbf842893059e17561db6e6e0516 Mon Sep 17 00:00:00 2001
From: wolfy852 <wolfy852@hotmail.com>
Date: Sat, 7 Oct 2017 14:48:49 -0500
Subject: [PATCH] Fixes from toaster, plus some other things

---
 src/filesrch.c | 2 +-
 src/filesrch.h | 1 +
 src/m_menu.c   | 5 +++++
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/filesrch.c b/src/filesrch.c
index a28c4d83c2..f8bf15293f 100644
--- a/src/filesrch.c
+++ b/src/filesrch.c
@@ -520,7 +520,7 @@ filestatus_t filesearch(char *filename, const char *startpath, const UINT8 *want
 
 char exttable[NUM_EXT_TABLE][5] = {
 	".txt", ".cfg", // exec
-	".wad", ".soc", ".lua"}; // addfile
+	".wad", ".pk3", ".soc", ".lua"}; // addfile
 
 char filenamebuf[MAX_WADFILES][MAX_WADPATH];
 
diff --git a/src/filesrch.h b/src/filesrch.h
index c2201b4530..e88242698d 100644
--- a/src/filesrch.h
+++ b/src/filesrch.h
@@ -54,6 +54,7 @@ typedef enum
 	EXT_CFG,
 	EXT_LOADSTART,
 	EXT_WAD = EXT_LOADSTART,
+	EXT_PK3,
 	EXT_SOC,
 	EXT_LUA, // allowed even if not HAVE_BLUA so that we can yell on load attempt
 	NUM_EXT,
diff --git a/src/m_menu.c b/src/m_menu.c
index 64255e71a8..caf56fd8c4 100644
--- a/src/m_menu.c
+++ b/src/m_menu.c
@@ -64,6 +64,9 @@
 // And just some randomness for the exits.
 #include "m_random.h"
 
+// P_GetSkinSprite2
+#include "r_things.h"
+
 #ifdef PC_DOS
 #include <stdio.h> // for snprintf
 int	snprintf(char *str, size_t n, const char *fmt, ...);
@@ -4758,6 +4761,7 @@ static void M_Addons(INT32 choice)
 	addonsp[EXT_TXT] = W_CachePatchName("M_FTXT", PU_STATIC);
 	addonsp[EXT_CFG] = W_CachePatchName("M_FCFG", PU_STATIC);
 	addonsp[EXT_WAD] = W_CachePatchName("M_FWAD", PU_STATIC);
+	addonsp[EXT_PK3] = W_CachePatchName("M_FPK3", PU_STATIC);
 	addonsp[EXT_SOC] = W_CachePatchName("M_FSOC", PU_STATIC);
 	addonsp[EXT_LUA] = W_CachePatchName("M_FLUA", PU_STATIC);
 	addonsp[NUM_EXT] = W_CachePatchName("M_FUNKN", PU_STATIC);
@@ -5165,6 +5169,7 @@ static void M_HandleAddons(INT32 choice)
 						// else intentional fallthrough
 						case EXT_SOC:
 						case EXT_WAD:
+						case EXT_PK3:
 							COM_BufAddText(va("addfile %s%s", menupath, dirmenu[dir_on[menudepthleft]]+DIR_STRING));
 							addonsresponselimit = 5;
 							break;
-- 
GitLab