Advertisement
Dimitri_UA

Untitled

Oct 12th, 2013
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.24 KB | None | 0 0
  1. void __thiscall CPlayerInfo::ProcessHungryState(CPlayerInfo *this)
  2. {
  3.   CPlayerInfo *player; // esi@1
  4.   CPed *playerPed; // ecx@10
  5.   char v3; // dl@12
  6.   __int16 v4; // ax@13
  7.   CPad *pad; // eax@18
  8.   char *text; // eax@19
  9.   char v7; // bl@20
  10.  
  11.   player = this;
  12.   if ( !cheatEnabled.NeverGetHungry )
  13.   {
  14.     if ( !(dword_B9B8F4 & 1) )
  15.     {
  16.       dword_B9B8F4 |= 1u;
  17.       byte_B9B8F2 = CClock::ms_nGameClockHours;
  18.     }
  19.     if ( !CPad::GetPad(0)->field_10E )
  20.     {
  21.       if ( !panelCount )
  22.       {
  23.         if ( !TheCamera.m_WideScreenOn )
  24.         {
  25.           if ( !CCutsceneMgr::ms_running )
  26.           {
  27.             if ( !inTwoPlayersMode() )
  28.             {
  29.               if ( !player->vehicle )
  30.               {
  31.                 playerPed = player->m_pPed;
  32.                 if ( player->m_pPed )
  33.                 {
  34.                   if ( !playerPed->ped.physical.AttachedTo )
  35.                   {
  36.                     v3 = byte_B9B8F2;
  37.                     if ( CClock::ms_nGameClockHours != byte_B9B8F2 )
  38.                     {
  39.                       v4 = player->field_144;
  40.                       if ( !v4 )
  41.                         byte_B9B8F1 = 0;
  42.                       player->field_144 = v4 + 1;
  43.                     }
  44.                     if ( player->field_144 <= 48 )
  45.                     {
  46.                       bHungryMessageShown = 0;
  47.                     }
  48.                     else
  49.                     {
  50.                       if ( CClock::ms_nGameClockHours == v3 )
  51.                         return;
  52.                       CPed::PlaySound(playerPed, 337, 0, 1.0, 0, 0, 0);
  53.                       pad = CPad::GetPad(0);
  54.                       _CPad::startShake(pad, 400, 0x6Eu, 0);
  55.                       if ( bHungryMessageShown )
  56.                       {
  57.                         v7 = 0;
  58.                         if ( getPlayerStat(0x15u) > 0.0 )
  59.                         {
  60.                           decreasePlayerStat(0x15u, 25.0);
  61.                           sub_55B980(0, 0x15u, 0x41C80000u);
  62.                           v7 = 1;
  63.                           if ( !byte_B9B8F1 )
  64.                             byte_B9B8F1 = LOBYTE(player->field_144) + 24;
  65.                         }
  66.                         if ( getPlayerStat(23u) <= 0.0
  67.                           || player->field_144 <= (unsigned __int8)byte_B9B8F1 && byte_B9B8F1 )
  68.                         {
  69.                           if ( !v7 )
  70.                             player->m_pPed->m_fHealth = player->m_pPed->m_fHealth - 2.0;
  71.                         }
  72.                         else
  73.                         {
  74.                           decreasePlayerStat(23u, 25.0);
  75.                           sub_55B980(0, 23u, 0x41C80000u);
  76.                         }
  77.                       }
  78.                       else
  79.                       {
  80.                         text = CText::Get(&TheText, "NOTEAT");
  81.                         CHud::SetHelpMessage(text, 1, 0, 1);
  82.                         bHungryMessageShown = 1;
  83.                       }
  84.                     }
  85.                     if ( CClock::ms_nGameClockHours != byte_B9B8F2 )
  86.                       byte_B9B8F2 = CClock::ms_nGameClockHours;
  87.                   }
  88.                 }
  89.               }
  90.             }
  91.           }
  92.         }
  93.       }
  94.     }
  95.   }
  96. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement