Changeset 274 for trunk/UClientGUI.pas
- Timestamp:
- Feb 3, 2019, 8:32:20 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UClientGUI.pas
r273 r274 352 352 if Assigned(SelectedCell) and (SelectedCell = Cell) then 353 353 Brush.Color := clGreen 354 else if Assigned(SelectedCell) and TGame(Game).Map.IsCellsNeighbor(SelectedCell.MapCell, Cell.MapCell) then354 else if Assigned(SelectedCell) and ControlPlayer.IsAllowedMoveTarget(SelectedCell, Cell) then 355 355 Brush.Color := clPurple 356 356 else if TGame(Game).FogOfWar then begin … … 616 616 if Assigned(NewSelectedCell) then begin 617 617 if Assigned(SelectedCell) and (NewSelectedCell <> SelectedCell) and 618 TGame(Game).Map.IsCellsNeighbor(NewSelectedCell.MapCell, SelectedCell.MapCell) then begin618 TGame(Game).CurrentPlayer.IsAllowedMoveTarget(SelectedCell, NewSelectedCell) then begin 619 619 if ssShift in ShiftState then begin 620 620 // Make maximum unit move without confirmation dialog … … 640 640 end; 641 641 end else 642 if (NewSelectedCell <> SelectedCell) and (NewSelectedCell.MapCell.Player = Player) then begin642 if not Assigned(SelectedCell) and (NewSelectedCell <> SelectedCell) and (NewSelectedCell.MapCell.Player = Player) then begin 643 643 SelectedCell := NewSelectedCell 644 644 end else
Note:
See TracChangeset
for help on using the changeset viewer.