--- a/hedgewars/uVisualGears.pas Tue May 01 20:54:30 2012 +0400
+++ b/hedgewars/uVisualGears.pas Tue May 01 19:56:55 2012 +0200
@@ -113,7 +113,6 @@
);
function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType; State: LongWord = 0; Critical: Boolean = false): PVisualGear;
-const VGCounter: Longword = 0;
var gear: PVisualGear;
t: Longword;
sp: real;
@@ -980,6 +979,7 @@
procedure initModule;
var i: LongWord;
begin
+VGCounter:= 0;
for i:= 0 to 6 do
VisualGearLayers[i]:= nil;
end;
@@ -987,6 +987,7 @@
procedure freeModule;
var i: LongWord;
begin
+VGCounter:= 0;
for i:= 0 to 6 do
while VisualGearLayers[i] <> nil do DeleteVisualGear(VisualGearLayers[i]);
end;