--- a/hedgewars/uGearsRender.pas Sun Jan 19 00:18:28 2014 +0400
+++ b/hedgewars/uGearsRender.pas Tue Jan 21 22:38:13 2014 +0100
@@ -23,6 +23,18 @@
interface
uses uTypes, uConsts, GLunit, uFloat, SDLh;
+type
+ Tar = record
+ X, Y: hwFloat;
+ dLen: hwFloat;
+ b : boolean;
+ end;
+ TRopePoints = record
+ Count : Longword;
+ HookAngle : GLfloat;
+ ar : array[0..MAXROPEPOINTS] of Tar;
+ rounded : array[0..MAXROPEPOINTS + 2] of TVertex2f;
+ end;
procedure RenderGear(Gear: PGear; x, y: LongInt);
var RopePoints: record
@@ -83,6 +95,7 @@
if (X1 = X2) and (Y1 = Y2) then
begin
//OutError('WARNING: zero length rope line!', false);
+ DrawRopeLine:= 0;
exit
end;
eX:= 0;
@@ -143,7 +156,7 @@
DrawSprite(sprRopeNode, x - 2, y - 2, 0)
end
end;
-DrawRopeLine:= roplen;
+ DrawRopeLine:= roplen;
end;
procedure DrawRope(Gear: PGear);
@@ -1268,7 +1281,7 @@
begin
if isInLag and (Gear^.FlightTime < 256) then
inc(Gear^.FlightTime, 8)
- else if not isInLag and (Gear^.FlightTime > 0) then
+ else if (not isInLag) and (Gear^.FlightTime > 0) then
dec(Gear^.FlightTime, 8);
if Gear^.FlightTime > 0 then
Tint($FF, $FF, $FF, $FF-min(255,Gear^.FlightTime));