hedgewars/uGears.pas
changeset 3337 75e7455c69ed
parent 3334 f94a52a763d4
child 3342 b4f01613dcd7
equal deleted inserted replaced
3336:d7c1ffed1e15 3337:75e7455c69ed
   223 const Counter: Longword = 0;
   223 const Counter: Longword = 0;
   224 var gear: PGear;
   224 var gear: PGear;
   225 begin
   225 begin
   226 inc(Counter);
   226 inc(Counter);
   227 {$IFDEF DEBUGFILE}
   227 {$IFDEF DEBUGFILE}
   228 AddFileLog('AddGear: #' + inttostr(Counter) + ' (' + inttostr(x) + ',' + inttostr(y) + '), d(' + floattostr(dX) + ',' + floattostr(dY) + ') type = ' + inttostr(ord(Kind)));
   228 AddFileLog('AddGear: #' + inttostr(Counter) + ' (' + inttostr(x) + ',' + inttostr(y) + '), d(' + floattostr(dX) + ',' + floattostr(dY) + ') type = ' + EnumToStr(Kind));
   229 {$ENDIF}
   229 {$ENDIF}
   230 
   230 
   231 New(gear);
   231 New(gear);
   232 FillChar(gear^, sizeof(TGear), 0);
   232 FillChar(gear^, sizeof(TGear), 0);
   233 gear^.X:= int2hwFloat(X);
   233 gear^.X:= int2hwFloat(X);
   526             end;
   526             end;
   527         inc(KilledHHs);
   527         inc(KilledHHs);
   528         RecountTeamHealth(team)
   528         RecountTeamHealth(team)
   529         end;
   529         end;
   530 {$IFDEF DEBUGFILE}
   530 {$IFDEF DEBUGFILE}
   531 with Gear^ do AddFileLog('Delete: #' + inttostr(uid) + ' (' + inttostr(hwRound(x)) + ',' + inttostr(hwRound(y)) + '), d(' + floattostr(dX) + ',' + floattostr(dY) + ') type = ' + inttostr(ord(Kind)));
   531 with Gear^ do AddFileLog('Delete: #' + inttostr(uid) + ' (' + inttostr(hwRound(x)) + ',' + inttostr(hwRound(y)) + '), d(' + floattostr(dX) + ',' + floattostr(dY) + ') type = ' + EnumToStr(Kind));
   532 {$ENDIF}
   532 {$ENDIF}
   533 
   533 
   534 if CurAmmoGear = Gear then CurAmmoGear:= nil;
   534 if CurAmmoGear = Gear then CurAmmoGear:= nil;
   535 if FollowGear = Gear then FollowGear:= nil;
   535 if FollowGear = Gear then FollowGear:= nil;
   536 RemoveGearFromList(Gear);
   536 RemoveGearFromList(Gear);