--- a/hedgewars/uGearsRender.pas Sun Nov 11 16:53:16 2012 +0100
+++ b/hedgewars/uGearsRender.pas Sun Nov 11 17:15:19 2012 +0100
@@ -23,18 +23,21 @@
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
- Count: Longword;
- HookAngle: GLfloat;
- ar: array[0..MAXROPEPOINTS] of record
- X, Y: hwFloat;
- dLen: hwFloat;
- b: boolean;
- end;
- rounded: array[0..MAXROPEPOINTS + 2] of TVertex2f;
- end;
+var RopePoints: TRopePoints;
implementation
uses uRender, uUtils, uVariables, uAmmos, Math, uVisualGears;
@@ -82,6 +85,7 @@
if (X1 = X2) and (Y1 = Y2) then
begin
//OutError('WARNING: zero length rope line!', false);
+ DrawRopeLine := 0;
exit
end;
eX:= 0;
@@ -1165,7 +1169,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));