mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-04-30 09:01:41 -04:00
Bug fix: FootClass units cannot adapt to Image= images correctly .
This commit is contained in:
parent
1ccf2c8526
commit
55e20b30ae
1 changed files with 8 additions and 7 deletions
|
@ -5669,7 +5669,8 @@ void CIsoView::DrawMap()
|
|||
COLORREF c = GetColor(obj.house);
|
||||
|
||||
auto const facing = atoi(obj.direction) / 32;
|
||||
CString lpPicFile = GetUnitPictureFilename(obj.type, facing);
|
||||
auto const imageId = theApp.m_loading->GetArtID(obj.type);
|
||||
CString lpPicFile = GetUnitPictureFilename(imageId, facing);
|
||||
|
||||
#ifndef NOSURFACES
|
||||
DrawCell(drawCoords.x, drawCoords.y, 1, 1, c);
|
||||
|
@ -5683,7 +5684,7 @@ void CIsoView::DrawMap()
|
|||
if (!missingimages[obj.type]) {
|
||||
SetError("Loading graphics");
|
||||
theApp.m_loading->LoadUnitGraphic(obj.type);
|
||||
lpPicFile = GetUnitPictureFilename(obj.type, facing);
|
||||
lpPicFile = GetUnitPictureFilename(imageId, facing);
|
||||
if (!lpPicFile.IsEmpty()) {
|
||||
p = pics[lpPicFile];
|
||||
}
|
||||
|
@ -5721,7 +5722,7 @@ void CIsoView::DrawMap()
|
|||
COLORREF c = GetColor(obj.house);
|
||||
|
||||
auto const facing = atoi(obj.direction) / 32;
|
||||
CString lpPicFile = GetUnitPictureFilename(obj.type, facing);
|
||||
CString lpPicFile = GetUnitPictureFilename(theApp.m_loading->GetArtID(obj.type), facing);
|
||||
|
||||
#ifndef NOSURFACES
|
||||
DrawCell(drawCoords.x, drawCoords.y, 1, 1, c);
|
||||
|
@ -5735,7 +5736,7 @@ void CIsoView::DrawMap()
|
|||
if (!missingimages[obj.type]) {
|
||||
SetError("Loading graphics");
|
||||
theApp.m_loading->LoadUnitGraphic(obj.type);
|
||||
lpPicFile = GetUnitPictureFilename(obj.type, facing);
|
||||
lpPicFile = GetUnitPictureFilename(theApp.m_loading->GetArtID(obj.type), facing);
|
||||
if (!lpPicFile.IsEmpty()) {
|
||||
p = pics[lpPicFile];
|
||||
}
|
||||
|
@ -5781,10 +5782,10 @@ void CIsoView::DrawMap()
|
|||
|
||||
COLORREF c = GetColor(obj.house);
|
||||
|
||||
|
||||
int dir = (7 - atoi(obj.direction) / 32) % 8;
|
||||
|
||||
CString lpPicFile = GetUnitPictureFilename(obj.type, dir);
|
||||
auto const imageId = theApp.m_loading->GetArtID(obj.type);
|
||||
CString lpPicFile = GetUnitPictureFilename(imageId, dir);
|
||||
#ifndef NOSURFACES
|
||||
DrawCell(drawCoords.x, drawCoords.y, 1, 1, c);
|
||||
#endif
|
||||
|
@ -5802,7 +5803,7 @@ void CIsoView::DrawMap()
|
|||
if (!missingimages[obj.type]) {
|
||||
SetError("Loading graphics");
|
||||
theApp.m_loading->LoadUnitGraphic(obj.type);
|
||||
lpPicFile = GetUnitPictureFilename(obj.type, dir);
|
||||
lpPicFile = GetUnitPictureFilename(imageId, dir);
|
||||
if (!lpPicFile.IsEmpty()) {
|
||||
p = pics[lpPicFile];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue