mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-31 05:20:51 +00:00
Missed a few spots
This commit is contained in:
parent
90148f79eb
commit
dbb7267f22
1 changed files with 18 additions and 4 deletions
|
@ -299,10 +299,14 @@ static md2_model_t *md2_readModel(const char *filename)
|
|||
//Filename checking fixed ~Monster Iestyn and Golden
|
||||
file = fopen(va("%s"PATHSEP"%s", srb2home, filename), "rb");
|
||||
if (!file)
|
||||
{
|
||||
file = fopen(va("%s"PATHSEP"%s", srb2path, filename), "rb");
|
||||
if (!file)
|
||||
{
|
||||
free(model);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// initialize model and read header
|
||||
|
||||
|
@ -500,7 +504,11 @@ static GrTextureFormat_t PNG_Load(const char *filename, int *w, int *h, GLPatch_
|
|||
png_FILE = fopen(pngfilename, "rb");
|
||||
if (!png_FILE)
|
||||
{
|
||||
pngfilename = va("%s"PATHSEP"md2"PATHSEP"%s", srb2path, filename);
|
||||
FIL_ForceExtension(pngfilename, ".png");
|
||||
png_FILE = fopen(pngfilename, "rb");
|
||||
//CONS_Debug(DBG_RENDER, "M_SavePNG: Error on opening %s for loading\n", filename);
|
||||
if (!png_FILE)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -625,10 +633,16 @@ static GrTextureFormat_t PCX_Load(const char *filename, int *w, int *h,
|
|||
//Filename checking fixed ~Monster Iestyn and Golden
|
||||
char *pcxfilename = va("%s"PATHSEP"md2"PATHSEP"%s", srb2home, filename);
|
||||
|
||||
FIL_ForceExtension(pcxfilename, ".pcx");
|
||||
file = fopen(pcxfilename, "rb");
|
||||
if (!file)
|
||||
{
|
||||
pcxfilename = va("%s"PATHSEP"md2"PATHSEP"%s", srb2path, filename);
|
||||
FIL_ForceExtension(pcxfilename, ".pcx");
|
||||
file = fopen(pcxfilename, "rb");
|
||||
if (!file)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (fread(&header, sizeof (PcxHeader), 1, file) != 1)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue