diff --git a/doc/ChangeLog.html b/doc/ChangeLog.html index 4857ac747..6a3b9a403 100644 --- a/doc/ChangeLog.html +++ b/doc/ChangeLog.html @@ -539,6 +539,8 @@ <LI>Made a generic get resource function. <LI>Fixed compile without any CCL support. <LI>Fixed bug: Cancel build of oil platform didn't place oil patch back. + <LI>Fixed bug: firing missile outside of map. + <LI>Fixed bug: Attack cries are too often. <LI>+++ <LI>TODO: Fixed bug: Unit didn't return to start point, if attacking. </UL> diff --git a/src/include/unit.h b/src/include/unit.h index 1784ac2a6..b2746af78 100644 --- a/src/include/unit.h +++ b/src/include/unit.h @@ -231,8 +231,9 @@ struct _unit_ { unsigned Direction : 8; /// angle (0-255) unit looking + unsigned Attacked : 4; /// unit is attacked + unsigned Burning : 1; /// unit is burning - unsigned Attacked : 1; /// unit is attacked // FIXME: next not used! //unsigned Visible : 1; /// unit is visible (submarine) unsigned Destroyed : 1; /// unit is destroyed pending reference diff --git a/src/map/minimap.cpp b/src/map/minimap.cpp index b3ac98fe4..89d2734e8 100644 --- a/src/map/minimap.cpp +++ b/src/map/minimap.cpp @@ -314,7 +314,7 @@ global void DrawMinimap(int vx,int vy) if( unit->Attacked && RedPhase ) { color=ColorRed; // better to clear to fast, than to clear never :?) - unit->Attacked=0; + unit->Attacked--; } else if( MinimapShowSelected && unit->Selected ) { color=ColorWhite; } else { diff --git a/src/unit/unit.cpp b/src/unit/unit.cpp index 9261a3d33..a0a82e68b 100644 --- a/src/unit/unit.cpp +++ b/src/unit/unit.cpp @@ -2298,8 +2298,8 @@ global void HitUnit(Unit* unit,int damage) if( unit->Player->AiEnabled ) { AiHelpMe(unit); } - unit->Attacked=1; } + unit->Attacked=7; if( unit->HP<=damage ) { // unit is killed or destroyed DestroyUnit(unit);