summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ee38d13)
raw | patch | inline | side by side (parent: ee38d13)
author | Joseph Stalin <granminigun@pm.me> | |
Tue, 6 Aug 2019 18:23:17 +0000 (23:23 +0500) | ||
committer | Joseph Stalin <granminigun@pm.me> | |
Thu, 8 Aug 2019 20:37:10 +0000 (01:37 +0500) |
Even if player has max HP for that medkit type.
No additional HP granted.
No additional HP granted.
src/game/g_player.pas | patch | blob | history |
diff --git a/src/game/g_player.pas b/src/game/g_player.pas
index b9a9d38c23bad348ce87ed0dd3441e44335d3a65..3549b11b2b5b56a036d448b2939bd7a01787b194 100644 (file)
--- a/src/game/g_player.pas
+++ b/src/game/g_player.pas
case ItemType of
ITEM_MEDKIT_SMALL:
- if FHealth < PLAYER_HP_SOFT then
+ if (FHealth < PLAYER_HP_SOFT) or (FFireTime > 0) then
begin
- IncMax(FHealth, 10, PLAYER_HP_SOFT);
+ if FHealth < PLAYER_HP_SOFT then IncMax(FHealth, 10, PLAYER_HP_SOFT);
Result := True;
remove := True;
FFireTime := 0;
end;
ITEM_MEDKIT_LARGE:
- if FHealth < PLAYER_HP_SOFT then
+ if (FHealth < PLAYER_HP_SOFT) or (FFireTime > 0) then
begin
- IncMax(FHealth, 25, PLAYER_HP_SOFT);
+ if FHealth < PLAYER_HP_SOFT then IncMax(FHealth, 25, PLAYER_HP_SOFT);
Result := True;
remove := True;
FFireTime := 0;
end;
ITEM_SPHERE_BLUE:
- if FHealth < PLAYER_HP_LIMIT then
+ if (FHealth < PLAYER_HP_LIMIT) or (FFireTime > 0) then
begin
- IncMax(FHealth, 100, PLAYER_HP_LIMIT);
+ if FHealth < PLAYER_HP_LIMIT then IncMax(FHealth, 100, PLAYER_HP_LIMIT);
Result := True;
remove := True;
FFireTime := 0;
end;
ITEM_SPHERE_WHITE:
- if (FHealth < PLAYER_HP_LIMIT) or (FArmor < PLAYER_AP_LIMIT) then
+ if (FHealth < PLAYER_HP_LIMIT) or (FArmor < PLAYER_AP_LIMIT) or (FFireTime > 0) then
begin
if FHealth < PLAYER_HP_LIMIT then
FHealth := PLAYER_HP_LIMIT;
remove := True;
FFireTime := 0;
end;
- if FHealth < PLAYER_HP_SOFT then
+ if (FHealth < PLAYER_HP_SOFT) or (FFireTime > 0) then
begin
- FHealth := PLAYER_HP_SOFT;
+ if FHealth < PLAYER_HP_SOFT then FHealth := PLAYER_HP_SOFT;
FBerserk := gTime+30000;
Result := True;
remove := True;
end;
ITEM_BOTTLE:
- if FHealth < PLAYER_HP_LIMIT then
+ if (FHealth < PLAYER_HP_LIMIT) or (FFireTime > 0) then
begin
- IncMax(FHealth, 4, PLAYER_HP_LIMIT);
+ if FHealth < PLAYER_HP_LIMIT then IncMax(FHealth, 4, PLAYER_HP_LIMIT);
Result := True;
remove := True;
FFireTime := 0;