mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-09 11:28: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();
|
gSM_Messages.Clear();
|
||||||
|
bool failed;
|
||||||
|
|
||||||
if(gEV_Type == Engine_CSS)
|
if(gEV_Type == Engine_CSS)
|
||||||
{
|
{
|
||||||
kv.JumpToKey("CS:S");
|
failed = !kv.JumpToKey("CS:S");
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(gEV_Type == Engine_CSGO)
|
else if(gEV_Type == Engine_CSGO)
|
||||||
{
|
{
|
||||||
kv.JumpToKey("CS:GO");
|
failed = !kv.JumpToKey("CS:GO");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(gEV_Type == Engine_TF2)
|
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
|
do
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user