Advertisement
fakuivan

CEconItemDefinition::BInitFromKV tool conditionals

May 26th, 2017
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1.   bIsTool = KeyValues::GetBool(this->kv, "is_tool", 0, 0);// if "is_tool" is "1"
  2.   bSomeCondition = 1;
  3.   if ( !bIsTool )                               // if "is_tool" is not "1"
  4.   {
  5.     sItemClass = *(_DWORD *)(this + 204);       // get "item_class"
  6.     bSomeCondition = 0;
  7.     if ( sItemClass )                           // if "item_class" is not empty
  8.       bSomeCondition = V_stricmp(sItemClass, "tool") == 0;// if "item_class" is not "tool"
  9.   }
  10.   *(_BYTE *)(this + 149) = bSomeCondition; //this->m_bSomeCondition
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement