From: Dmitry D. Chernov Date: Wed, 12 Apr 2023 19:19:09 +0000 (+1000) Subject: Cosmetic: Replace "goal" with "score" everywhere in game code X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=commitdiff_plain;h=3b7ef59c450d979b7011cdeaadd6d8e59c34f197 Cosmetic: Replace "goal" with "score" everywhere in game code --- diff --git a/src/game/g_console.pas b/src/game/g_console.pas index b2194ba..f297cb1 100644 --- a/src/game/g_console.pas +++ b/src/game/g_console.pas @@ -2190,7 +2190,7 @@ begin // 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 958023d..7ec1317 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -29,7 +29,7 @@ type GameType: Byte; GameMode: Byte; TimeLimit: Word; - GoalLimit: Word; + ScoreLimit: Word; WarmupTime: Word; SpawnInvul: Word; ItemRespawnTime: Word; @@ -103,8 +103,8 @@ procedure g_Game_RemovePlayer(); 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(); @@ -275,7 +275,7 @@ var gPauseHolmes: Boolean = false; gShowTime: Boolean = False; gShowFPS: Boolean = False; - gShowGoals: Boolean = True; + gShowScore: Boolean = True; gShowStat: Boolean = True; gShowPIDs: Boolean = False; gShowKillMsg: Boolean = True; @@ -699,7 +699,7 @@ begin dquoteStr(map), mode, gGameSettings.TimeLimit, - gGameSettings.GoalLimit, + gGameSettings.ScoreLimit, gGameSettings.Options, etime, Length(Stat.PlayerStat) @@ -710,7 +710,7 @@ begin // 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])); @@ -1208,7 +1208,7 @@ begin 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; @@ -1218,14 +1218,14 @@ begin 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; @@ -1295,7 +1295,7 @@ begin 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); @@ -2011,7 +2011,7 @@ begin gFlags[FLAG_BLUE].CaptureTime := gFlags[FLAG_BLUE].CaptureTime + GAME_TICK; // Áûë çàäàí ëèìèò ïîáåä: - if (gGameSettings.GoalLimit > 0) then + if (gGameSettings.ScoreLimit > 0) then begin b := 0; @@ -2025,11 +2025,11 @@ begin 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; @@ -2848,8 +2848,8 @@ begin _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); @@ -2861,7 +2861,7 @@ begin 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; @@ -2871,7 +2871,7 @@ begin 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; @@ -4549,7 +4549,7 @@ begin end; procedure g_Game_StartCustom(Map: String; GameMode: Byte; - TimeLimit, GoalLimit: Word; + TimeLimit, ScoreLimit: Word; MaxLives: Byte; Options: LongWord; nPlayers: Byte); var @@ -4566,7 +4566,7 @@ 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; @@ -4662,7 +4662,7 @@ begin 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 @@ -4678,7 +4678,7 @@ 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; @@ -4877,7 +4877,7 @@ begin 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(); @@ -5765,7 +5765,7 @@ begin 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 @@ -5779,17 +5779,17 @@ 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 @@ -7055,7 +7055,7 @@ 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 @@ -7108,7 +7108,7 @@ begin 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 @@ -8464,7 +8464,7 @@ begin 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; @@ -8607,7 +8607,7 @@ begin 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'); diff --git a/src/game/g_language.pas b/src/game/g_language.pas index a52a8f8..61ffd45 100644 --- a/src/game/g_language.pas +++ b/src/game/g_language.pas @@ -161,7 +161,7 @@ type 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, @@ -954,7 +954,7 @@ const '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 570d5e2..2b8e9ff 100644 --- a/src/game/g_map.pas +++ b/src/game/g_map.pas @@ -3272,9 +3272,9 @@ begin 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; @@ -3364,9 +3364,9 @@ begin 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 f2e3d86..8d385ad 100644 --- a/src/game/g_menu.pas +++ b/src/game/g_menu.pas @@ -748,7 +748,7 @@ begin 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; @@ -799,7 +799,7 @@ begin 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; @@ -822,7 +822,7 @@ begin 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; @@ -1783,7 +1783,7 @@ begin 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 @@ -1812,8 +1812,8 @@ begin 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; @@ -1831,12 +1831,12 @@ begin 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; @@ -1901,12 +1901,12 @@ begin 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; @@ -1919,15 +1919,15 @@ begin 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 @@ -1978,7 +1978,7 @@ begin // don't forget to latch this shit gsGameFlags := Options; gsMaxLives := MaxLives; - gsGoalLimit := GoalLimit; + gsScoreLimit := ScoreLimit; gsTimeLimit := TimeLimit; end; @@ -2313,14 +2313,14 @@ 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 @@ -2561,14 +2561,14 @@ 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 @@ -3660,9 +3660,9 @@ 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 4c67d12..1d63ec0 100644 --- a/src/game/g_netmsg.pas +++ b/src/game/g_netmsg.pas @@ -982,7 +982,7 @@ begin 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); @@ -1136,8 +1136,8 @@ begin 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 @@ -1212,7 +1212,7 @@ procedure MH_SEND_GameSettings(ID: Integer = NET_EVERYONE); 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); @@ -1899,8 +1899,8 @@ procedure MC_RECV_GameStats(var M: TMsg); 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 @@ -2365,7 +2365,7 @@ end; 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 5bfedc9..ace7191 100644 --- a/src/game/g_options.pas +++ b/src/game/g_options.pas @@ -68,7 +68,7 @@ var gsMap: String; gsGameMode: String; gsTimeLimit: Word; - gsGoalLimit: Word; + gsScoreLimit: Word; gsMaxLives: Byte; gsPlayers: Byte; gsGameFlags: LongWord; @@ -262,7 +262,7 @@ begin gsMap := ''; gsGameMode := _lc[I_MENU_GAME_TYPE_DM]; gsTimeLimit := 0; - gsGoalLimit := 0; + gsScoreLimit := 0; gsMaxLives := 0; gsPlayers := 1; gsSpawnInvul := 0; @@ -311,7 +311,7 @@ begin 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 1021d36..f926798 100644 --- a/src/game/g_player.pas +++ b/src/game/g_player.pas @@ -573,7 +573,7 @@ type TTeamStat = Array [TEAM_RED..TEAM_BLUE] of record - Goals: SmallInt; + Score: SmallInt; end; var @@ -1488,8 +1488,8 @@ procedure g_Player_ResetAll(Force, Silent: Boolean); 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 @@ -2743,7 +2743,7 @@ begin 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 @@ -2760,7 +2760,7 @@ begin 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]); @@ -2775,7 +2775,7 @@ begin 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; @@ -3484,7 +3484,7 @@ begin 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); @@ -3511,7 +3511,7 @@ begin 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); @@ -3672,7 +3672,7 @@ begin 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 @@ -3682,7 +3682,7 @@ begin 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 @@ -5802,7 +5802,7 @@ begin 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 diff --git a/src/game/g_saveload.pas b/src/game/g_saveload.pas index 9ab4993..6b01c06 100644 --- a/src/game/g_saveload.pas +++ b/src/game/g_saveload.pas @@ -194,7 +194,7 @@ begin // Ëèìèò âðåìåíè utils.writeInt(st, Word(gGameSettings.TimeLimit)); // Ëèìèò î÷êîâ - utils.writeInt(st, Word(gGameSettings.GoalLimit)); + utils.writeInt(st, Word(gGameSettings.ScoreLimit)); // Ëèìèò æèçíåé utils.writeInt(st, Byte(gGameSettings.MaxLives)); // Èãðîâûå îïöèè @@ -291,7 +291,7 @@ var 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, @@ -353,7 +353,7 @@ begin // Ëèìèò âðåìåíè Game_TimeLimit := utils.readWord(st); // Ëèìèò î÷êîâ - Game_GoalLimit := utils.readWord(st); + Game_ScoreLimit := utils.readWord(st); // Ëèìèò æèçíåé Game_MaxLives := utils.readByte(st); // Èãðîâûå îïöèè @@ -395,7 +395,7 @@ begin 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; diff --git a/src/game/g_triggers.pas b/src/game/g_triggers.pas index e9fa513..2509650 100644 --- a/src/game/g_triggers.pas +++ b/src/game/g_triggers.pas @@ -1711,7 +1711,7 @@ begin 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 @@ -1738,7 +1738,7 @@ 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 @@ -1765,7 +1765,7 @@ 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 @@ -1792,7 +1792,7 @@ 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 @@ -1823,7 +1823,7 @@ 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 @@ -1841,7 +1841,7 @@ 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 @@ -1859,7 +1859,7 @@ 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 @@ -1877,7 +1877,7 @@ 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 @@ -1897,7 +1897,7 @@ 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 @@ -1906,9 +1906,9 @@ begin 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 @@ -1931,9 +1931,9 @@ 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 @@ -1959,24 +1959,24 @@ 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 @@ -1984,9 +1984,9 @@ begin 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 @@ -2005,9 +2005,9 @@ begin 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 @@ -2030,17 +2030,17 @@ begin 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;