[-] Fixed crash with construction shadows.
This commit is contained in:
parent
2e91d391f3
commit
3b0cb65893
1 changed files with 2 additions and 2 deletions
|
@ -848,7 +848,7 @@ void CUnit::Draw(const CViewport &vp) const
|
|||
}
|
||||
|
||||
|
||||
if (state == 1 && constructed) {
|
||||
if (state == 1 && constructed && cframe) {
|
||||
DrawConstructionShadow(*type, cframe, frame, screenPos);
|
||||
} else {
|
||||
if (action != UnitActionDie) {
|
||||
|
@ -883,7 +883,7 @@ void CUnit::Draw(const CViewport &vp) const
|
|||
// Buildings under construction/upgrade/ready.
|
||||
//
|
||||
if (state == 1) {
|
||||
if (constructed) {
|
||||
if (constructed && cframe) {
|
||||
const PixelPos pos(screenPos + (type->GetPixelSize()) / 2);
|
||||
DrawConstruction(player, cframe, *type, frame, pos);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue