Fixed bug: Attack cries are too often.
This commit is contained in:
parent
c3949fc2f5
commit
6148092374
4 changed files with 6 additions and 3 deletions
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue