Fixed bug #628947: WC2 Graphic Display Errors
This commit is contained in:
parent
a714eda549
commit
200710ae36
5 changed files with 15 additions and 6 deletions
|
@ -1005,6 +1005,7 @@
|
|||
<LI>Fixed bug #651992: Wrong picture for destroyed orc wall (from
|
||||
Jimmy Salmon).
|
||||
<LI>Fixed bug #611417: Campaign not saved (from Jimmy Salmon).
|
||||
<LI>Fixed bug #628947: WC2 Graphic Display Errors (from Jimmy Salmon).
|
||||
<LI>+++
|
||||
</UL>
|
||||
</UL>
|
||||
|
|
|
@ -323,7 +323,9 @@ local void MoveToTarget(Unit* unit)
|
|||
<=unit->Stats->AttackRange ) {
|
||||
unit->State=0;
|
||||
if( !unit->Type->Tower ) {
|
||||
UnitHeadingFromDeltaXY(unit,goal->X-unit->X,goal->Y-unit->Y);
|
||||
UnitHeadingFromDeltaXY(unit,
|
||||
goal->X+(goal->Type->TileWidth-1)/2-unit->X,
|
||||
goal->Y+(goal->Type->TileHeight-1)/2-unit->Y);
|
||||
// FIXME: only if heading changes
|
||||
CheckUnitToBeDrawn(unit);
|
||||
}
|
||||
|
@ -528,7 +530,9 @@ local void AttackTarget(Unit* unit)
|
|||
// Turn always to target
|
||||
//
|
||||
if( !unit->Type->Tower && goal ) {
|
||||
UnitHeadingFromDeltaXY(unit,goal->X-unit->X,goal->Y-unit->Y);
|
||||
UnitHeadingFromDeltaXY(unit,
|
||||
goal->X+(goal->Type->TileWidth-1)/2-unit->X,
|
||||
goal->Y+(goal->Type->TileHeight-1)/2-unit->Y);
|
||||
// FIXME: only if heading changes
|
||||
CheckUnitToBeDrawn(unit);
|
||||
}
|
||||
|
|
|
@ -260,7 +260,8 @@ global void HandleActionRepair(Unit* unit)
|
|||
unit->State=0;
|
||||
unit->SubAction=2;
|
||||
UnitHeadingFromDeltaXY(unit,
|
||||
goal->X-unit->X,goal->Y-unit->Y);
|
||||
goal->X+(goal->Type->TileWidth-1)/2-unit->X,
|
||||
goal->Y+(goal->Type->TileHeight-1)/2-unit->Y);
|
||||
// FIXME: only if heading changes
|
||||
CheckUnitToBeDrawn(unit);
|
||||
} else if( err<0 ) {
|
||||
|
|
|
@ -113,7 +113,9 @@ local void SpellMoveToTarget(Unit* unit)
|
|||
unit->State = 0;
|
||||
if( !unit->Type->Building ) {
|
||||
// FIXME: buildings could have directions
|
||||
UnitHeadingFromDeltaXY(unit, goal->X - unit->X, goal->Y - unit->Y);
|
||||
UnitHeadingFromDeltaXY(unit,
|
||||
goal->X+(goal->Type->TileWidth-1)/2-unit->X,
|
||||
goal->Y+(goal->Type->TileHeight-1)/2-unit->Y);
|
||||
}
|
||||
unit->SubAction++; // cast the spell
|
||||
return;
|
||||
|
|
|
@ -200,8 +200,9 @@ global void ActionStillGeneric(Unit* unit,int ground)
|
|||
unit->State=0;
|
||||
unit->SubAction=1; // Mark attacking.
|
||||
if( !type->Tower ) {
|
||||
UnitHeadingFromDeltaXY(unit,goal->X-unit->X
|
||||
,goal->Y-unit->Y);
|
||||
UnitHeadingFromDeltaXY(unit,
|
||||
goal->X+(goal->Type->TileWidth-1)/2-unit->X,
|
||||
goal->Y+(goal->Type->TileHeight-1)/2-unit->Y);
|
||||
AnimateActionAttack(unit);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue