From 9394ebe768b7bb4bf978736aeddcf19044791537 Mon Sep 17 00:00:00 2001
From: Brian Koropoff <bkoropoff@gmail.com>
Date: Sat, 22 May 2021 15:58:43 -0700
Subject: [PATCH] Resolve raze.pk3 via search paths

Linux installs typically don't have it next to the program binary
---
 source/core/initfs.cpp      | 2 +-
 source/core/searchpaths.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/source/core/initfs.cpp b/source/core/initfs.cpp
index f5796dc6a..8c5b7da92 100644
--- a/source/core/initfs.cpp
+++ b/source/core/initfs.cpp
@@ -298,7 +298,7 @@ void InitFileSystem(TArray<GrpEntry>& groups)
 	TArray<FString> Files;
 
 	// First comes the engine's own stuff.
-	FString baseres = progdir + ENGINERES_FILE;
+	const char* baseres = BaseFileSearch(ENGINERES_FILE, nullptr, true, GameConfig);
 	D_AddFile(Files, baseres, true, -1, GameConfig);
 
 	bool insertdirectoriesafter = Args->CheckParm("-insertdirafter");
diff --git a/source/core/searchpaths.cpp b/source/core/searchpaths.cpp
index 194606caa..56379464f 100644
--- a/source/core/searchpaths.cpp
+++ b/source/core/searchpaths.cpp
@@ -604,7 +604,7 @@ TArray<GrpInfo> ParseAllGrpInfos(TArray<FileEntry>& filelist)
 	TMap<FString, uint32_t> CRCMap;
 	// This opens the base resource only for reading the grpinfo from it which we need before setting up the game state.
 	std::unique_ptr<FResourceFile> engine_res;
-	FString baseres = progdir + ENGINERES_FILE;
+	const char* baseres = BaseFileSearch(ENGINERES_FILE, nullptr, true, GameConfig);
 	engine_res.reset(FResourceFile::OpenResourceFile(baseres, true, true));
 	if (engine_res)
 	{