X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_player.pas;h=3549b11b2b5b56a036d448b2939bd7a01787b194;hb=040b89b2d725edd90f7e3d3726bbbb8af02d8315;hp=6bfc34c0de5302e5291f7d323429e2df16249fbb;hpb=06667349c1efd05099ff0617dfdf17dc7a097828;p=d2df-sdl.git diff --git a/src/game/g_player.pas b/src/game/g_player.pas index 6bfc34c..3549b11 100644 --- a/src/game/g_player.pas +++ b/src/game/g_player.pas @@ -2328,12 +2328,12 @@ var begin if FAlive then begin - indX := FObj.X+FObj.Rect.X; - indY := FObj.Y; if g_Texture_Get('TEXTURE_PLAYER_INDICATOR', ID) then begin e_GetTextureSize(ID, @indW, @indH); - e_Draw(ID, indX + indW div 2, indY - indH, 0, True, False); + indX := FObj.X + FObj.Rect.X + (FObj.Rect.Width - indW) div 2; + indY := FObj.Y; + e_Draw(ID, indX, indY - indH, 0, True, False); end; end; //e_TextureFontPrint(indX, indY, FName, gStdFont); // Shows player name overhead @@ -3195,7 +3195,7 @@ begin exit; // Íå çàãîðàåìñÿ êîãäà åñòü çàùèòà if FFireTime <= 0 then g_Sound_PlayExAt('SOUND_IGNITE', FObj.X, FObj.Y); - FFireTime := 100; + FFireTime := 110; FFireAttacker := Attacker; if g_Game_IsNet and g_Game_IsServer then MH_SEND_PlayerStats(FUID); @@ -3851,9 +3851,9 @@ begin 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; @@ -3861,9 +3861,9 @@ begin 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; @@ -3889,9 +3889,9 @@ begin 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; @@ -3899,7 +3899,7 @@ begin 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; @@ -4104,7 +4104,7 @@ begin (FAmmo[A_SHELLS] < FMaxAmmo[A_SHELLS]) or (FAmmo[A_ROCKETS] < FMaxAmmo[A_ROCKETS]) or (FAmmo[A_CELLS] < FMaxAmmo[A_CELLS]) or - (FMaxAmmo[A_FUEL] < AmmoLimits[1, A_FUEL]) then + (FAmmo[A_FUEL] < FMaxAmmo[A_FUEL]) then begin FMaxAmmo[A_BULLETS] := AmmoLimits[1, A_BULLETS]; FMaxAmmo[A_SHELLS] := AmmoLimits[1, A_SHELLS]; @@ -4120,6 +4120,8 @@ begin IncMax(FAmmo[A_ROCKETS], 1, FMaxAmmo[A_ROCKETS]); if FAmmo[A_CELLS] < FMaxAmmo[A_CELLS] then IncMax(FAmmo[A_CELLS], 40, FMaxAmmo[A_CELLS]); + if FAmmo[A_FUEL] < FMaxAmmo[A_FUEL] then + IncMax(FAmmo[A_FUEL], 50, FMaxAmmo[A_FUEL]); FRulez := FRulez + [R_ITEM_BACKPACK]; Result := True; @@ -4197,9 +4199,9 @@ begin 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; @@ -4217,9 +4219,9 @@ begin 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; @@ -5276,11 +5278,13 @@ begin if FFirePainTime <= 0 then begin if g_Game_IsServer then - Damage(6, FFireAttacker, 0, 0, HIT_FLAME); - FFirePainTime := 18; + Damage(2, FFireAttacker, 0, 0, HIT_FLAME); + FFirePainTime := 12 - FFireTime div 12; end; FFirePainTime := FFirePainTime - 1; FFireTime := FFireTime - 1; + if ((FFireTime mod 33) = 0) and (FMegaRulez[MR_INVUL] < gTime) then + FModel.PlaySound(MODELSOUND_PAIN, 1, FObj.X, FObj.Y); if (FFireTime = 0) and g_Game_IsNet and g_Game_IsServer then MH_SEND_PlayerStats(FUID); end; @@ -5312,7 +5316,7 @@ begin else if FHealth > -50 then Kill(K_HARDKILL, FLastSpawnerUID, FLastHit) else Kill(K_EXTRAHARDKILL, FLastSpawnerUID, FLastHit); - if FAlive then + if FAlive and ((FLastHit <> HIT_FLAME) or (FFireTime <= 0)) then begin if FDamageBuffer <= 20 then FModel.PlaySound(MODELSOUND_PAIN, 1, FObj.X, FObj.Y) else if FDamageBuffer <= 55 then FModel.PlaySound(MODELSOUND_PAIN, 2, FObj.X, FObj.Y)