mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-08 02:48:26 +00:00
add checks for config parsing
"might also as well add some checks to config parsing" // GAMMACASE
This commit is contained in:
parent
e2aedb4a0b
commit
797d10a1da
@ -259,23 +259,27 @@ bool LoadChatSettings()
|
||||
}
|
||||
|
||||
gSM_Messages.Clear();
|
||||
bool failed;
|
||||
|
||||
if(gEV_Type == Engine_CSS)
|
||||
{
|
||||
kv.JumpToKey("CS:S");
|
||||
failed = !kv.JumpToKey("CS:S");
|
||||
}
|
||||
|
||||
else if(gEV_Type == Engine_CSGO)
|
||||
{
|
||||
kv.JumpToKey("CS:GO");
|
||||
failed = !kv.JumpToKey("CS:GO");
|
||||
}
|
||||
|
||||
if(gEV_Type == Engine_TF2)
|
||||
{
|
||||
kv.JumpToKey("TF2");
|
||||
failed = !kv.JumpToKey("TF2");
|
||||
}
|
||||
|
||||
kv.GotoFirstSubKey(false);
|
||||
if(failed || !kv.GotoFirstSubKey(false))
|
||||
{
|
||||
SetFailState("Invalid \"configs/shavit-chatsettings.cfg\" file, or the game section is missing");
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user