mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-04-30 09:01:41 -04:00
fix: fixed commit 55e20b3
, which causes new issues on units with Image=ID set in rules .
This commit is contained in:
parent
d829b8e9ee
commit
f7e8dd2249
1 changed files with 5 additions and 8 deletions
|
@ -50,7 +50,7 @@ inline BOOL isFalse(CString expr)
|
|||
|
||||
|
||||
// retrieve the picture filename of a unit (as it is saved in the pics map). The returned file may not exist in the pics map (you need to do a check!).
|
||||
inline CString GetUnitPictureFilename(const CString& lpUnitName, DWORD dwPicIndex)
|
||||
inline CString GetUnitPictureFilename(const CString& artSectionId, DWORD dwPicIndex)
|
||||
{
|
||||
CIniFile& ini = Map->GetIniFile();
|
||||
|
||||
|
@ -59,14 +59,11 @@ inline CString GetUnitPictureFilename(const CString& lpUnitName, DWORD dwPicInde
|
|||
|
||||
// store differently for each type even they shares same image,
|
||||
// because they can have different components, e.g. turret image
|
||||
if (pics.find(lpUnitName + n) != pics.end()) {
|
||||
return lpUnitName + n;
|
||||
if (pics.find(artSectionId + n) != pics.end()) {
|
||||
return artSectionId + n;
|
||||
}
|
||||
|
||||
auto artname = rules.GetStringOr(lpUnitName, "Image", lpUnitName);
|
||||
artname = ini.GetStringOr(lpUnitName, "Image", artname);
|
||||
|
||||
auto const& shapeName = art.GetString(artname, "Image");
|
||||
auto artname = artSectionId;
|
||||
auto const& shapeName = art.GetString(artSectionId, "Image");
|
||||
|
||||
if (!shapeName.IsEmpty()) {
|
||||
if (!g_data.GetBool("IgnoreArtImage", artname)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue