From: TerminalHash Date: Mon, 28 Aug 2023 12:40:49 +0000 (+0300) Subject: game: cosmetic changes for stats X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=9f9f3134df288e1c3d288fe14ec9a397c663c6f6;p=d2df-sdl.git game: cosmetic changes for stats --- diff --git a/src/game/g_game.pas b/src/game/g_game.pas index 9e7b4a2..51044e4 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -1312,7 +1312,7 @@ begin e_TextureFontPrintEx(x+16, _y, s1, gStdFont, r, g, b, 1); e_TextureFontPrintEx(x+w1+16, _y, IntToStr(gTeamStat[a].Score), gStdFont, r, g, b, 1); - e_TextureFontPrintEx(x+w1+w2+16, _y, _lc[I_GAME_FRAGS], + e_TextureFontPrintEx(x+w1+w2, _y, _lc[I_GAME_FRAGS], gStdFont, r, g, b, 1); e_TextureFontPrintEx(x+w1+w2+72, _y, _lc[I_GAME_ASSISTS], gStdFont, r, g, b, 1); @@ -2923,8 +2923,8 @@ begin else e_TextureFontPrintEx(x+16, _y, Name, gStdFont, rr, gg, bb, 1); e_TextureFontPrintEx(x+w1+16, _y, IntToStr(Frags), gStdFont, rr, gg, bb, 1); - e_TextureFontPrintEx(x+w1+w2+16, _y, IntToStr(Assists), gStdFont, rr, gg, bb, 1); - e_TextureFontPrintEx(x+w1+w2+w3+16, _y, IntToStr(Deaths), gStdFont, rr, gg, bb, 1); + e_TextureFontPrintEx(x+w1+72, _y, IntToStr(Assists), gStdFont, rr, gg, bb, 1); + e_TextureFontPrintEx(x+w1+w2+16, _y, IntToStr(Deaths), gStdFont, rr, gg, bb, 1); _y := _y+24; end; diff --git a/src/game/g_player.pas b/src/game/g_player.pas index 4e5b60e..22813f1 100644 --- a/src/game/g_player.pas +++ b/src/game/g_player.pas @@ -161,7 +161,7 @@ type FKills: Integer; FMonsterKills: Integer; FFrags: Integer; - FAssists: Integer; + FAssists: Integer; FFragCombo: Byte; FLastFrag: LongWord; FComboEvnt: Integer; @@ -2861,10 +2861,12 @@ begin end; end; + // FRAGS s := IntToStr(p)+' / '+IntToStr(Length(stat))+' '; if Frags >= m then s := s+'+' else s := s+'-'; s := s+IntToStr(Abs(Frags-m)); + // ASSISTS t := IntToStr(p)+' / '+IntToStr(Length(stat))+' '; if Assists >= m then t := t+'+' else t := t+'-'; t := t+IntToStr(Abs(Assists-m)); @@ -3850,21 +3852,29 @@ begin FNextWeapDelay := 0; end; + // Assists block -procedure TPlayer.Assist(); +{procedure TPlayer.Assist(KillType: Byte; SpawnerUID: Word); var DoAssists: Boolean; + AP: TPlayer; + + procedure Accumulate(FDamage: Byte;); + begin + + end; + + begin DoAssists := (gGameSettings.GameMode = GM_TDM) or (gGameSettings.GameMode = GM_CTF); - - if (DoAssists or (gGameSettings.GameMode = GM_TDM)) then + if DoAssists then begin - if a = 4 then + if (FAccumulatedDamage >= 65) then begin - Inc(KP.FAssists); + Inc(AP.FAssists); end; end; -end; +end;} function TPlayer.hasAmmoForWeapon (weapon: Byte): Boolean;