--- a/hedgewars/uTeams.pas Mon May 28 10:38:27 2012 +0200
+++ b/hedgewars/uTeams.pas Tue Jun 05 22:17:06 2012 +0200
@@ -248,8 +248,6 @@
FollowGear:= Gear
end;
-ResetKbd;
-
if (GameFlags and gfDisableWind) = 0 then
begin
cWindSpeed:= rndSign(GetRandomf * 2 * cMaxWindSpeed);
@@ -482,6 +480,7 @@
procedure chAddHH(var id: shortstring);
var s: shortstring;
Gear: PGear;
+ c: LongInt;
begin
s:= '';
if (not isDeveloperMode) or (CurrentTeam = nil) then
@@ -490,10 +489,10 @@
begin
SplitBySpace(id, s);
CurrentHedgehog:= @Hedgehogs[HedgehogsNumber];
- val(id, CurrentHedgehog^.BotLevel);
+ val(id, CurrentHedgehog^.BotLevel, c);
Gear:= AddGear(0, 0, gtHedgehog, 0, _0, _0, 0);
SplitBySpace(s, id);
- val(s, Gear^.Health);
+ val(s, Gear^.Health, c);
TryDo(Gear^.Health > 0, 'Invalid hedgehog health', true);
Gear^.Hedgehog^.Team:= CurrentTeam;
if (GameFlags and gfSharedAmmo) <> 0 then
@@ -514,6 +513,7 @@
procedure chAddTeam(var s: shortstring);
var Color: Longword;
+ c: LongInt;
ts, cs: shortstring;
begin
cs:= '';
@@ -522,7 +522,7 @@
begin
SplitBySpace(s, cs);
SplitBySpace(cs, ts);
- val(cs, Color);
+ val(cs, Color, c);
TryDo(Color <> 0, 'Error: black team color', true);
// color is always little endian so the mask must be constant also in big endian archs
@@ -539,15 +539,15 @@
procedure chSetHHCoords(var x: shortstring);
var y: shortstring;
- t: Longint;
+ t, c: Longint;
begin
y:= '';
if (not isDeveloperMode) or (CurrentHedgehog = nil) or (CurrentHedgehog^.Gear = nil) then
exit;
SplitBySpace(x, y);
-val(x, t);
+val(x, t, c);
CurrentHedgehog^.Gear^.X:= int2hwFloat(t);
-val(y, t);
+val(y, t, c);
CurrentHedgehog^.Gear^.Y:= int2hwFloat(t)
end;