hedgewars/uGears.pas
branchphysfslayer
changeset 7928 88fde28bbda6
parent 7882 35dfc54ba2c6
child 7988 4b428183d946
equal deleted inserted replaced
7778:3331b30e4ef1 7928:88fde28bbda6
    31  *
    31  *
    32  * Note: Gears that do not have an effect on the game but are just visual
    32  * Note: Gears that do not have an effect on the game but are just visual
    33  *       effects are called "Visual Gears" and defined in the respective unit!
    33  *       effects are called "Visual Gears" and defined in the respective unit!
    34  *)
    34  *)
    35 interface
    35 interface
    36 uses SDLh, uConsts, uFloat, uTypes, uLandObjects;
    36 uses SDLh, uConsts, uFloat, uTypes;
    37 
    37 
    38 procedure initModule;
    38 procedure initModule;
    39 procedure freeModule;
    39 procedure freeModule;
    40 function  SpawnCustomCrateAt(x, y: LongInt; crate: TCrateType; content, cnt: Longword): PGear;
    40 function  SpawnCustomCrateAt(x, y: LongInt; crate: TCrateType; content, cnt: Longword): PGear;
    41 function  SpawnFakeCrateAt(x, y: LongInt; crate: TCrateType; explode: boolean; poison: boolean ): PGear;
    41 function  SpawnFakeCrateAt(x, y: LongInt; crate: TCrateType; explode: boolean; poison: boolean ): PGear;
   109                 Gear^.Active:= true;
   109                 Gear^.Active:= true;
   110                 Gear^.Health:= 0
   110                 Gear^.Health:= 0
   111                 end
   111                 end
   112             else
   112             else
   113                 dec(Gear^.Health, dmg);
   113                 dec(Gear^.Health, dmg);
   114 
   114 (*
       
   115 This doesn't fit well w/ the new loser sprite which is cringing from an attack.
   115             if (Gear^.Hedgehog^.Team = CurrentTeam) and (Gear^.Damage <> Gear^.Karma)
   116             if (Gear^.Hedgehog^.Team = CurrentTeam) and (Gear^.Damage <> Gear^.Karma)
   116             and (not Gear^.Hedgehog^.King) and (Gear^.Hedgehog^.Effects[hePoisoned] = 0) and (not SuddenDeathDmg) then
   117             and (not Gear^.Hedgehog^.King) and (Gear^.Hedgehog^.Effects[hePoisoned] = 0) and (not SuddenDeathDmg) then
   117                 Gear^.State:= Gear^.State or gstLoser;
   118                 Gear^.State:= Gear^.State or gstLoser;
       
   119 *)
   118 
   120 
   119             spawnHealthTagForHH(Gear, dmg);
   121             spawnHealthTagForHH(Gear, dmg);
   120 
   122 
   121             RenderHealth(Gear^.Hedgehog^);
   123             RenderHealth(Gear^.Hedgehog^);
   122             RecountTeamHealth(Gear^.Hedgehog^.Team);
   124             RecountTeamHealth(Gear^.Hedgehog^.Team);
  1221 
  1223 
  1222 
  1224 
  1223 procedure chSkip(var s: shortstring);
  1225 procedure chSkip(var s: shortstring);
  1224 begin
  1226 begin
  1225 s:= s; // avoid compiler hint
  1227 s:= s; // avoid compiler hint
  1226 if not CurrentTeam^.ExtDriven then
  1228 if not isExternalSource then
  1227     SendIPC(_S',');
  1229     SendIPC(_S',');
  1228 uStats.Skipped;
  1230 uStats.Skipped;
  1229 skipFlag:= true
  1231 skipFlag:= true
  1230 end;
  1232 end;
  1231 
  1233