[QuickPatch] Optimize selectStringTableEntryInDvar expression

This commit is contained in:
momo5502 2017-01-12 22:15:57 +01:00
parent 04dad4e86a
commit c4e2b3e020

View File

@ -124,7 +124,7 @@ namespace Components
std::string dvarName = args[3];
Game::dvar_t* dvar = Game::Dvar_FindVar(dvarName.data());
if (Command::Find(dvarName) || (dvar && (dvar->flags & Game::DVAR_FLAG_WRITEPROTECTED || dvar->flags & Game::DVAR_FLAG_CHEAT || dvar->flags & Game::DVAR_FLAG_READONLY)))
if (Command::Find(dvarName) || (dvar && (dvar->flags & (Game::DVAR_FLAG_WRITEPROTECTED | Game::DVAR_FLAG_CHEAT | Game::DVAR_FLAG_READONLY))))
{
return;
}