mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-22 17:12:25 -05:00
If user's custom default texture zip is missing, still show error in chat instead of just silently falling back to default.zip
This commit is contained in:
parent
1db73db9f2
commit
593b581465
1 changed files with 1 additions and 11 deletions
|
@ -279,16 +279,6 @@ static char defTexPackBuffer[STRING_SIZE];
|
|||
static String defTexPack = String_FromArray(defTexPackBuffer);
|
||||
static const String defaultZip = String_FromConst("default.zip");
|
||||
|
||||
/* Retrieves the filename of the default texture pack used. */
|
||||
/* NOTE: Returns default.zip if classic mode or selected pack does not exist. */
|
||||
static String TexturePack_UNSAFE_GetDefault(void) {
|
||||
String texPath; char texPathBuffer[STRING_SIZE];
|
||||
String_InitArray(texPath, texPathBuffer);
|
||||
|
||||
String_Format1(&texPath, "texpacks/%s", &defTexPack);
|
||||
return File_Exists(&texPath) && !Game_ClassicMode ? defTexPack : defaultZip;
|
||||
}
|
||||
|
||||
void TexturePack_SetDefault(const String* texPack) {
|
||||
String_Copy(&defTexPack, texPack);
|
||||
Options_Set(OPT_DEFAULT_TEX_PACK, texPack);
|
||||
|
@ -361,7 +351,7 @@ static void ExtractFromFile(const String* filename) {
|
|||
}
|
||||
|
||||
void TexturePack_ExtractDefault(void) {
|
||||
String texPack = TexturePack_UNSAFE_GetDefault();
|
||||
String texPack = Game_ClassicMode ? defaultZip : defTexPack;
|
||||
ExtractFromFile(&defaultZip);
|
||||
|
||||
/* in case the user's default texture pack doesn't have all required textures */
|
||||
|
|
Loading…
Reference in a new issue