hedgewars/uGears.pas
changeset 4455 a0c8779713f2
parent 4443 d393b9ccd328
child 4465 743673c67d0c
equal deleted inserted replaced
4454:42bfc1a70968 4455:a0c8779713f2
   533                     team^.Clan^.Teams[i]^.hasGone:= true;
   533                     team^.Clan^.Teams[i]^.hasGone:= true;
   534                     TeamGoneEffect(team^.Clan^.Teams[i]^)
   534                     TeamGoneEffect(team^.Clan^.Teams[i]^)
   535                     end
   535                     end
   536             end;
   536             end;
   537         inc(KilledHHs);
   537         inc(KilledHHs);
   538         RecountTeamHealth(team)
   538         RecountTeamHealth(team);
       
   539         if (CurrentHedgehog <> nil) and CurrentHedgehog^.Effects[heResurrectable] and not Gear^.Hedgehog^.Effects[heResurrectable] then
       
   540             with CurrentHedgehog^ do 
       
   541                 begin
       
   542                 inc(Team^.stats.AIKills);
       
   543                 if Team^.AIKillsTex <> nil then FreeTexture(Team^.AIKillsTex);
       
   544                 Team^.AIKillsTex := RenderStringTex(inttostr(Team^.stats.AIKills), Team^.Clan^.Color, fnt16);
       
   545                 end
   539         end;
   546         end;
   540 {$IFDEF DEBUGFILE}
   547 {$IFDEF DEBUGFILE}
   541 with Gear^ do AddFileLog('Delete: #' + inttostr(uid) + ' (' + inttostr(hwRound(x)) + ',' + inttostr(hwRound(y)) + '), d(' + floattostr(dX) + ',' + floattostr(dY) + ') type = ' + EnumToStr(Kind));
   548 with Gear^ do AddFileLog('Delete: #' + inttostr(uid) + ' (' + inttostr(hwRound(x)) + ',' + inttostr(hwRound(y)) + '), d(' + floattostr(dX) + ',' + floattostr(dY) + ') type = ' + EnumToStr(Kind));
   542 {$ENDIF}
   549 {$ENDIF}
   543 
   550 
  1449     gear^.dX := _0;
  1456     gear^.dX := _0;
  1450     gear^.dY := _0;
  1457     gear^.dY := _0;
  1451     gear^.State := gstWait;
  1458     gear^.State := gstWait;
  1452     uStats.HedgehogDamaged(gear);
  1459     uStats.HedgehogDamaged(gear);
  1453     gear^.Damage := 0;
  1460     gear^.Damage := 0;
  1454     gear^.Health := 100;
  1461     gear^.Health := gear^.Hedgehog^.InitialHealth;
  1455     with CurrentHedgehog^ do begin
  1462     gear^.Hedgehog^.Effects[hePoisoned] := false;
  1456         inc(Team^.stats.AIKills);
  1463     if not CurrentHedgehog^.Effects[heResurrectable] then
  1457         if Team^.AIKillsTex <> nil then FreeTexture(Team^.AIKillsTex);
  1464         with CurrentHedgehog^ do 
  1458         Team^.AIKillsTex := RenderStringTex(inttostr(Team^.stats.AIKills), Team^.Clan^.Color, fnt16);
  1465             begin
  1459     end;
  1466             inc(Team^.stats.AIKills);
       
  1467             if Team^.AIKillsTex <> nil then FreeTexture(Team^.AIKillsTex);
       
  1468             Team^.AIKillsTex := RenderStringTex(inttostr(Team^.stats.AIKills), Team^.Clan^.Color, fnt16);
       
  1469             end;
  1460     tempTeam := gear^.Hedgehog^.Team;
  1470     tempTeam := gear^.Hedgehog^.Team;
  1461     DeleteCI(gear);
  1471     DeleteCI(gear);
  1462     FindPlace(gear, false, 0, LAND_WIDTH, true); 
  1472     FindPlace(gear, false, 0, LAND_WIDTH, true); 
  1463     if gear <> nil then begin
  1473     if gear <> nil then begin
  1464         RenderHealth(gear^.Hedgehog^);
  1474         RenderHealth(gear^.Hedgehog^);