summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4634097)
raw | patch | inline | side by side (parent: 4634097)
author | TerminalHash <lyashuk.voxx@gmail.com> | |
Mon, 28 Aug 2023 09:51:54 +0000 (12:51 +0300) | ||
committer | TerminalHash <lyashuk.voxx@gmail.com> | |
Mon, 28 Aug 2023 09:51:54 +0000 (12:51 +0300) |
and inc protocol version
src/game/g_game.pas | patch | blob | history | |
src/game/g_net.pas | patch | blob | history | |
src/game/g_player.pas | patch | blob | history |
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index 6a8d63ca9f944573bc507dfa267677c89f19aa8e..9e7b4a25e56e385a6204bc6ecfc113ef72ccbfe8 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
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],
+ gStdFont, r, g, b, 1);
+ e_TextureFontPrintEx(x+w1+w2+72, _y, _lc[I_GAME_ASSISTS],
+ gStdFont, r, g, b, 1);
_y := _y+ch+(ch div 4);
e_DrawLine(1, x+16, _y, x+w-16, _y, r, g, b);
// Ôðàãè
e_TextureFontPrintEx(x+w1+w2+16, _y, IntToStr(Frags), gStdFont, rr, gg, bb, 1);
// Àññèñòû
- e_TextureFontPrintEx(x+w1+w2+48, _y, IntToStr(Assists), gStdFont, rr, gg, bb, 1);
+ e_TextureFontPrintEx(x+w1+w2+72, _y, IntToStr(Assists), gStdFont, rr, gg, bb, 1);
// Ñìåðòè
e_TextureFontPrintEx(x+w1+w2+w3+16, _y, IntToStr(Deaths), gStdFont, rr, gg, bb, 1);
_y := _y+ch;
diff --git a/src/game/g_net.pas b/src/game/g_net.pas
index 292f919b9e9c5beb4981f9f073313e52ed679595..4013962f5abdd3f608b53a8050e7501dcbe34a32 100644 (file)
--- a/src/game/g_net.pas
+++ b/src/game/g_net.pas
e_log, e_msg, utils, ENet, Classes, md5, MAPDEF{$IFDEF USE_MINIUPNPC}, miniupnpc;{$ELSE};{$ENDIF}
const
- NET_PROTOCOL_VER = 188;
+ NET_PROTOCOL_VER = 189;
NET_MAXCLIENTS = 24;
// NOTE: We use different channels for unreliable and reliable packets because ENet seems to
diff --git a/src/game/g_player.pas b/src/game/g_player.pas
index c903d13b0a780cc97c993011d746ba58be2be061..4e5b60e453dce9ab8e20e4fcaf921b15e256fb32 100644 (file)
--- a/src/game/g_player.pas
+++ b/src/game/g_player.pas
plr: TPlayer;
srv, netsrv: Boolean;
DoFrags: Boolean;
- DoAssists: Boolean;
OldLR: Byte;
KP: TPlayer;
it: PItem;
begin
DoFrags := (gGameSettings.MaxLives = 0) or (gGameSettings.GameMode = GM_COOP);
- DoAssists := (gGameSettings.GameMode = GM_TDM) or (gGameSettings.GameMode = GM_CTF);
Srv := g_Game_IsServer;
Netsrv := g_Game_IsServer and g_Game_IsNet;
if Srv then FDeath := FDeath + 1;
KP.FragCombo();
end;
- // Assists block
- if (DoAssists or (gGameSettings.GameMode = GM_TDM)) then
- begin
- if a = 4 then
- begin
- Inc(KP.FAssists);
- end;
- end;
-
if (gGameSettings.GameMode = GM_TDM) and DoFrags then
Inc(gTeamStat[KP.Team].Score,
IfThen(SameTeam(FUID, SpawnerUID), -1, 1));
FNextWeapDelay := 0;
end;
+// Assists block
+procedure TPlayer.Assist();
+var
+ DoAssists: Boolean;
+begin
+ DoAssists := (gGameSettings.GameMode = GM_TDM) or (gGameSettings.GameMode = GM_CTF);
+
+ if (DoAssists or (gGameSettings.GameMode = GM_TDM)) then
+ begin
+ if a = 4 then
+ begin
+ Inc(KP.FAssists);
+ end;
+ end;
+end;
+
+
function TPlayer.hasAmmoForWeapon (weapon: Byte): Boolean;
begin
result := false;