diff --git a/src/action/action_build.cpp b/src/action/action_build.cpp index 1e6a9e692..fcbf0b674 100644 --- a/src/action/action_build.cpp +++ b/src/action/action_build.cpp @@ -69,6 +69,7 @@ local void UpdateConstructionFrame(Unit* unit) } if( cframe!=unit->Data.Builded.Frame ) { unit->Data.Builded.Frame=cframe; + unit->Frame=cframe->Frame; UnitMarkSeen(unit); } } diff --git a/src/unit/unit_draw.cpp b/src/unit/unit_draw.cpp index 6ec78f530..c57005dcb 100644 --- a/src/unit/unit_draw.cpp +++ b/src/unit/unit_draw.cpp @@ -1733,7 +1733,7 @@ local void DrawUnitPlayerColor(const UnitType* type,int player,int frame,int x,i ** @param x X position. ** @param y Y position. */ -local void DrawConstruction(const Unit* unit,int x,int y) +local void DrawConstruction(const Unit* unit,int frame,int x,int y) { ConstructionFrame* cframe; @@ -1745,14 +1745,14 @@ local void DrawConstruction(const Unit* unit,int x,int y) x-=construction->Width/2; y-=construction->Height/2; GraphicUnitPixels(unit,construction->Sprite); - VideoDrawClip(construction->Sprite,cframe->Frame,x,y); + VideoDrawClip(construction->Sprite,frame,x,y); } else { x-=unit->Type->Sprite->Width/2; y-=unit->Type->Sprite->Height/2; GraphicUnitPixels(unit,unit->Type->Sprite); - DrawUnitType(unit->Type,cframe->Frame,x,y); + DrawUnitType(unit->Type,frame,x,y); #ifdef USE_OPENGL - DrawUnitPlayerColor(unit->Type,unit->Player->Player,cframe->Frame,x,y); + DrawUnitPlayerColor(unit->Type,unit->Player->Player,frame,x,y); #endif } } @@ -1821,7 +1821,7 @@ global void DrawBuilding(const Unit* unit) // if( state == 1 ) { if( constructed ) { - DrawConstruction(unit + DrawConstruction(unit,frame ,x+(type->TileWidth*TileSizeX)/2 ,y+(type->TileHeight*TileSizeY)/2); }