Skip to content

Commit d71978c

Browse files
FIX: hero control glitch
1 parent e725984 commit d71978c

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

client/uctd.pas

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,19 +1188,20 @@
11881188
Else Begin
11891189
// Der Spieler hat ins "Leere" geklickt und wählt damit das Gebäude wieder ab
11901190
// Das ist genau gleich wie bei Tctd.FOnMouseUp
1191-
FSideMenuObject := Nil;
1192-
If assigned(fBuyingObject) Then fBuyingObject.free;
1193-
FBuyingObject := Nil;
1194-
fSelectedBuildings := Nil;
1195-
fStrategyToolTipp := '';
1196-
// Der Spieler will Heroes an neue Koords schicken !
1197-
If assigned(fSelectedHeroes) Then Begin
1198-
If uctd_common.PointInRect(point(x, y), rect(fMapL, fMapT, fMapL + fMapW, fMapT + fMapH)) Then Begin
1199-
xs := (fsx + x - fMapL) / MapBlockSize;
1200-
ys := (fsy + y - fMapT) / MapBlockSize;
1201-
SetheroTargets(xs, ys);
1202-
exit; // Sonst würden die Heroes abgewählt werden, dass soll der User via Rechte Maus machen !
1203-
End;
1191+
If assigned(fSelectedHeroes)
1192+
And uctd_common.PointInRect(point(x, y), rect(fMapL, fMapT, fMapL + fMapW, fMapT + fMapH)) Then Begin
1193+
// Der Spieler will Heroes an neue Koords schicken !
1194+
xs := (fsx + x - fMapL) / MapBlockSize;
1195+
ys := (fsy + y - fMapT) / MapBlockSize;
1196+
SetheroTargets(xs, ys);
1197+
exit; // Sonst würden die Heroes abgewählt werden, dass soll der User via Rechte Maus machen !
1198+
End
1199+
Else Begin
1200+
FSideMenuObject := Nil;
1201+
If assigned(fBuyingObject) Then fBuyingObject.free;
1202+
FBuyingObject := Nil;
1203+
fSelectedBuildings := Nil;
1204+
fStrategyToolTipp := '';
12041205
End;
12051206
End;
12061207
End;

units/uctd_common.pas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@
134134
* Reduce Speedup in CPU-Overload situations
135135
* 0.14001 = FIX: info font color in white mode (not readable)
136136
* 0.14002 = ADD: Feature Show Opponent Waypoints on Wave Start
137+
* FIX: Hero control glitch
137138
* Known Bugs :
138139
*)
139140
(*

0 commit comments

Comments
 (0)