mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-01 16:41:09 +00:00
- fixed file existence check in TRNSLATE parser.
This commit is contained in:
parent
828cba13a1
commit
15d4fb8fcd
1 changed files with 17 additions and 17 deletions
|
@ -1550,10 +1550,8 @@ void R_ParseTrnslate()
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
sc.MustGetToken(TK_StringConst);
|
sc.MustGetToken(TK_StringConst);
|
||||||
try
|
|
||||||
{
|
|
||||||
int pallump = Wads.CheckNumForFullName(sc.String, true, ns_global);
|
int pallump = Wads.CheckNumForFullName(sc.String, true, ns_global);
|
||||||
if (pallump) //
|
if (pallump >= 0) //
|
||||||
{
|
{
|
||||||
int start = 0;
|
int start = 0;
|
||||||
if (sc.CheckToken(','))
|
if (sc.CheckToken(','))
|
||||||
|
@ -1566,14 +1564,16 @@ void R_ParseTrnslate()
|
||||||
NewTranslation.AddColors(start, numcolors, palette);
|
NewTranslation.AddColors(start, numcolors, palette);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
NewTranslation.AddToTranslation(sc.String);
|
NewTranslation.AddToTranslation(sc.String);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
catch (CRecoverableError & err)
|
catch (CRecoverableError & err)
|
||||||
{
|
{
|
||||||
sc.ScriptMessage("Error in translation '%s':\n" TEXTCOLOR_YELLOW "%s\n", sc.String, err.GetMessage());
|
sc.ScriptMessage("Error in translation '%s':\n" TEXTCOLOR_YELLOW "%s\n", sc.String, err.GetMessage());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} while (sc.CheckToken(','));
|
} while (sc.CheckToken(','));
|
||||||
|
|
||||||
int trans = NewTranslation.StoreTranslation(TRANSLATION_Custom);
|
int trans = NewTranslation.StoreTranslation(TRANSLATION_Custom);
|
||||||
|
|
Loading…
Reference in a new issue