IceReaper / Quake2Sharp

Quake 2, fully playable, ported to C#
GNU General Public License v3.0
27 stars 12 forks source link

correct folder path for resource #8

Open constantin-ukr opened 9 months ago

constantin-ukr commented 9 months ago

Hello @IceReaper, could you explain in more detail about this point of readme to the project Method 3 - Running from IDE:

Make sure the baseq2 directory lies in the project root directory.

I had the file from the game and put the folder into the solution(D:\Quake\IceReaper-Quake2Sharp\, D:\Quake\IceReaper-Quake2Sharp\Quake2Sharp), into the result of compile (D:\IceReaper-Quake2Sharp\Quake2Sharp\bin\Debug\net6.0) even in user folder (C:\Users\user.Quake2Sharp). But I have the same error file pics/colormap.pcx cannot be found and as the result I get exception image

Thanks!

xenoken commented 3 months ago

@constantin-ukr As a workaround, In the class Quake2Sharp.qcommon.FS I replaced the line:

FS.fs_userdir = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "/.Quake2Sharp";

with:

FS.fs_userdir = "C:/Quake2Sharp/baseq2";

and copied the contents of baseq2 into that path.

This should be done only if you can't access the .Quake2Sharp folder.