hedgewars/uGears.pas
changeset 1503 a40b871d506b
parent 1495 2b2b89bdb5f3
child 1505 3a96e93572cb
--- a/hedgewars/uGears.pas	Tue Nov 18 15:43:03 2008 +0000
+++ b/hedgewars/uGears.pas	Thu Nov 20 15:18:38 2008 +0000
@@ -52,6 +52,7 @@
 			Z: Longword;
 			IntersectGear: PGear;
 			TriggerId: Longword;
+			uid: Longword;
 			end;
 
 function  AddGear(X, Y: LongInt; Kind: TGearType; State: Longword; dX, dY: hwFloat; Timer: LongWord): PGear;
@@ -185,7 +186,7 @@
 begin
 inc(Counter);
 {$IFDEF DEBUGFILE}
-AddFileLog('AddGear: (' + inttostr(x) + ',' + inttostr(y) + '), d(' + floattostr(dX) + ',' + floattostr(dY) + ') type = ' + inttostr(ord(Kind)));
+AddFileLog('AddGear: #' + inttostr(Counter) + ' (' + inttostr(x) + ',' + inttostr(y) + '), d(' + floattostr(dX) + ',' + floattostr(dY) + ') type = ' + inttostr(ord(Kind)));
 {$ENDIF}
 
 New(Result);
@@ -201,6 +202,7 @@
 Result^.CollisionIndex:= -1;
 Result^.Timer:= Timer;
 Result^.Z:= cUsualZ;
+Result^.uid:= Counter;
 
 if CurrentTeam <> nil then
    begin
@@ -382,7 +384,7 @@
 		end;
 
 {$IFDEF DEBUGFILE}
-with Gear^ do AddFileLog('Delete: (' + inttostr(hwRound(x)) + ',' + inttostr(hwRound(y)) + '), d(' + floattostr(dX) + ',' + floattostr(dY) + ') type = ' + inttostr(ord(Kind)));
+with Gear^ do AddFileLog('Delete: #' + inttostr(uid) + ' (' + inttostr(hwRound(x)) + ',' + inttostr(hwRound(y)) + '), d(' + floattostr(dX) + ',' + floattostr(dY) + ') type = ' + inttostr(ord(Kind)));
 {$ENDIF}
 
 if Gear^.TriggerId <> 0 then TickTrigger(Gear^.TriggerId);