hedgewars/uGearsUtils.pas
changeset 10124 aabd1b75d5a3
parent 10116 dd27562b6f21
child 10160 4608f10ae65f
equal deleted inserted replaced
10123:64e72781d344 10124:aabd1b75d5a3
   232                     // was considering pulsing on attack, Tiy thinks it should be permanent while in play
   232                     // was considering pulsing on attack, Tiy thinks it should be permanent while in play
   233                     //CurrentHedgehog^.Gear^.State:= CurrentHedgehog^.Gear^.State or gstVampiric;
   233                     //CurrentHedgehog^.Gear^.State:= CurrentHedgehog^.Gear^.State or gstVampiric;
   234                     inc(CurrentHedgehog^.Gear^.Health,vampDmg);
   234                     inc(CurrentHedgehog^.Gear^.Health,vampDmg);
   235                     str(vampDmg, s);
   235                     str(vampDmg, s);
   236                     s:= '+' + s;
   236                     s:= '+' + s;
   237                     AddCaption(s, CurrentHedgehog^.Team^.Clan^.Color, capgrpAmmoinfo);
   237                     AddCaption(ansistring(s), CurrentHedgehog^.Team^.Clan^.Color, capgrpAmmoinfo);
   238                     RenderHealth(CurrentHedgehog^);
   238                     RenderHealth(CurrentHedgehog^);
   239                     RecountTeamHealth(CurrentHedgehog^.Team);
   239                     RecountTeamHealth(CurrentHedgehog^.Team);
   240                     i:= 0;
   240                     i:= 0;
   241                     while i < vampDmg do
   241                     while i < vampDmg do
   242                         begin
   242                         begin
   362     skipSpeed, skipAngle, skipDecay: hwFloat;
   362     skipSpeed, skipAngle, skipDecay: hwFloat;
   363     i, maxDrops, X, Y: LongInt;
   363     i, maxDrops, X, Y: LongInt;
   364     vdX, vdY: real;
   364     vdX, vdY: real;
   365     particle, splash: PVisualGear;
   365     particle, splash: PVisualGear;
   366     isSubmersible: boolean;
   366     isSubmersible: boolean;
       
   367     s: ansistring;
   367 begin
   368 begin
   368     // probably needs tweaking. might need to be in a case statement based upon gear type
   369     // probably needs tweaking. might need to be in a case statement based upon gear type
   369     Y:= hwRound(Gear^.Y);
   370     Y:= hwRound(Gear^.Y);
   370     if cWaterLine < Y + Gear^.Radius then
   371     if cWaterLine < Y + Gear^.Radius then
   371         begin
   372         begin
   417                             end
   418                             end
   418                         else
   419                         else
   419                             begin
   420                             begin
   420                             Gear^.doStep := @doStepDrowningGear;
   421                             Gear^.doStep := @doStepDrowningGear;
   421                             Gear^.State := Gear^.State and (not gstHHDriven);
   422                             Gear^.State := Gear^.State and (not gstHHDriven);
   422                             AddCaption(Format(GetEventString(eidDrowned), Gear^.Hedgehog^.Name), cWhiteColor, capgrpMessage);
   423                             s:= ansistring(Gear^.Hedgehog^.Name);
       
   424                             AddCaption(FormatA(GetEventString(eidDrowned), s), cWhiteColor, capgrpMessage);
   423                             end
   425                             end
   424                         end
   426                         end
   425                     else
   427                     else
   426                         Gear^.doStep := @doStepDrowningGear;
   428                         Gear^.doStep := @doStepDrowningGear;
   427                         if Gear^.Kind = gtFlake then
   429                         if Gear^.Kind = gtFlake then
   515           and (Gear^.Hedgehog^.Team^.Clan <> CurrentHedgehog^.Team^.Clan)) then
   517           and (Gear^.Hedgehog^.Team^.Clan <> CurrentHedgehog^.Team^.Clan)) then
   516         with CurrentHedgehog^ do
   518         with CurrentHedgehog^ do
   517             begin
   519             begin
   518             inc(Team^.stats.AIKills);
   520             inc(Team^.stats.AIKills);
   519             FreeTexture(Team^.AIKillsTex);
   521             FreeTexture(Team^.AIKillsTex);
   520             Team^.AIKillsTex := RenderStringTex(inttostr(Team^.stats.AIKills), Team^.Clan^.Color, fnt16);
   522             Team^.AIKillsTex := RenderStringTex(ansistring(inttostr(Team^.stats.AIKills)), Team^.Clan^.Color, fnt16);
   521             end;
   523             end;
   522     tempTeam := gear^.Hedgehog^.Team;
   524     tempTeam := gear^.Hedgehog^.Team;
   523     DeleteCI(gear);
   525     DeleteCI(gear);
   524     gX := hwRound(gear^.X);
   526     gX := hwRound(gear^.X);
   525     gY := hwRound(gear^.Y);
   527     gY := hwRound(gear^.Y);