mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Merged from revision: 6922
- Bugfix: Localization not working for multiple *.EnemyTaunts_*.xml files git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6923 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -26,6 +26,7 @@ typedef tauntParseData;
|
|||||||
BOOLEAN localizedTextOnly_Taunts;
|
BOOLEAN localizedTextOnly_Taunts;
|
||||||
|
|
||||||
UINT16 num_found_taunt = 0; // the correct number is set on reading the xml
|
UINT16 num_found_taunt = 0; // the correct number is set on reading the xml
|
||||||
|
UINT16 offset_index = 0;
|
||||||
|
|
||||||
static void XMLCALL
|
static void XMLCALL
|
||||||
tauntStartElementHandle(void *userData, const XML_Char *name, const XML_Char **atts)
|
tauntStartElementHandle(void *userData, const XML_Char *name, const XML_Char **atts)
|
||||||
@@ -241,8 +242,8 @@ tauntEndElementHandle(void *userData, const XML_Char *name)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// WANNE: Working
|
// WANNE: Working
|
||||||
wcscpy(zTaunt[pData->curTaunt.uiIndex].szText,pData->curTaunt.szText);
|
wcscpy(zTaunt[offset_index + pData->curTaunt.uiIndex].szText,pData->curTaunt.szText);
|
||||||
wcscpy(zTaunt[pData->curTaunt.uiIndex].szCensoredText,pData->curTaunt.szCensoredText);
|
wcscpy(zTaunt[offset_index + pData->curTaunt.uiIndex].szCensoredText,pData->curTaunt.szCensoredText);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -284,9 +285,11 @@ tauntEndElementHandle(void *userData, const XML_Char *name)
|
|||||||
|
|
||||||
pData->curArray[pData->curTaunt.uiIndex] = pData->curTaunt;
|
pData->curArray[pData->curTaunt.uiIndex] = pData->curTaunt;
|
||||||
//pData->curArray[num_found_taunt-1] = pData->curTaunt;
|
//pData->curArray[num_found_taunt-1] = pData->curTaunt;
|
||||||
|
|
||||||
|
num_found_taunt++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
num_found_taunt++;
|
//num_found_taunt++;
|
||||||
//num_found_taunt = pData->curTaunt.uiIndex;
|
//num_found_taunt = pData->curTaunt.uiIndex;
|
||||||
}
|
}
|
||||||
else if(strcmp(name, "uiIndex") == 0)
|
else if(strcmp(name, "uiIndex") == 0)
|
||||||
@@ -953,6 +956,9 @@ BOOLEAN ReadInTaunts(STR fileName, BOOLEAN localizedVersion)
|
|||||||
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, "Loading EnemyTaunts.xml" );
|
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, "Loading EnemyTaunts.xml" );
|
||||||
|
|
||||||
localizedTextOnly_Taunts = localizedVersion;
|
localizedTextOnly_Taunts = localizedVersion;
|
||||||
|
|
||||||
|
if (!localizedTextOnly_Taunts)
|
||||||
|
offset_index = num_found_taunt;
|
||||||
|
|
||||||
// Open file
|
// Open file
|
||||||
hFile = FileOpen( fileName, FILE_ACCESS_READ, FALSE );
|
hFile = FileOpen( fileName, FILE_ACCESS_READ, FALSE );
|
||||||
|
|||||||
Reference in New Issue
Block a user