[-]Fixed some bugs
-typo in CommandAttackGround -Preferences.ShowMessages now true by default -towers now clear their action when unit is out of range
This commit is contained in:
parent
256227dede
commit
280ca0c7b5
3 changed files with 6 additions and 3 deletions
src
|
@ -445,7 +445,10 @@ void HandleActionAttack(COrder& order, CUnit &unit)
|
|||
case MOVE_TO_TARGET:
|
||||
case MOVE_TO_TARGET + WEAK_TARGET:
|
||||
if (!unit.CanMove()) {
|
||||
unit.RestoreOrder();
|
||||
if (!unit.RestoreOrder()) {
|
||||
unit.ClearAction();
|
||||
unit.State = 0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
MoveToTarget(unit);
|
||||
|
|
|
@ -337,7 +337,7 @@ void CommandAttackGround(CUnit &unit, const Vec2i &pos, int flush)
|
|||
}
|
||||
COrderPtr *order;
|
||||
|
||||
if (unit.Type->CanAttack) {
|
||||
if (!unit.Type->CanAttack) {
|
||||
ClearNewAction(unit);
|
||||
order = &unit.NewOrder;
|
||||
} else {
|
||||
|
|
|
@ -953,7 +953,7 @@ struct CResourceDepositFinder {
|
|||
class CPreference {
|
||||
public:
|
||||
CPreference() : ShowSightRange(false), ShowReactionRange(false),
|
||||
ShowAttackRange(false), ShowMessages(false),
|
||||
ShowAttackRange(false), ShowMessages(true),
|
||||
BigScreen(false),ShowOrders(0) {};
|
||||
|
||||
bool ShowSightRange; /// Show sight range.
|
||||
|
|
Loading…
Add table
Reference in a new issue