mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
5109: Only print zone messages when there is one r=heinrich5991 a=def- ``` src/game/server/entities/character.cpp: In member function ‘void CCharacter::SendZoneMsgs()’: src/game/server/entities/character.cpp:2013:78: warning: the address of ‘CGameContext::m_aaZoneLeaveMsg’ will never be NULL [-Waddress] 2013 | if(m_TuneZoneOld >= 0 && GameServer()->m_aaZoneLeaveMsg[m_TuneZoneOld]) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ In file included from src/game/server/entities/character.cpp:7: src/game/server/gamecontext.h:179:14: note: ‘CGameContext::m_aaZoneLeaveMsg’ declared here 179 | char m_aaZoneLeaveMsg[NUM_TUNEZONES][256]; | ^~~~~~~~~~~~~~~~ src/game/server/entities/character.cpp:2028:53: warning: the address of ‘CGameContext::m_aaZoneEnterMsg’ will never be NULL [-Waddress] 2028 | if(GameServer()->m_aaZoneEnterMsg[m_TuneZone]) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ src/game/server/gamecontext.h:178:14: note: ‘CGameContext::m_aaZoneEnterMsg’ declared here 178 | char m_aaZoneEnterMsg[NUM_TUNEZONES][256]; // 0 is used for switching from or to area without tunings | ^~~~~~~~~~~~~~~~ ``` <!-- What is the motivation for the changes of this pull request --> ## Checklist - [ ] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test if it works standalone, system.c especially - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) 5110: Assert client id in SetSolo r=heinrich5991 a=def- I could not find a way that an invalid client ID is used here, but compiler warns anyway: ``` In member function ‘void CTeamsCore::SetSolo(int, bool)’, inlined from ‘void CCharacter::SetSolo(bool)’ at src/game/client/prediction/entities/character.cpp:29:22, inlined from ‘void CCharacter::HandleTiles(int)’ at src/game/client/prediction/entities/character.cpp:882:10: src/game/teamscore.h:45:34: warning: array subscript [0, 63] is outside array bounds of ‘bool [64]’ [-Warray-bounds] 45 | m_IsSolo[ClientID] = Value; | ~~~~~~~~~~~~~~~~~^ src/game/teamscore.h: In member function ‘void CCharacter::HandleTiles(int)’: src/game/teamscore.h:27:14: note: while referencing ‘CTeamsCore::m_IsSolo’ 27 | bool m_IsSolo[MAX_CLIENTS]; | ^~~~~~~~ ``` <!-- What is the motivation for the changes of this pull request --> ## Checklist - [x] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test if it works standalone, system.c especially - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) 5112: Update traditional_chinese.txt r=def- a=Cheeser0613 <!-- What is the motivation for the changes of this pull request --> ## Checklist - [ ] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test if it works standalone, system.c especially - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) 5115: Update simplified_chinese.txt r=def- a=Cheeser0613 <!-- What is the motivation for the changes of this pull request --> ## Checklist - [ ] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test if it works standalone, system.c especially - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) 5117: Update tooltip text after changing language r=Jupeyy a=def- Thanks to cheeser0613 for report <!-- What is the motivation for the changes of this pull request --> ## Checklist - [x] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test if it works standalone, system.c especially - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: def <dennis@felsin9.de> Co-authored-by: Cheeser0613 <54943099+Cheeser0613@users.noreply.github.com>
This commit is contained in:
commit
ec75563dad
|
@ -21,6 +21,8 @@
|
|||
# 2022-03-24 cheeser0613
|
||||
# 2022-03-29 Dan_cao
|
||||
# 2022-04-01 Dan_cao
|
||||
# 2022-05-14 Dan_cao
|
||||
# 2022-05-14 cheeser0613
|
||||
##### /authors #####
|
||||
|
||||
##### translated strings #####
|
||||
|
@ -726,7 +728,7 @@ Friend message
|
|||
== 好友消息
|
||||
|
||||
Save the best demo of each race
|
||||
== 保存每场游戏最好记录的回放
|
||||
== 保存每场游戏最佳记录的回放
|
||||
|
||||
Ghost
|
||||
== 影子
|
||||
|
@ -818,7 +820,7 @@ Ratio
|
|||
##### Ratio的算法是击杀除以死亡次数 #####
|
||||
|
||||
AntiPing
|
||||
== 延迟补偿
|
||||
== 延迟补偿(AntiPing)
|
||||
|
||||
Countries
|
||||
== 国家
|
||||
|
@ -1369,37 +1371,37 @@ auto
|
|||
== 自动
|
||||
|
||||
Tutorial
|
||||
== 进入教学
|
||||
== 教学
|
||||
|
||||
Can't find a Tutorial server
|
||||
== 无法找到教学服务器
|
||||
|
||||
Toggle to edit your dummy settings
|
||||
==
|
||||
== 编辑分身设置
|
||||
|
||||
Choose default eyes when joining a server
|
||||
==
|
||||
== 进入服务器时的默认表情
|
||||
|
||||
Allows maps to render with more detail
|
||||
==
|
||||
== 允许地图渲染更多细节
|
||||
|
||||
When you cross the start line, show a ghost tee replicating the movements of your best time
|
||||
==
|
||||
== 当越过起跑线时,游戏里将有影子回放你的最佳成绩
|
||||
|
||||
Opacity
|
||||
==
|
||||
== 不透明度
|
||||
|
||||
Adjust the opacity of entities belonging to other teams, such as tees and nameplates
|
||||
==
|
||||
== 调整单人区域或其他队伍中玩家的不透明度
|
||||
|
||||
Quads are used for background decoration
|
||||
==
|
||||
== 显示用作背景装饰的贴图
|
||||
|
||||
Tries to predict other entities to give a feel of low latency
|
||||
==
|
||||
== 尝试预测其他实体物以带来低延迟的游玩体验
|
||||
|
||||
Super
|
||||
==
|
||||
== 无敌
|
||||
|
||||
Team %d
|
||||
==
|
||||
== 队伍 %d
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
# 2022-03-19 cheeser0613
|
||||
# 2022-03-22 cheeser0613
|
||||
# 2022-03-24 cheeser0613
|
||||
# 2022-05-14 cheeser0613
|
||||
##### /authors #####
|
||||
|
||||
##### translated strings #####
|
||||
|
@ -1047,7 +1048,7 @@ DDraceNetwork is a cooperative online game where the goal is for you and your gr
|
|||
== DDraceNetwork 是以到達地圖終點為目標,單人或組隊的線上合作遊戲。如果你是新手,你可以從有入門級地圖的 Novice 伺服器開 始。記得選擇 Ping 值低的伺服器。
|
||||
|
||||
It's recommended that you check the settings to adjust them to your liking before joining a server.
|
||||
== 推薦在進入伺服器前,先將設定調整到符合你的習慣。
|
||||
== 推薦在加入伺服器前,先將設定調整到符合你的習慣。
|
||||
|
||||
Please enter your nickname below.
|
||||
== 請輸入你的暱稱。
|
||||
|
@ -1336,10 +1337,10 @@ Windowed fullscreen
|
|||
== 視窗化全螢幕
|
||||
|
||||
The format of texture %s is not RGBA which will cause visual bugs.
|
||||
== %s 材質文件并非RGBA格式因此可能會導致視覺錯誤
|
||||
== 紋理文件 %s 并非 RGBA 格式,這可能會導致顯示錯誤
|
||||
|
||||
Join Tutorial Server
|
||||
== 進入教學伺服器
|
||||
== 加入教學伺服器
|
||||
|
||||
Skip Tutorial
|
||||
== 跳過教學
|
||||
|
@ -1348,7 +1349,7 @@ Renderer
|
|||
== 渲染設定
|
||||
|
||||
default
|
||||
== 默認
|
||||
== 預設
|
||||
|
||||
custom
|
||||
== 自定義
|
||||
|
@ -1360,37 +1361,37 @@ auto
|
|||
== 自動
|
||||
|
||||
Tutorial
|
||||
== 進入教學
|
||||
== 教學
|
||||
|
||||
Toggle to edit your dummy settings
|
||||
==
|
||||
== 編輯分身設定
|
||||
|
||||
Choose default eyes when joining a server
|
||||
==
|
||||
== 加入伺服器時的預設表情
|
||||
|
||||
Allows maps to render with more detail
|
||||
==
|
||||
== 允許地圖渲染更多細節
|
||||
|
||||
When you cross the start line, show a ghost tee replicating the movements of your best time
|
||||
==
|
||||
== 當越過起跑綫時,游戲裏將有影子回放你的最佳成績
|
||||
|
||||
Opacity
|
||||
==
|
||||
== 不透明度
|
||||
|
||||
Adjust the opacity of entities belonging to other teams, such as tees and nameplates
|
||||
==
|
||||
== 調整單人區域或其他隊伍中玩家的不透明度
|
||||
|
||||
Quads are used for background decoration
|
||||
==
|
||||
== 顯示用於背景裝飾的貼圖
|
||||
|
||||
Tries to predict other entities to give a feel of low latency
|
||||
==
|
||||
== 嘗試預測其他實體物以帶來低延遲的游玩體驗
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
== 無法找到教學伺服器
|
||||
|
||||
Super
|
||||
==
|
||||
== 無敵
|
||||
|
||||
Team %d
|
||||
==
|
||||
== 隊伍 %d
|
||||
|
|
|
@ -40,6 +40,7 @@ void CTooltips::DoToolTip(const void *pID, const CUIRect *pNearRect, const char
|
|||
if(!result.second)
|
||||
{
|
||||
Tooltip.m_Rect = *pNearRect; // update in case of window resize
|
||||
Tooltip.m_pText = pText; // update in case of language change
|
||||
}
|
||||
|
||||
Tooltip.m_OnScreen = true;
|
||||
|
|
|
@ -2010,7 +2010,7 @@ void CCharacter::SendZoneMsgs()
|
|||
{
|
||||
// send zone leave msg
|
||||
// (m_TuneZoneOld >= 0: avoid zone leave msgs on spawn)
|
||||
if(m_TuneZoneOld >= 0 && GameServer()->m_aaZoneLeaveMsg[m_TuneZoneOld])
|
||||
if(m_TuneZoneOld >= 0 && GameServer()->m_aaZoneLeaveMsg[m_TuneZoneOld][0])
|
||||
{
|
||||
const char *pCur = GameServer()->m_aaZoneLeaveMsg[m_TuneZoneOld];
|
||||
const char *pPos;
|
||||
|
@ -2025,7 +2025,7 @@ void CCharacter::SendZoneMsgs()
|
|||
GameServer()->SendChatTarget(m_pPlayer->GetCID(), pCur);
|
||||
}
|
||||
// send zone enter msg
|
||||
if(GameServer()->m_aaZoneEnterMsg[m_TuneZone])
|
||||
if(GameServer()->m_aaZoneEnterMsg[m_TuneZone][0])
|
||||
{
|
||||
const char *pCur = GameServer()->m_aaZoneEnterMsg[m_TuneZone];
|
||||
const char *pPos;
|
||||
|
|
|
@ -42,6 +42,7 @@ public:
|
|||
void Reset();
|
||||
void SetSolo(int ClientID, bool Value)
|
||||
{
|
||||
dbg_assert(ClientID >= 0 && ClientID < MAX_CLIENTS, "Invalid client id");
|
||||
m_IsSolo[ClientID] = Value;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue