# HG changeset patch # User sheepluva # Date 1506722988 -7200 # Node ID ef780eda6e48e87f06cfa81bbe275bb678aade6b # Parent 95f0e475ca8ea94173c0958ff0c0febc86ac075e pas2c happiness initiative 2017, continued diff -r 95f0e475ca8e -r ef780eda6e48 hedgewars/uGearsHedgehog.pas --- a/hedgewars/uGearsHedgehog.pas Fri Sep 29 23:31:29 2017 +0200 +++ b/hedgewars/uGearsHedgehog.pas Sat Sep 30 00:09:48 2017 +0200 @@ -693,7 +693,7 @@ cnt:= Ammoz[ammo].NumberInCase; if (ammo = amNothing) or (cnt = 0) then - s:= ansistring(trmsg[sidEmptyCrate]) + s:= trmsg[sidEmptyCrate] else if cnt >= AMMO_INFINITE then s:= name + ansistring(' (+∞)') else diff -r 95f0e475ca8e -r ef780eda6e48 hedgewars/uGearsUtils.pas --- a/hedgewars/uGearsUtils.pas Fri Sep 29 23:31:29 2017 +0200 +++ b/hedgewars/uGearsUtils.pas Sat Sep 30 00:09:48 2017 +0200 @@ -709,10 +709,10 @@ if isDirH then begin tmp:= hwRound(Gear^.X - Gear^.dX); - if abs(tmp - leftX) < abs(tmp - rightX) then // left edge - isImpact:= (abs(tmp-leftX) >= Gear^.Radius) and (Gear^.dX.isNegative) + if abs(tmp - real(leftX)) < abs(tmp - real(rightX)) then // left edge + isImpact:= (abs(tmp-real(leftX)) >= Gear^.Radius) and (Gear^.dX.isNegative) else - isImpact:= (abs(tmp-rightX) >= Gear^.Radius) and (not Gear^.dX.isNegative); + isImpact:= (abs(tmp-real(rightX)) >= Gear^.Radius) and (not Gear^.dX.isNegative); end else begin diff -r 95f0e475ca8e -r ef780eda6e48 hedgewars/uScript.pas --- a/hedgewars/uScript.pas Fri Sep 29 23:31:29 2017 +0200 +++ b/hedgewars/uScript.pas Sat Sep 30 00:09:48 2017 +0200 @@ -2101,27 +2101,27 @@ lua_newtable(L); - lua_pushstring(L, 'Kills'); + lua_pushstring(L, str2pchar('Kills')); lua_pushnumber(L, TeamsArray[i]^.stats.Kills); lua_settable(L, -3); - lua_pushstring(L, 'Suicides'); + lua_pushstring(L, str2pchar('Suicides')); lua_pushnumber(L, TeamsArray[i]^.stats.Suicides); lua_settable(L, -3); - lua_pushstring(L, 'AIKills'); + lua_pushstring(L, str2pchar('AIKills')); lua_pushnumber(L, TeamsArray[i]^.stats.AIKills); lua_settable(L, -3); - lua_pushstring(L, 'TeamKills'); + lua_pushstring(L, str2pchar('TeamKills')); lua_pushnumber(L, TeamsArray[i]^.stats.TeamKills); lua_settable(L, -3); - lua_pushstring(L, 'TurnSkips'); + lua_pushstring(L, str2pchar('TurnSkips')); lua_pushnumber(L, TeamsArray[i]^.stats.TurnSkips); lua_settable(L, -3); - lua_pushstring(L, 'TeamDamage'); + lua_pushstring(L, str2pchar('TeamDamage')); lua_pushnumber(L, TeamsArray[i]^.stats.TeamDamage); lua_settable(L, -3);