Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void __thiscall CPlayerInfo::ProcessHungryState(CPlayerInfo *this)
- {
- CPlayerInfo *player; // esi@1
- CPed *playerPed; // ecx@10
- char v3; // dl@12
- __int16 v4; // ax@13
- CPad *pad; // eax@18
- char *text; // eax@19
- char v7; // bl@20
- player = this;
- if ( !cheatEnabled.NeverGetHungry )
- {
- if ( !(dword_B9B8F4 & 1) )
- {
- dword_B9B8F4 |= 1u;
- byte_B9B8F2 = CClock::ms_nGameClockHours;
- }
- if ( !CPad::GetPad(0)->field_10E )
- {
- if ( !panelCount )
- {
- if ( !TheCamera.m_WideScreenOn )
- {
- if ( !CCutsceneMgr::ms_running )
- {
- if ( !inTwoPlayersMode() )
- {
- if ( !player->vehicle )
- {
- playerPed = player->m_pPed;
- if ( player->m_pPed )
- {
- if ( !playerPed->ped.physical.AttachedTo )
- {
- v3 = byte_B9B8F2;
- if ( CClock::ms_nGameClockHours != byte_B9B8F2 )
- {
- v4 = player->field_144;
- if ( !v4 )
- byte_B9B8F1 = 0;
- player->field_144 = v4 + 1;
- }
- if ( player->field_144 <= 48 )
- {
- bHungryMessageShown = 0;
- }
- else
- {
- if ( CClock::ms_nGameClockHours == v3 )
- return;
- CPed::PlaySound(playerPed, 337, 0, 1.0, 0, 0, 0);
- pad = CPad::GetPad(0);
- _CPad::startShake(pad, 400, 0x6Eu, 0);
- if ( bHungryMessageShown )
- {
- v7 = 0;
- if ( getPlayerStat(0x15u) > 0.0 )
- {
- decreasePlayerStat(0x15u, 25.0);
- sub_55B980(0, 0x15u, 0x41C80000u);
- v7 = 1;
- if ( !byte_B9B8F1 )
- byte_B9B8F1 = LOBYTE(player->field_144) + 24;
- }
- if ( getPlayerStat(23u) <= 0.0
- || player->field_144 <= (unsigned __int8)byte_B9B8F1 && byte_B9B8F1 )
- {
- if ( !v7 )
- player->m_pPed->m_fHealth = player->m_pPed->m_fHealth - 2.0;
- }
- else
- {
- decreasePlayerStat(23u, 25.0);
- sub_55B980(0, 23u, 0x41C80000u);
- }
- }
- else
- {
- text = CText::Get(&TheText, "NOTEAT");
- CHud::SetHelpMessage(text, 1, 0, 1);
- bHungryMessageShown = 1;
- }
- }
- if ( CClock::ms_nGameClockHours != byte_B9B8F2 )
- byte_B9B8F2 = CClock::ms_nGameClockHours;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement