diff --git a/Init.cpp b/Init.cpp index e2f6fc59..3bd512b2 100644 --- a/Init.cpp +++ b/Init.cpp @@ -470,16 +470,7 @@ BOOLEAN LoadExternalGameplayData(STR directoryName) //WarmSteel - Attachment slots related xml's strcpy(fileName, directoryName); strcat(fileName, ATTACHMENTSLOTSFILENAME); - SGP_THROW_IFFALSE(ReadInAttachmentSlotsStats(fileName, FALSE),ATTACHMENTSLOTSFILENAME); - - #ifndef ENGLISH - AddLanguagePrefix(fileName); - if ( FileExists(fileName) ) - { - DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName)); - SGP_THROW_IFFALSE(ReadInAttachmentSlotsStats(fileName,TRUE), fileName); - } - #endif + SGP_THROW_IFFALSE(ReadInAttachmentSlotsStats(fileName),ATTACHMENTSLOTSFILENAME); // Flugente: created separate gun and item choices for different soldier classes - read in different xmls strcpy(fileName, directoryName); diff --git a/Tactical/XML_AttachmentSlots.cpp b/Tactical/XML_AttachmentSlots.cpp index b7b7a90c..776198c9 100644 --- a/Tactical/XML_AttachmentSlots.cpp +++ b/Tactical/XML_AttachmentSlots.cpp @@ -27,8 +27,6 @@ struct } typedef attachmentslotParseData; -BOOLEAN localizedTextOnly_AttachmentSlots; - static void XMLCALL attachmentslotStartElementHandle(void *userData, const XML_Char *name, const XML_Char **atts) { @@ -104,16 +102,8 @@ attachmentslotEndElementHandle(void *userData, const XML_Char *name) pData->curElement = ELEMENT_LIST; if(pData->curAttachmentSlot.uiSlotIndex < pData->maxArraySize) - { - if (!localizedTextOnly_AttachmentSlots) - { - pData->curArray[pData->curAttachmentSlot.uiSlotIndex] = pData->curAttachmentSlot; //write the attachmentinfo into the table - } - else - { - wcscpy(AttachmentSlots[pData->curAttachmentSlot.uiSlotIndex].szSlotName, pData->curAttachmentSlot.szSlotName); - } - + { + pData->curArray[pData->curAttachmentSlot.uiSlotIndex] = pData->curAttachmentSlot; //write the attachmentinfo into the table //Save the highest known index up till now. if(LAST_SLOT_INDEX < pData->curAttachmentSlot.uiSlotIndex){ LAST_SLOT_INDEX = (UINT16) pData->curAttachmentSlot.uiSlotIndex; @@ -174,7 +164,7 @@ attachmentslotEndElementHandle(void *userData, const XML_Char *name) } -BOOLEAN ReadInAttachmentSlotsStats(STR fileName, BOOLEAN localizedVersion) +BOOLEAN ReadInAttachmentSlotsStats(STR fileName) { HWFILE hFile; UINT32 uiBytesRead; @@ -184,8 +174,6 @@ BOOLEAN ReadInAttachmentSlotsStats(STR fileName, BOOLEAN localizedVersion) attachmentslotParseData pData; - localizedTextOnly_AttachmentSlots = localizedVersion; - DebugMsg(TOPIC_JA2, DBG_LEVEL_3, "Loading AttachmentSlots.xml" ); // Open attachmentinfo file