Commit:db0bb9fc57c0cf907a9d90e19d5bd7c4149e4ea8 (browse)
Parent:4c0d81ebc043de0e16fc9331c1246b16bcbc2c02
Author:qwx <qwx@sciops.net>
Date:Sat Aug 15 12:29:13 CES 2020
Message:
files: correctly set user directory if game isn't baseq2

files.c => files.c
@@ -531,6 +531,7 @@
 void FS_SetGamedir (char *dir)
 {
 	searchpath_t	*next;
+	char *home;
 
 	if (strstr(dir, "..") || strstr(dir, "/")
 		|| strstr(dir, "\\") || strstr(dir, ":") )
@@ -570,6 +571,10 @@
 		if (fs_cddir->string[0])
 			FS_AddGameDirectory (va("%s/%s", fs_cddir->string, dir) );
 		FS_AddGameDirectory (va("%s/%s", fs_basedir->string, dir) );
+		if((home = getenv("home")) != nil){
+			FS_AddGameDirectory(va("%s/lib/quake2/%s", home, dir));
+			free(home);
+		}
 	}
 }