947 |
947 |
948 if (Gear <> nil) then |
948 if (Gear <> nil) then |
949 begin |
949 begin |
950 if (GameFlags and gfInvulnerable) = 0 then |
950 if (GameFlags and gfInvulnerable) = 0 then |
951 Gear^.Invulnerable:= false; |
951 Gear^.Invulnerable:= false; |
952 if (GameFlags and gfResetHealth) <> 0 then |
|
953 begin |
|
954 if Gear^.Health < InitialHealth then |
|
955 begin |
|
956 Gear^.Health:= InitialHealth; |
|
957 RenderHealth(CurrentHedgehog^); |
|
958 end; |
|
959 end; |
|
960 end; |
952 end; |
961 end; |
953 end; |
962 t:= GearsList; |
954 t:= GearsList; |
963 while t <> nil do |
955 while t <> nil do |
964 begin |
956 begin |
965 t^.PortalCounter:= 0; |
957 t^.PortalCounter:= 0; |
|
958 if ((GameFlags and gfResetHealth) <> 0) and (t^.Kind = gtHedgehog) and (t^.Health < PHedgehog(t^.Hedgehog)^.InitialHealth) then |
|
959 begin |
|
960 t^.Health:= PHedgehog(t^.Hedgehog)^.InitialHealth; |
|
961 RenderHealth(PHedgehog(t^.Hedgehog)^); |
|
962 end; |
966 t:= t^.NextGear |
963 t:= t^.NextGear |
967 end; |
964 end; |
968 |
965 |
969 if (GameFlags and gfResetWeps) <> 0 then |
966 if (GameFlags and gfResetWeps) <> 0 then |
970 ResetWeapons; |
967 ResetWeapons; |
|
968 |
971 if (GameFlags and gfResetHealth) <> 0 then |
969 if (GameFlags and gfResetHealth) <> 0 then |
972 RecountTeamHealth(CurrentTeam); |
970 for i:= 0 to Pred(TeamsCount) do |
|
971 RecountTeamHealth(TeamsArray[i]) |
973 end; |
972 end; |
974 |
973 |
975 procedure ApplyDamage(Gear: PGear; Damage: Longword; Source: TDamageSource); |
974 procedure ApplyDamage(Gear: PGear; Damage: Longword; Source: TDamageSource); |
976 var s: shortstring; |
975 var s: shortstring; |
977 vampDmg, tmpDmg, i: Longword; |
976 vampDmg, tmpDmg, i: Longword; |