summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eb49776)
raw | patch | inline | side by side (parent: eb49776)
author | Dmitry D. Chernov <blackdoomer@yandex.ru> | |
Wed, 12 Apr 2023 19:19:09 +0000 (05:19 +1000) | ||
committer | Dmitry D. Chernov <blackdoomer@yandex.ru> | |
Wed, 12 Apr 2023 19:19:09 +0000 (05:19 +1000) |
diff --git a/src/game/g_console.pas b/src/game/g_console.pas
index b2194ba719e6e5127995bd8dc9453628556a1356..f297cb1403a622d270d7bc42468dfb35854416f4 100644 (file)
--- a/src/game/g_console.pas
+++ b/src/game/g_console.pas
// gameplay settings
WriteLn(f, 'g_gamemode ', gsGameMode);
- WriteLn(f, 'g_scorelimit ', gsGoalLimit);
+ WriteLn(f, 'g_scorelimit ', gsScoreLimit);
WriteLn(f, 'g_timelimit ', gsTimeLimit);
WriteLn(f, 'g_maxlives ', gsMaxLives);
WriteLn(f, 'g_item_respawn_time ', gsItemRespawnTime);
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index 958023d653c0cb8c1ff125b7ae2cb405dbce9579..7ec13174f02efdfb7d897b5d82a095f8c9dcc8e2 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
GameType: Byte;
GameMode: Byte;
TimeLimit: Word;
- GoalLimit: Word;
+ ScoreLimit: Word;
WarmupTime: Word;
SpawnInvul: Word;
ItemRespawnTime: Word;
procedure g_Game_Spectate();
procedure g_Game_SpectateCenterView();
procedure g_Game_StartSingle(Map: String; TwoPlayers: Boolean; nPlayers: Byte);
-procedure g_Game_StartCustom(Map: String; GameMode: Byte; TimeLimit, GoalLimit: Word; MaxLives: Byte; Options: LongWord; nPlayers: Byte);
-procedure g_Game_StartServer(Map: String; GameMode: Byte; TimeLimit, GoalLimit: Word; MaxLives: Byte; Options: LongWord; nPlayers: Byte; IPAddr: LongWord; Port: Word);
+procedure g_Game_StartCustom(Map: String; GameMode: Byte; TimeLimit, ScoreLimit: Word; MaxLives: Byte; Options: LongWord; nPlayers: Byte);
+procedure g_Game_StartServer(Map: String; GameMode: Byte; TimeLimit, ScoreLimit: Word; MaxLives: Byte; Options: LongWord; nPlayers: Byte; IPAddr: LongWord; Port: Word);
procedure g_Game_StartClient(Addr: String; Port: Word; PW: String);
procedure g_Game_Restart();
procedure g_Game_RestartLevel();
gPauseHolmes: Boolean = false;
gShowTime: Boolean = False;
gShowFPS: Boolean = False;
- gShowGoals: Boolean = True;
+ gShowScore: Boolean = True;
gShowStat: Boolean = True;
gShowPIDs: Boolean = False;
gShowKillMsg: Boolean = True;
dquoteStr(map),
mode,
gGameSettings.TimeLimit,
- gGameSettings.GoalLimit,
+ gGameSettings.ScoreLimit,
gGameSettings.Options,
etime,
Length(Stat.PlayerStat)
// otherwise nothing
if Stat.GameMode in [GM_TDM, GM_CTF] then
WriteLn(s,
- Format('red_score,blue_score' + LineEnding + '%d,%d', [Stat.TeamStat[TEAM_RED].Goals, Stat.TeamStat[TEAM_BLUE].Goals]))
+ Format('red_score,blue_score' + LineEnding + '%d,%d', [Stat.TeamStat[TEAM_RED].Score, Stat.TeamStat[TEAM_BLUE].Score]))
else if Stat.GameMode in [GM_COOP, GM_SINGLE] then
WriteLn(s,
Format('mon_killed,mon_total,secrets_found,secrets_total' + LineEnding + '%d,%d,%d,%d',[gCoopMonstersKilled, gTotalMonsters, gCoopSecretsFound, gSecretsCount]));
s1 := _lc[I_GAME_DM]
else
s1 := _lc[I_GAME_LMS];
- s2 := Format(_lc[I_GAME_FRAG_LIMIT], [gGameSettings.GoalLimit]);
+ s2 := Format(_lc[I_GAME_FRAG_LIMIT], [gGameSettings.ScoreLimit]);
s3 := Format(_lc[I_GAME_TIME_LIMIT], [gGameSettings.TimeLimit div 3600, (gGameSettings.TimeLimit div 60) mod 60, gGameSettings.TimeLimit mod 60]);
end;
s1 := _lc[I_GAME_TDM]
else
s1 := _lc[I_GAME_TLMS];
- s2 := Format(_lc[I_GAME_FRAG_LIMIT], [gGameSettings.GoalLimit]);
+ s2 := Format(_lc[I_GAME_FRAG_LIMIT], [gGameSettings.ScoreLimit]);
s3 := Format(_lc[I_GAME_TIME_LIMIT], [gGameSettings.TimeLimit div 3600, (gGameSettings.TimeLimit div 60) mod 60, gGameSettings.TimeLimit mod 60]);
end;
GM_CTF:
begin
s1 := _lc[I_GAME_CTF];
- s2 := Format(_lc[I_GAME_SCORE_LIMIT], [gGameSettings.GoalLimit]);
+ s2 := Format(_lc[I_GAME_SCORE_LIMIT], [gGameSettings.ScoreLimit]);
s3 := Format(_lc[I_GAME_TIME_LIMIT], [gGameSettings.TimeLimit div 3600, (gGameSettings.TimeLimit div 60) mod 60, gGameSettings.TimeLimit mod 60]);
end;
end;
e_TextureFontPrintEx(x+16, _y, s1, gStdFont, r, g, b, 1);
- e_TextureFontPrintEx(x+w1+16, _y, IntToStr(gTeamStat[a].Goals),
+ e_TextureFontPrintEx(x+w1+16, _y, IntToStr(gTeamStat[a].Score),
gStdFont, r, g, b, 1);
_y := _y+ch+(ch div 4);
gFlags[FLAG_BLUE].CaptureTime := gFlags[FLAG_BLUE].CaptureTime + GAME_TICK;
// Áûë çàäàí ëèìèò ïîáåä:
- if (gGameSettings.GoalLimit > 0) then
+ if (gGameSettings.ScoreLimit > 0) then
begin
b := 0;
else
if gGameSettings.GameMode in [GM_TDM, GM_CTF] then
begin //  CTF/TDM âûáèðàåì êîìàíäó ñ íàèáîëüøèì ñ÷åòîì
- b := Max(gTeamStat[TEAM_RED].Goals, gTeamStat[TEAM_BLUE].Goals);
+ b := Max(gTeamStat[TEAM_RED].Score, gTeamStat[TEAM_BLUE].Score);
end;
// Ëèìèò ïîáåä íàáðàí => êîíåö óðîâíÿ:
- if b >= gGameSettings.GoalLimit then
+ if b >= gGameSettings.ScoreLimit then
begin
g_Game_NextLevel();
Exit;
_y := _y+16+16;
with CustomStat do
- if TeamStat[TEAM_RED].Goals > TeamStat[TEAM_BLUE].Goals then s1 := _lc[I_GAME_WIN_RED]
- else if TeamStat[TEAM_BLUE].Goals > TeamStat[TEAM_RED].Goals then s1 := _lc[I_GAME_WIN_BLUE]
+ if TeamStat[TEAM_RED].Score > TeamStat[TEAM_BLUE].Score then s1 := _lc[I_GAME_WIN_RED]
+ else if TeamStat[TEAM_BLUE].Score > TeamStat[TEAM_RED].Score then s1 := _lc[I_GAME_WIN_BLUE]
else s1 := _lc[I_GAME_WIN_DRAW];
e_TextureFontPrintEx(x+8+(w div 2)-(Length(s1)*ww2 div 2), _y, s1, gStdFont, 255, 255, 255, 1);
begin
e_TextureFontPrintEx(x+8, _y, _lc[I_GAME_TEAM_RED],
gStdFont, 255, 0, 0, 1);
- e_TextureFontPrintEx(x+w1+8, _y, IntToStr(CustomStat.TeamStat[TEAM_RED].Goals),
+ e_TextureFontPrintEx(x+w1+8, _y, IntToStr(CustomStat.TeamStat[TEAM_RED].Score),
gStdFont, 255, 0, 0, 1);
r := 255;
g := 0;
begin
e_TextureFontPrintEx(x+8, _y, _lc[I_GAME_TEAM_BLUE],
gStdFont, 0, 0, 255, 1);
- e_TextureFontPrintEx(x+w1+8, _y, IntToStr(CustomStat.TeamStat[TEAM_BLUE].Goals),
+ e_TextureFontPrintEx(x+w1+8, _y, IntToStr(CustomStat.TeamStat[TEAM_BLUE].Score),
gStdFont, 0, 0, 255, 1);
r := 0;
g := 0;
end;
procedure g_Game_StartCustom(Map: String; GameMode: Byte;
- TimeLimit, GoalLimit: Word;
+ TimeLimit, ScoreLimit: Word;
MaxLives: Byte;
Options: LongWord; nPlayers: Byte);
var
gGameSettings.GameMode := GameMode;
gSwitchGameMode := GameMode;
gGameSettings.TimeLimit := TimeLimit;
- gGameSettings.GoalLimit := GoalLimit;
+ gGameSettings.ScoreLimit := ScoreLimit;
gGameSettings.MaxLives := IfThen(GameMode = GM_CTF, 0, MaxLives);
gGameSettings.Options := Options;
end;
procedure g_Game_StartServer(Map: String; GameMode: Byte;
- TimeLimit, GoalLimit: Word; MaxLives: Byte;
+ TimeLimit, ScoreLimit: Word; MaxLives: Byte;
Options: LongWord; nPlayers: Byte;
IPAddr: LongWord; Port: Word);
begin
gGameSettings.GameMode := GameMode;
gSwitchGameMode := GameMode;
gGameSettings.TimeLimit := TimeLimit;
- gGameSettings.GoalLimit := GoalLimit;
+ gGameSettings.ScoreLimit := ScoreLimit;
gGameSettings.MaxLives := IfThen(GameMode = GM_CTF, 0, MaxLives);
gGameSettings.Options := Options;
gGameSettings.GameMode := InMsg.ReadByte();
gSwitchGameMode := gGameSettings.GameMode;
- gGameSettings.GoalLimit := InMsg.ReadWord();
+ gGameSettings.ScoreLimit := InMsg.ReadWord();
gGameSettings.TimeLimit := InMsg.ReadWord();
gGameSettings.MaxLives := InMsg.ReadByte();
gGameSettings.Options := InMsg.ReadLongWord();
begin
if Length(P) > 1 then
begin
- gsGoalLimit := nclamp(StrToIntDef(P[1], gsGoalLimit), 0, $FFFF);
+ gsScoreLimit := nclamp(StrToIntDef(P[1], gsScoreLimit), 0, $FFFF);
if g_Game_IsServer then
begin
b := stat[a].Frags;
end
else // TDM/CTF
- b := Max(gTeamStat[TEAM_RED].Goals, gTeamStat[TEAM_BLUE].Goals);
+ b := Max(gTeamStat[TEAM_RED].Score, gTeamStat[TEAM_BLUE].Score);
// if someone has a higher score, set it to that instead
- gsGoalLimit := max(gsGoalLimit, b);
- gGameSettings.GoalLimit := gsGoalLimit;
+ gsScoreLimit := max(gsScoreLimit, b);
+ gGameSettings.ScoreLimit := gsScoreLimit;
if g_Game_IsNet then MH_SEND_GameSettings;
end;
end;
- g_Console_Add(Format(_lc[I_MSG_SCORE_LIMIT], [Integer(gsGoalLimit)]));
+ g_Console_Add(Format(_lc[I_MSG_SCORE_LIMIT], [Integer(gsScoreLimit)]));
end
else if cmd = 'g_timelimit' then
begin
if Length(P) >= 4 then
b := StrToIntDef(P[3], 1);
g_Game_StartCustom(s, GameMode, TimeLimit,
- GoalLimit, MaxLives, Options, b);
+ ScoreLimit, MaxLives, Options, b);
end;
end
else
b := 0;
if Length(P) >= 6 then
b := StrToIntDef(P[5], 0);
- g_Game_StartServer(s, GameMode, TimeLimit, GoalLimit, MaxLives, Options, b, listen, prt)
+ g_Game_StartServer(s, GameMode, TimeLimit, ScoreLimit, MaxLives, Options, b, listen, prt)
end
end
else
if LimT < 0 then
LimT := 0;
- // Goal limit:
+ // Score limit:
s := Find_Param_Value(pars, '-lims');
if (s = '') or (not TryStrToInt(s, LimS)) then
LimS := 0;
conRegVar('r_showfps', @gShowFPS, 'draw fps counter', 'draw fps counter');
conRegVar('r_showtime', @gShowTime, 'show game time', 'show game time');
conRegVar('r_showping', @gShowPing, 'show ping', 'show ping');
- conRegVar('r_showscore', @gShowGoals, 'show score', 'show score');
+ conRegVar('r_showscore', @gShowScore, 'show score', 'show score');
conRegVar('r_showkillmsg', @gShowKillMsg, 'show kill log', 'show kill log');
conRegVar('r_showlives', @gShowLives, 'show lives', 'show lives');
conRegVar('r_showspect', @gSpectHUD, 'show spectator hud', 'show spectator hud');
index a52a8f881a36d3c9ff2688c29e151970c1d52ef3..61ffd454614430c32d3c38c0dba6fc02e32dc814 100644 (file)
--- a/src/game/g_language.pas
+++ b/src/game/g_language.pas
I_MENU_GAME_TYPE_COOP,
I_MENU_GAME_TYPE_SINGLE,
I_MENU_TIME_LIMIT,
- I_MENU_GOAL_LIMIT,
+ I_MENU_SCORE_LIMIT,
I_MENU_MAX_LIVES,
I_MENU_TEAM_DAMAGE,
I_MENU_TEAM_HIT,
'SINGLE'),
('MENU TIME LIMIT', 'Time Limit:',
'Ëèìèò âðåìåíè:'),
- ('MENU GOAL LIMIT', 'Score Limit:',
+ ('MENU SCORE LIMIT', 'Score Limit:',
'Ëèìèò î÷êîâ:'),
('MENU MAX LIVES', 'Lives:',
'Æèçíè:'),
diff --git a/src/game/g_map.pas b/src/game/g_map.pas
index 570d5e2413c66732c51084fdc17e37e62fc50708..2b8e9ff34d5875ab0042b71f15b9936bfb680e97 100644 (file)
--- a/src/game/g_map.pas
+++ b/src/game/g_map.pas
if gGameSettings.GameMode in [GM_TDM, GM_CTF] then
begin
// Î÷êè Êðàñíîé êîìàíäû
- utils.writeInt(st, SmallInt(gTeamStat[TEAM_RED].Goals));
+ utils.writeInt(st, SmallInt(gTeamStat[TEAM_RED].Score));
// Î÷êè Ñèíåé êîìàíäû
- utils.writeInt(st, SmallInt(gTeamStat[TEAM_BLUE].Goals));
+ utils.writeInt(st, SmallInt(gTeamStat[TEAM_BLUE].Score));
end;
///// /////
end;
if gGameSettings.GameMode in [GM_TDM, GM_CTF] then
begin
// Î÷êè Êðàñíîé êîìàíäû
- gTeamStat[TEAM_RED].Goals := utils.readSmallInt(st);
+ gTeamStat[TEAM_RED].Score := utils.readSmallInt(st);
// Î÷êè Ñèíåé êîìàíäû
- gTeamStat[TEAM_BLUE].Goals := utils.readSmallInt(st);
+ gTeamStat[TEAM_BLUE].Score := utils.readSmallInt(st);
end;
///// /////
end;
diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas
index f2e3d86e2b388abb6774daf5b096d617c49ae4f4..8d385ad8448441b69806254c84f8e222d3e720bc 100644 (file)
--- a/src/game/g_menu.pas
+++ b/src/game/g_menu.pas
Result := TGUISwitch(GetControl('swGameMode')).ItemIndex+1;
gsGameMode := TGUISwitch(GetControl('swGameMode')).GetText;
gsTimeLimit := StrToIntDef(TGUIEdit(GetControl('edTimeLimit')).Text, 0);
- gsGoalLimit := StrToIntDef(TGUIEdit(GetControl('edGoalLimit')).Text, 0);
+ gsScoreLimit := StrToIntDef(TGUIEdit(GetControl('edScoreLimit')).Text, 0);
gsMaxLives := StrToIntDef(TGUIEdit(GetControl('edMaxLives')).Text, 0);
gsItemRespawnTime := StrToIntDef(TGUIEdit(GetControl('edItemRespawnTime')).Text, 0);
gsPlayers := TGUISwitch(GetControl('swPlayers')).ItemIndex;
if GameMode = GM_NONE then Exit;
g_Console_WriteGameConfig;
- g_Game_StartCustom(gsMap, GameMode, gsTimeLimit, gsGoalLimit,
+ g_Game_StartCustom(gsMap, GameMode, gsTimeLimit, gsScoreLimit,
gsMaxLives, gsGameFlags, gsPlayers);
end;
end;
g_Console_WriteGameConfig;
- g_Game_StartServer(gsMap, GameMode, gsTimeLimit, gsGoalLimit, gsMaxLives,
+ g_Game_StartServer(gsMap, GameMode, gsTimeLimit, gsScoreLimit, gsMaxLives,
gsGameFlags, gsPlayers, 0, NetPort);
end;
ItemIndex := 2;
TGUIEdit(menu.GetControl('edTimeLimit')).Text := IntToStr(TimeLimit);
- TGUIEdit(menu.GetControl('edGoalLimit')).Text := IntToStr(GoalLimit);
+ TGUIEdit(menu.GetControl('edScoreLimit')).Text := IntToStr(ScoreLimit);
TGUIEdit(menu.GetControl('edMaxLives')).Text := IntToStr(MaxLives);
with TGUISwitch(menu.GetControl('swBotsVS')) do
end;
TGUIEdit(menu.GetControl('edTimeLimit')).Enabled := True;
TGUILabel(menu.GetControlsText('edTimeLimit')).Color := MENU_ITEMSTEXT_COLOR;
- TGUIEdit(menu.GetControl('edGoalLimit')).Enabled := True;
- TGUILabel(menu.GetControlsText('edGoalLimit')).Color := MENU_ITEMSTEXT_COLOR;
+ TGUIEdit(menu.GetControl('edScoreLimit')).Enabled := True;
+ TGUILabel(menu.GetControlsText('edScoreLimit')).Color := MENU_ITEMSTEXT_COLOR;
TGUIEdit(menu.GetControl('edMaxLives')).Enabled := True;
TGUILabel(menu.GetControlsText('edMaxLives')).Color := MENU_ITEMSTEXT_COLOR;
TGUISwitch(menu.GetControl('swBotsVS')).Enabled := True;
Text := '';
end;
TGUILabel(menu.GetControlsText('edTimeLimit')).Color := MENU_UNACTIVEITEMS_COLOR;
- with TGUIEdit(menu.GetControl('edGoalLimit')) do
+ with TGUIEdit(menu.GetControl('edScoreLimit')) do
begin
Enabled := False;
Text := '';
end;
- TGUILabel(menu.GetControlsText('edGoalLimit')).Color := MENU_UNACTIVEITEMS_COLOR;
+ TGUILabel(menu.GetControlsText('edScoreLimit')).Color := MENU_UNACTIVEITEMS_COLOR;
with TGUIEdit(menu.GetControl('edMaxLives')) do
begin
Enabled := False;
end;
end;
- if TGUIEdit(menu.GetControl('edGoalLimit')).Enabled then
+ if TGUIEdit(menu.GetControl('edScoreLimit')).Enabled then
begin
- n := StrToIntDef(TGUIEdit(menu.GetControl('edGoalLimit')).Text, GoalLimit);
+ n := StrToIntDef(TGUIEdit(menu.GetControl('edScoreLimit')).Text, ScoreLimit);
if n = 0 then
- GoalLimit := 0
+ ScoreLimit := 0
else
begin
b := 0;
b := stat[a].Frags;
end
else // CTF
- b := Max(gTeamStat[TEAM_RED].Goals, gTeamStat[TEAM_BLUE].Goals);
+ b := Max(gTeamStat[TEAM_RED].Score, gTeamStat[TEAM_BLUE].Score);
- GoalLimit := Max(n, b);
+ ScoreLimit := Max(n, b);
end;
end;
if TGUIEdit(menu.GetControl('edMaxLives')).Enabled then
begin
- n := StrToIntDef(TGUIEdit(menu.GetControl('edMaxLives')).Text, GoalLimit);
+ n := StrToIntDef(TGUIEdit(menu.GetControl('edMaxLives')).Text, MaxLives);
if n < 0 then n := 0;
if n > 255 then n := 255;
if n = 0 then
// don't forget to latch this shit
gsGameFlags := Options;
gsMaxLives := MaxLives;
- gsGoalLimit := GoalLimit;
+ gsScoreLimit := ScoreLimit;
gsTimeLimit := TimeLimit;
end;
if gsTimeLimit > 0 then
Text := IntToStr(gsTimeLimit);
end;
- with AddEdit(_lc[I_MENU_GOAL_LIMIT]) do
+ with AddEdit(_lc[I_MENU_SCORE_LIMIT]) do
begin
- Name := 'edGoalLimit';
+ Name := 'edScoreLimit';
OnlyDigits := True;
Width := 4;
MaxLength := 5;
- if gsGoalLimit > 0 then
- Text := IntToStr(gsGoalLimit);
+ if gsScoreLimit > 0 then
+ Text := IntToStr(gsScoreLimit);
end;
with AddEdit(_lc[I_MENU_MAX_LIVES]) do
begin
if gsTimeLimit > 0 then
Text := IntToStr(gsTimeLimit);
end;
- with AddEdit(_lc[I_MENU_GOAL_LIMIT]) do
+ with AddEdit(_lc[I_MENU_SCORE_LIMIT]) do
begin
- Name := 'edGoalLimit';
+ Name := 'edScoreLimit';
OnlyDigits := True;
Width := 4;
MaxLength := 5;
- if gsGoalLimit > 0 then
- Text := IntToStr(gsGoalLimit);
+ if gsScoreLimit > 0 then
+ Text := IntToStr(gsScoreLimit);
end;
with AddEdit(_lc[I_MENU_MAX_LIVES]) do
begin
Width := 4;
MaxLength := 5;
end;
- with AddEdit(_lc[I_MENU_GOAL_LIMIT]) do
+ with AddEdit(_lc[I_MENU_SCORE_LIMIT]) do
begin
- Name := 'edGoalLimit';
+ Name := 'edScoreLimit';
OnlyDigits := True;
Width := 4;
MaxLength := 5;
diff --git a/src/game/g_netmsg.pas b/src/game/g_netmsg.pas
index 4c67d12504ef9f21e14efae0f5afffa3d7840049..1d63ec09505828e05b9ac9e6eeddf5c23bd5c01d 100644 (file)
--- a/src/game/g_netmsg.pas
+++ b/src/game/g_netmsg.pas
NetOut.Write(g_ExtractFileName(gMapInfo.Map));
NetOut.Write(gWADHash);
NetOut.Write(gGameSettings.GameMode);
- NetOut.Write(gGameSettings.GoalLimit);
+ NetOut.Write(gGameSettings.ScoreLimit);
NetOut.Write(gGameSettings.TimeLimit);
NetOut.Write(gGameSettings.MaxLives);
NetOut.Write(gGameSettings.Options);
NetOut.Write(Byte(NET_MSG_SCORE));
if gGameSettings.GameMode in [GM_TDM, GM_CTF] then
begin
- NetOut.Write(gTeamStat[TEAM_RED].Goals);
- NetOut.Write(gTeamStat[TEAM_BLUE].Goals);
+ NetOut.Write(gTeamStat[TEAM_RED].Score);
+ NetOut.Write(gTeamStat[TEAM_BLUE].Score);
end
else
if gGameSettings.GameMode = GM_COOP then
begin
NetOut.Write(Byte(NET_MSG_GSET));
NetOut.Write(gGameSettings.GameMode);
- NetOut.Write(gGameSettings.GoalLimit);
+ NetOut.Write(gGameSettings.ScoreLimit);
NetOut.Write(gGameSettings.TimeLimit);
NetOut.Write(gGameSettings.MaxLives);
NetOut.Write(gGameSettings.Options);
begin
if gGameSettings.GameMode in [GM_TDM, GM_CTF] then
begin
- gTeamStat[TEAM_RED].Goals := M.ReadSmallInt();
- gTeamStat[TEAM_BLUE].Goals := M.ReadSmallInt();
+ gTeamStat[TEAM_RED].Score := M.ReadSmallInt();
+ gTeamStat[TEAM_BLUE].Score := M.ReadSmallInt();
end
else
if gGameSettings.GameMode = GM_COOP then
procedure MC_RECV_GameSettings(var M: TMsg);
begin
gGameSettings.GameMode := M.ReadByte();
- gGameSettings.GoalLimit := M.ReadWord();
+ gGameSettings.ScoreLimit := M.ReadWord();
gGameSettings.TimeLimit := M.ReadWord();
gGameSettings.MaxLives := M.ReadByte();
gGameSettings.Options := M.ReadLongWord();
diff --git a/src/game/g_options.pas b/src/game/g_options.pas
index 5bfedc9d42b8f79e6c351c7ca8e686fd61aa403a..ace71914663e7a139ae5f705149984909cec83cc 100644 (file)
--- a/src/game/g_options.pas
+++ b/src/game/g_options.pas
gsMap: String;
gsGameMode: String;
gsTimeLimit: Word;
- gsGoalLimit: Word;
+ gsScoreLimit: Word;
gsMaxLives: Byte;
gsPlayers: Byte;
gsGameFlags: LongWord;
gsMap := '';
gsGameMode := _lc[I_MENU_GAME_TYPE_DM];
gsTimeLimit := 0;
- gsGoalLimit := 0;
+ gsScoreLimit := 0;
gsMaxLives := 0;
gsPlayers := 1;
gsSpawnInvul := 0;
if GameMode = GM_SINGLE then
GameMode := GM_COOP;
TimeLimit := gsTimeLimit;
- GoalLimit := gsGoalLimit;
+ ScoreLimit := gsScoreLimit;
MaxLives := gsMaxLives;
SpawnInvul := gsSpawnInvul;
ItemRespawnTime := gsItemRespawnTime;
diff --git a/src/game/g_player.pas b/src/game/g_player.pas
index 1021d36f9646582ff5ae7bd918314e853b7a1a1a..f926798cf4b4772defe298bbab189217006c474c 100644 (file)
--- a/src/game/g_player.pas
+++ b/src/game/g_player.pas
TTeamStat = Array [TEAM_RED..TEAM_BLUE] of
record
- Goals: SmallInt;
+ Score: SmallInt;
end;
var
var
i: Integer;
begin
- gTeamStat[TEAM_RED].Goals := 0;
- gTeamStat[TEAM_BLUE].Goals := 0;
+ gTeamStat[TEAM_RED].Score := 0;
+ gTeamStat[TEAM_BLUE].Score := 0;
if gPlayers <> nil then
for i := 0 to High(gPlayers) do
SY := gPlayerScreenSize.Y;
Y := 0;
- if gShowGoals and (gGameSettings.GameMode in [GM_TDM, GM_CTF]) then
+ if gShowScore and (gGameSettings.GameMode in [GM_TDM, GM_CTF]) then
begin
if gGameSettings.GameMode = GM_CTF then
a := 32 + 8
e_Draw(ID, X-16-32, 240-72-4, 0, True, False);
end;
- s := IntToStr(gTeamStat[TEAM_RED].Goals);
+ s := IntToStr(gTeamStat[TEAM_RED].Score);
e_CharFont_GetSize(gMenuFont, s, tw, th);
e_CharFont_PrintEx(gMenuFont, X-16-a-tw, 240-72-4, s, TEAMCOLOR[TEAM_RED]);
e_Draw(ID, X-16-32, 240-32-4, 0, True, False);
end;
- s := IntToStr(gTeamStat[TEAM_BLUE].Goals);
+ s := IntToStr(gTeamStat[TEAM_BLUE].Score);
e_CharFont_GetSize(gMenuFont, s, tw, th);
e_CharFont_PrintEx(gMenuFont, X-16-a-tw, 240-32-4, s, TEAMCOLOR[TEAM_BLUE]);
end;
if Srv then
begin
if gGameSettings.GameMode = GM_TDM then
- Dec(gTeamStat[FTeam].Goals);
+ Dec(gTeamStat[FTeam].Score);
if DoFrags or (gGameSettings.GameMode = GM_TDM) then
begin
Dec(FFrags);
end;
if (gGameSettings.GameMode = GM_TDM) and DoFrags then
- Inc(gTeamStat[KP.Team].Goals,
+ Inc(gTeamStat[KP.Team].Score,
IfThen(SameTeam(FUID, SpawnerUID), -1, 1));
if netsrv then MH_SEND_PlayerStats(SpawnerUID);
g_Game_Message(Format(_lc[I_MESSAGE_TLMS_WIN], [AnsiUpperCase(_lc[I_GAME_TEAM_RED])]), 144);
if Netsrv then
MH_SEND_GameEvent(NET_EV_TLMS_WIN, TEAM_RED);
- Inc(gTeamStat[TEAM_RED].Goals);
+ Inc(gTeamStat[TEAM_RED].Score);
gLMSRespawn := LMS_RESPAWN_FINAL;
gLMSRespawnTime := gTime + 5000;
end
g_Game_Message(Format(_lc[I_MESSAGE_TLMS_WIN], [AnsiUpperCase(_lc[I_GAME_TEAM_BLUE])]), 144);
if Netsrv then
MH_SEND_GameEvent(NET_EV_TLMS_WIN, TEAM_BLUE);
- Inc(gTeamStat[TEAM_BLUE].Goals);
+ Inc(gTeamStat[TEAM_BLUE].Score);
gLMSRespawn := LMS_RESPAWN_FINAL;
gLMSRespawnTime := gTime + 5000;
end
if not sound_cap_flag[a].IsPlaying() then
sound_cap_flag[a].Play();
- gTeamStat[FTeam].Goals := gTeamStat[FTeam].Goals + 1;
+ gTeamStat[FTeam].Score += 1;
Result := True;
if g_Game_IsNet then
index 9ab49931944e1b9e8a2051d68083ba1699a8642e..6b01c06f17717f5da54bff9f796cb9edb84dcbef 100644 (file)
--- a/src/game/g_saveload.pas
+++ b/src/game/g_saveload.pas
// Ëèìèò âðåìåíè
utils.writeInt(st, Word(gGameSettings.TimeLimit));
// Ëèìèò î÷êîâ
- utils.writeInt(st, Word(gGameSettings.GoalLimit));
+ utils.writeInt(st, Word(gGameSettings.ScoreLimit));
// Ëèìèò æèçíåé
utils.writeInt(st, Byte(gGameSettings.MaxLives));
// Èãðîâûå îïöèè
WAD_Path, Map_Name: AnsiString;
nPlayers: Integer;
Game_Type, Game_Mode, Game_MaxLives: Byte;
- Game_TimeLimit, Game_GoalLimit: Word;
+ Game_TimeLimit, Game_ScoreLimit: Word;
Game_Time, Game_Options: Cardinal;
Game_CoopMonstersKilled,
Game_CoopSecretsFound,
// Ëèìèò âðåìåíè
Game_TimeLimit := utils.readWord(st);
// Ëèìèò î÷êîâ
- Game_GoalLimit := utils.readWord(st);
+ Game_ScoreLimit := utils.readWord(st);
// Ëèìèò æèçíåé
Game_MaxLives := utils.readByte(st);
// Èãðîâûå îïöèè
gGameSettings.GameMode := Game_Mode;
gSwitchGameMode := Game_Mode;
gGameSettings.TimeLimit := Game_TimeLimit;
- gGameSettings.GoalLimit := Game_GoalLimit;
+ gGameSettings.ScoreLimit := Game_ScoreLimit;
gGameSettings.MaxLives := IfThen(Game_Mode = GM_CTF, 0, Game_MaxLives);
gGameSettings.Options := Game_Options;
end;
index e9fa513f7c6243b3bfac35dfee694d45266a30ad..2509650d413b5ccc9af45f390ad91339bd4a30ad 100644 (file)
--- a/src/game/g_triggers.pas
+++ b/src/game/g_triggers.pas
if ((tgcScoreAction = TRIGGER_SCORE_ACTION_ADD) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED) and (p.Team = TEAM_RED))
or ((tgcScoreAction = TRIGGER_SCORE_ACTION_ADD) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_BLUE) and (p.Team = TEAM_BLUE)) then
begin
- Inc(gTeamStat[TEAM_RED].Goals, tgcScoreCount); // Red Scores
+ Inc(gTeamStat[TEAM_RED].Score, tgcScoreCount); // Red Scores
if tgcScoreCon then
begin
if ((tgcScoreAction = TRIGGER_SCORE_ACTION_SUB) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED) and (p.Team = TEAM_RED))
or ((tgcScoreAction = TRIGGER_SCORE_ACTION_SUB) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_BLUE) and (p.Team = TEAM_BLUE)) then
begin
- Dec(gTeamStat[TEAM_RED].Goals, tgcScoreCount); // Red Fouls
+ Dec(gTeamStat[TEAM_RED].Score, tgcScoreCount); // Red Fouls
if tgcScoreCon then
begin
if ((tgcScoreAction = TRIGGER_SCORE_ACTION_ADD) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED) and (p.Team = TEAM_BLUE))
or ((tgcScoreAction = TRIGGER_SCORE_ACTION_ADD) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_BLUE) and (p.Team = TEAM_RED)) then
begin
- Inc(gTeamStat[TEAM_BLUE].Goals, tgcScoreCount); // Blue Scores
+ Inc(gTeamStat[TEAM_BLUE].Score, tgcScoreCount); // Blue Scores
if tgcScoreCon then
begin
if ((tgcScoreAction = TRIGGER_SCORE_ACTION_SUB) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED) and (p.Team = TEAM_BLUE))
or ((tgcScoreAction = TRIGGER_SCORE_ACTION_SUB) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_BLUE) and (p.Team = TEAM_RED)) then
begin
- Dec(gTeamStat[TEAM_BLUE].Goals, tgcScoreCount); // Blue Fouls
+ Dec(gTeamStat[TEAM_BLUE].Score, tgcScoreCount); // Blue Fouls
if tgcScoreCon then
begin
begin
if (tgcScoreAction = TRIGGER_SCORE_ACTION_ADD) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_FORCE_RED) then
begin
- Inc(gTeamStat[TEAM_RED].Goals, tgcScoreCount); // Red Scores
+ Inc(gTeamStat[TEAM_RED].Score, tgcScoreCount); // Red Scores
if tgcScoreCon then
begin
end;
if (tgcScoreAction = TRIGGER_SCORE_ACTION_SUB) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_FORCE_RED) then
begin
- Dec(gTeamStat[TEAM_RED].Goals, tgcScoreCount); // Red Fouls
+ Dec(gTeamStat[TEAM_RED].Score, tgcScoreCount); // Red Fouls
if tgcScoreCon then
begin
end;
if (tgcScoreAction = TRIGGER_SCORE_ACTION_ADD) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_FORCE_BLUE) then
begin
- Inc(gTeamStat[TEAM_BLUE].Goals, tgcScoreCount); // Blue Scores
+ Inc(gTeamStat[TEAM_BLUE].Score, tgcScoreCount); // Blue Scores
if tgcScoreCon then
begin
end;
if (tgcScoreAction = TRIGGER_SCORE_ACTION_SUB) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_FORCE_BLUE) then
begin
- Dec(gTeamStat[TEAM_BLUE].Goals, tgcScoreCount); // Blue Fouls
+ Dec(gTeamStat[TEAM_BLUE].Score, tgcScoreCount); // Blue Fouls
if tgcScoreCon then
begin
end;
end;
// Âûèãðûø
- if (tgcScoreAction = TRIGGER_SCORE_ACTION_WIN) and (gGameSettings.GoalLimit > 0) then
+ if (tgcScoreAction = TRIGGER_SCORE_ACTION_WIN) and (gGameSettings.ScoreLimit > 0) then
begin
// Ñâîåé èëè ÷óæîé êîìàíäû
if (tgcScoreTeam in [TRIGGER_SCORE_TEAM_MINE_RED, TRIGGER_SCORE_TEAM_MINE_BLUE]) and (g_GetUIDType(ActivateUID) = UID_PLAYER) then
if ((tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED) and (p.Team = TEAM_RED)) // Red Wins
or ((tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_BLUE) and (p.Team = TEAM_BLUE)) then
begin
- if gTeamStat[TEAM_RED].Goals < SmallInt(gGameSettings.GoalLimit) then
+ if gTeamStat[TEAM_RED].Score < SmallInt(gGameSettings.ScoreLimit) then
begin
- gTeamStat[TEAM_RED].Goals := gGameSettings.GoalLimit;
+ gTeamStat[TEAM_RED].Score := gGameSettings.ScoreLimit;
if tgcScoreCon then
begin
if ((tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED) and (p.Team = TEAM_BLUE)) // Blue Wins
or ((tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_BLUE) and (p.Team = TEAM_RED)) then
begin
- if gTeamStat[TEAM_BLUE].Goals < SmallInt(gGameSettings.GoalLimit) then
+ if gTeamStat[TEAM_BLUE].Score < SmallInt(gGameSettings.ScoreLimit) then
begin
- gTeamStat[TEAM_BLUE].Goals := gGameSettings.GoalLimit;
+ gTeamStat[TEAM_BLUE].Score := gGameSettings.ScoreLimit;
if tgcScoreCon then
begin
begin
if (tgcScoreTeam = TRIGGER_SCORE_TEAM_FORCE_RED) then // Red Wins
begin
- if gTeamStat[TEAM_RED].Goals < SmallInt(gGameSettings.GoalLimit) then
+ if gTeamStat[TEAM_RED].Score < SmallInt(gGameSettings.ScoreLimit) then
begin
- gTeamStat[TEAM_RED].Goals := gGameSettings.GoalLimit;
+ gTeamStat[TEAM_RED].Score := gGameSettings.ScoreLimit;
Result := True;
end;
end;
if (tgcScoreTeam = TRIGGER_SCORE_TEAM_FORCE_BLUE) then // Blue Wins
begin
- if gTeamStat[TEAM_BLUE].Goals < SmallInt(gGameSettings.GoalLimit) then
+ if gTeamStat[TEAM_BLUE].Score < SmallInt(gGameSettings.ScoreLimit) then
begin
- gTeamStat[TEAM_BLUE].Goals := gGameSettings.GoalLimit;
+ gTeamStat[TEAM_BLUE].Score := gGameSettings.ScoreLimit;
Result := True;
end;
end;
end;
end;
// Ïðîèãðûø
- if (tgcScoreAction = TRIGGER_SCORE_ACTION_LOOSE) and (gGameSettings.GoalLimit > 0) then
+ if (tgcScoreAction = TRIGGER_SCORE_ACTION_LOOSE) and (gGameSettings.ScoreLimit > 0) then
begin
// Ñâîåé èëè ÷óæîé êîìàíäû
if (tgcScoreTeam in [TRIGGER_SCORE_TEAM_MINE_RED, TRIGGER_SCORE_TEAM_MINE_BLUE]) and (g_GetUIDType(ActivateUID) = UID_PLAYER) then
p := g_Player_Get(ActivateUID);
if ((tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED) and (p.Team = TEAM_BLUE)) // Red Wins
or ((tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_BLUE) and (p.Team = TEAM_RED)) then
- if gTeamStat[TEAM_RED].Goals < SmallInt(gGameSettings.GoalLimit) then
+ if gTeamStat[TEAM_RED].Score < SmallInt(gGameSettings.ScoreLimit) then
begin
- gTeamStat[TEAM_RED].Goals := gGameSettings.GoalLimit;
+ gTeamStat[TEAM_RED].Score := gGameSettings.ScoreLimit;
if tgcScoreCon then
if tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED then
end;
if ((tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED) and (p.Team = TEAM_RED)) // Blue Wins
or ((tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_BLUE) and (p.Team = TEAM_BLUE)) then
- if gTeamStat[TEAM_BLUE].Goals < SmallInt(gGameSettings.GoalLimit) then
+ if gTeamStat[TEAM_BLUE].Score < SmallInt(gGameSettings.ScoreLimit) then
begin
- gTeamStat[TEAM_BLUE].Goals := gGameSettings.GoalLimit;
+ gTeamStat[TEAM_BLUE].Score := gGameSettings.ScoreLimit;
if tgcScoreCon then
if tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED then
begin
if (tgcScoreTeam = TRIGGER_SCORE_TEAM_FORCE_BLUE) then // Red Wins
begin
- if gTeamStat[TEAM_RED].Goals < SmallInt(gGameSettings.GoalLimit) then
+ if gTeamStat[TEAM_RED].Score < SmallInt(gGameSettings.ScoreLimit) then
begin
- gTeamStat[TEAM_RED].Goals := gGameSettings.GoalLimit;
+ gTeamStat[TEAM_RED].Score := gGameSettings.ScoreLimit;
Result := True;
end;
end;
if (tgcScoreTeam = TRIGGER_SCORE_TEAM_FORCE_RED) then // Blue Wins
begin
- if gTeamStat[TEAM_BLUE].Goals < SmallInt(gGameSettings.GoalLimit) then
+ if gTeamStat[TEAM_BLUE].Score < SmallInt(gGameSettings.ScoreLimit) then
begin
- gTeamStat[TEAM_BLUE].Goals := gGameSettings.GoalLimit;
+ gTeamStat[TEAM_BLUE].Score := gGameSettings.ScoreLimit;
Result := True;
end;
end;