bool func_29(int iParam0, Vector3 vParam1, float fParam2, int iParam3) { Vector3 vVar0; Vector3 vVar3; float fVar6; vVar0 = {func_31(vParam1 - ENTITY::GET_ENTITY_COORDS(iParam0, 1))}; if (fParam4 < 0.1f || fParam4 > 360f) { return true; } if (iParam5 == 0) { vVar3 = {get_entity_forward_vector(iParam0)}; } else { vVar3 = {func_31(get_ped_bone_coords(iParam0, 31086, 0f, 5f, 0f) - get_ped_bone_coords(iParam0, 31086, 0f, 0f, 0f))}; } fVar6 = func_30(vVar3, vVar0); if (fVar6 <= cos(fParam4 / 2f)) { return false; } return true; }
static uint32_t func_1(void) { uint32_t l_2 = 0UL; int32_t l_4[7][5] = {{0x5872D9EEL, 0x9ED9BA07L, 0x9ED9BA07L, -1L, 0x9ED9BA07L}, {0x2285FAAFL, 0x9ED9BA07L, -1L, 6L, 0x5872D9EEL}, {-1L, 0x2285FAAFL, 0x5872D9EEL, 6L, 6L}, {6L, -1L, 0x9ED9BA07L, -1L, -3L}, {6L, -1L, -1L, 0x2285FAAFL, 0x5872D9EEL}, {-1L, -1L, -1L, -3L, 0x2285FAAFL}, {0x2285FAAFL, -1L, 0x9ED9BA07L, 0x2285FAAFL, 0x2285FAAFL}}; int i; int j; l_4[2][3] = print0((l_2 < g_3) & g_3, 43); for (g_3 = print1(-27, 44); g_3 <= 17; g_3 += print2(3, 44)) { uint32_t l_23 = 0xE3D1AA12L; if (((int8_t) func_9(g_3, g_3, g_3)) << ((int8_t) 0)) { g_30[2] = print3(((int16_t) (func_19(6L || 0UL, l_23, g_14[4][0]) && 0x5CL)) << ((int16_t) l_23), 49); } else { int16_t l_37 = 1L; l_4[2][3] = print4(func_31(((((uint16_t) ((l_4[0][4] == g_30[2]) <= l_37)) - ((uint16_t) l_23)) | g_29[0][7]) <= g_3, l_2, l_4[2][3]), 54); } for (g_13 = print5(2, 56); g_13 >= 0; g_13 -= print6(1, 56)) { int32_t l_46 = -1L; int i; g_43 = print7(g_30[g_13] ^ g_30[g_13], 60); l_46 ^= print8((((int16_t) (((g_30[g_13], g_13)) <= 1UL)) - ((int16_t) g_3)) ^ g_29[1][3], 61); } } return l_4[2][3]; }
void main() { int iVar0; iLocal_2 = 1; iLocal_3 = 134; iLocal_4 = 134; iLocal_5 = 1; iLocal_6 = 1; iLocal_7 = 1; iLocal_8 = 134; iLocal_9 = 1; iLocal_10 = 12; iLocal_11 = 12; fLocal_14 = 0.001f; iLocal_17 = -1; sLocal_20 = "NULL"; fLocal_21 = 0f; fLocal_25 = -0.0375f; fLocal_26 = 0.17f; iLocal_28 = 1; if (PLAYER::HAS_FORCE_CLEANUP_OCCURRED(18)) { func_38(); } func_37(20); func_36(); func_35(1); func_35(0); func_35(2); func_35(13); func_35(12); Global_2288 = 1; func_34(); if (!func_33(-1615086084)) { func_32(-1615086084, 2, 2, 2, 1, -1, 5); } if (!func_33(-1970925435)) { func_32(-1970925435, 2, 0, 0, 1, -1, 5); } if (!func_33(-1817481777)) { func_32(-1817481777, 2, 12, 3, 1, -1, 5); } iVar0 = false; while (func_31(23) && !func_30(134)) { if (func_26() == 1) { if (ENTITY::DOES_ENTITY_EXIST(PLAYER::PLAYER_PED_ID())) { if (!PED::IS_PED_INJURED(PLAYER::PLAYER_PED_ID())) { if ((!is_ped_falling(PLAYER::PLAYER_PED_ID()) && !is_entity_in_water(PLAYER::PLAYER_PED_ID())) && !is_entity_on_fire(PLAYER::PLAYER_PED_ID())) { if (!iVar0) { if (!((func_25() || is_player_switch_in_progress()) || func_24())) { if (func_13()) { iVar0 = true; } } } else { if (iLocal_28) { set_player_control(player_id(), false, 384); set_ped_max_move_blend_ratio(PLAYER::PLAYER_PED_ID(), 0f); enable_control_action(0, 173, 1); enable_control_action(0, 172, 1); enable_control_action(0, 174, 1); enable_control_action(0, 175, 1); enable_control_action(0, 176, 1); enable_control_action(0, 177, 1); enable_control_action(0, 178, 1); enable_control_action(0, 179, 1); enable_control_action(0, 180, 1); enable_control_action(0, 181, 1); } else { set_player_control(player_id(), true, 0); } switch (func_12()) { case -1615086084: if (!func_33(-1989308064)) { func_8(-1989308064, 0, 1, 0, 1, 6000, 6000, -1, 0, -1, 68); } break; case -1989308064: func_7(12, 0); func_6(134, 1); STATS::STAT_SET_INT(joaat("sp_final_decision"), 2, 1); break; case -1970925435: if (!func_33(-1060930305)) { func_8(-1060930305, 0, 1, 2, 2, 6000, 6000, -1, 0, -1, 68); } break; case -1060930305: func_7(12, 1); func_6(134, 1); STATS::STAT_SET_INT(joaat("sp_final_decision"), true, 1); break; case -1817481777: func_7(12, 2); func_6(134, 1); STATS::STAT_SET_INT(joaat("sp_final_decision"), 3, 1); break; default: if (!func_5(0)) { iVar0 = false; } else if (iLocal_28) { if (func_4()) { iLocal_28 = 0; } } break; } } } } } } wait(0); } func_3(20); Global_91317 = 0; func_1(); func_38(); }
void func_27() { int iVar0; float fVar1; float fVar2; float fVar3; float fVar4; float fVar5; float fVar6; float fVar7; Vector3 fVar8; int iVar9; iVar0 = 0; Global_100890 = 0; Global_100891 = 0; Global_100892 = 0; Global_100893 = 0; Global_100894 = 0; Global_100895 = 0; Global_100896 = 0; fVar1 = 0f; fVar2 = 0f; fVar3 = 0f; fVar4 = 0f; fVar5 = 0f; fVar6 = 0f; fVar7 = 0f; fVar8 = Global_101154.f_8884.f_3853; Global_101154.f_8884.f_3853 = 0f; while (iVar0 < 321) { if (Global_101154.f_8884[iVar0 /*12*/].f_5 == 1) { switch (Global_101154.f_8884[iVar0 /*12*/].f_6) { case 1: Global_100890++; fVar1 += Global_101154.f_8884[iVar0 /*12*/].f_4; break; case 3: Global_100891++; fVar2 += Global_101154.f_8884[iVar0 /*12*/].f_4; break; case 5: Global_100892++; fVar3 += Global_101154.f_8884[iVar0 /*12*/].f_4; break; case 7: Global_100893++; fVar4 += Global_101154.f_8884[iVar0 /*12*/].f_4; break; case 9: Global_100894++; fVar5 += Global_101154.f_8884[iVar0 /*12*/].f_4 * 4f; break; case 11: Global_100895++; fVar6 += Global_101154.f_8884[iVar0 /*12*/].f_4; break; case 13: Global_100896++; fVar7 += Global_101154.f_8884[iVar0 /*12*/].f_4; break; default: break; } } iVar0++; } if (Global_100873 > 0) { if (Global_100890 == Global_100873) { fVar1 = 55f; } } if (Global_100874 > 0) { if (Global_100891 == Global_100874) { fVar2 = 10f; } } if (Global_100875 > 0) { if (Global_100892 == Global_100875) { fVar3 = 0f; } } if (Global_100876 > 0) { if (Global_100893 == Global_100876) { fVar4 = 10f; } } if (Global_100877 > 0) { if (((Global_100894 == Global_100877 || Global_100877 * 10 / Global_100894 < 41) || Global_100894 > Global_100880) || Global_100894 == Global_100880) { if (!GAMEPLAY::IS_BIT_SET(Global_101154.f_8884.f_3856, 14)) { if (Global_100894 == Global_100877) { _0x11FF1C80276097ED(joaat("num_rndevents_completed"), Global_100877, 0); GAMEPLAY::SET_BIT(&(Global_101154.f_8884.f_3856), 14); } } fVar5 = 5f; } } if (Global_100878 > 0) { if (Global_100895 == Global_100878) { fVar6 = 15f; } } if (Global_100879 > 0) { if (Global_100896 == Global_100879) { fVar7 = 5f; } } Global_101154.f_8884.f_3853 = fVar1 + fVar2 + fVar3 + fVar4 + fVar5 + fVar6 + fVar7; if (Global_100894 > Global_100880 || Global_100894 == Global_100880) { iVar9 = Global_100880; } else { iVar9 = Global_100894; } STATS::STAT_SET_INT(joaat("num_missions_completed"), Global_100890, 1); STATS::STAT_SET_INT(joaat("num_missions_available"), Global_100873, 1); STATS::STAT_SET_INT(joaat("num_minigames_completed"), Global_100891, 1); STATS::STAT_SET_INT(joaat("num_minigames_available"), Global_100874, 1); STATS::STAT_SET_INT(joaat("num_oddjobs_completed"), Global_100892, 1); STATS::STAT_SET_INT(joaat("num_oddjobs_available"), Global_100875, 1); STATS::STAT_SET_INT(joaat("num_rndpeople_completed"), Global_100893, 1); STATS::STAT_SET_INT(joaat("num_rndpeople_available"), Global_100876, 1); STATS::STAT_SET_INT(joaat("num_rndevents_completed"), iVar9, 1); STATS::STAT_SET_INT(joaat("num_rndevents_available"), Global_100880, 1); STATS::STAT_SET_INT(joaat("num_misc_completed"), Global_100896 + Global_100895, 1); STATS::STAT_SET_INT(joaat("num_misc_available"), Global_100879 + Global_100878, 1); Global_100897 = Global_100890 * 100 / Global_100873; Global_100899 = Global_100892 + Global_100891 * 100 / Global_100875 + Global_100874; Global_100898 = Global_100893 + iVar9 * 100 / Global_100876 + Global_100880; Global_100900 = Global_100895 + Global_100896 * 100 / Global_100878 + Global_100879; STATS::STAT_SET_FLOAT(joaat("total_progress_made"), Global_101154.f_8884.f_3853, 1); STATS::STAT_SET_INT(joaat("percent_story_missions"), Global_100897, 1); STATS::STAT_SET_INT(joaat("percent_ambient_missions"), Global_100898, 1); STATS::STAT_SET_INT(joaat("percent_oddjobs"), Global_100899, 1); if (fVar8 > 0f && floor(fVar8) < floor(Global_101154.f_8884.f_3853)) { func_31(13, floor(Global_101154.f_8884.f_3853)); } if (!_0xBEDB96A7584AA8CF()) { if (!Global_69489) { if (func_30() == 2 == 0 && !NETWORK::NETWORK_IS_GAME_IN_PROGRESS()) { if (network_is_cloud_available()) { Global_100888 = 0; } if (!Global_55749) { func_28(); } } } } }
/* * reads : g_5 g_43 g_9 g_47 g_48 g_47.f0.f0 g_53 g_54 g_73 * writes: g_5 g_43 g_9 g_48 g_53 g_54 */ static int32_t func_1(void) { /* block id: 0 */ int8_t l_4 = 0x45L; union U3 l_6[7][7] = {{{{0x87E08A11L}},{{0UL}},{{0x87E08A11L}},{{0UL}},{{0x87E08A11L}},{{0UL}},{{0x87E08A11L}}},{{{0x15AA9614L}},{{0x4F094650L}},{{0x4F094650L}},{{0x15AA9614L}},{{0x15AA9614L}},{{0x4F094650L}},{{0x4F094650L}}},{{{0x1E66C619L}},{{0UL}},{{0x1E66C619L}},{{0UL}},{{0x1E66C619L}},{{0UL}},{{0x1E66C619L}}},{{{0x15AA9614L}},{{0x15AA9614L}},{{0x4F094650L}},{{0x4F094650L}},{{0x15AA9614L}},{{0x15AA9614L}},{{0x4F094650L}}},{{{0x87E08A11L}},{{0UL}},{{0x87E08A11L}},{{0UL}},{{0x87E08A11L}},{{0UL}},{{0x87E08A11L}}},{{{0x15AA9614L}},{{0x4F094650L}},{{0x4F094650L}},{{0x15AA9614L}},{{0x15AA9614L}},{{0x4F094650L}},{{0x4F094650L}}},{{{0x1E66C619L}},{{0UL}},{{0x1E66C619L}},{{0UL}},{{0x1E66C619L}},{{0UL}},{{0x1E66C619L}}}}; int32_t l_12 = 1L; int32_t *l_42 = (void*)0; union U3 l_52[1] = {{{0UL}}}; int32_t l_68 = 6L; int32_t l_69 = 0xA0C022ADL; int i, j; lbl_82: if (((int8_t)(l_4 , g_5) << (int8_t)g_5)) { /* block id: 1 */ int16_t l_18 = 0x7F21L; int32_t l_22 = 0x42B622B6L; uint32_t l_23 = 4294967295UL; int16_t l_65 = (-1L); for (g_5 = 1; (g_5 <= 6); g_5 += 1) { /* block id: 4 */ int32_t *l_7 = (void*)0; int32_t *l_8 = &g_9[0]; int32_t *l_10 = (void*)0; int32_t *l_11 = (void*)0; int32_t *l_13 = (void*)0; int32_t *l_14 = (void*)0; int32_t l_15 = (-1L); int32_t *l_16 = &g_9[0]; int32_t *l_17 = &g_9[0]; int32_t *l_19 = &g_9[0]; int32_t *l_20 = (void*)0; int32_t *l_21[7][7] = {{(void*)0,&g_9[0],(void*)0,&g_9[0],(void*)0,&g_9[0],(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,&g_9[0],(void*)0,&g_9[0],(void*)0,&g_9[0],(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,&g_9[0],(void*)0,&g_9[0],(void*)0,&g_9[0],(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0},{(void*)0,&g_9[0],(void*)0,&g_9[0],(void*)0,&g_9[0],(void*)0}}; int i, j; l_23++; return l_12; } if (func_26(func_31(func_36((((int16_t)(((((int8_t)l_23 - (int8_t)l_23) >= l_12) != 0x3EDEL) ^ 0UL) - (int16_t)0UL) , l_42)), l_42, g_9[0], g_9[0]), l_52[0], g_53, &g_54)) { /* block id: 34 */ int32_t l_64 = 1L; int32_t *l_66 = &g_5; int32_t *l_67[1]; uint8_t l_70 = 255UL; int i; for (i = 0; i < 1; i++) l_67[i] = &g_54; (*l_66) ^= (((((uint8_t)((uint8_t)l_64 + (uint8_t)g_9[0]) * (uint8_t)l_65) < l_18) >= g_47.f0.f0) , (*g_53)); if (l_18) goto lbl_82; --l_70; } else { /* block id: 37 */ int32_t **l_74[7][4] = {{&l_42,&l_42,&l_42,&l_42},{&l_42,&l_42,&l_42,&l_42},{&l_42,&l_42,&l_42,&l_42},{&l_42,&l_42,&l_42,&l_42},{&l_42,&l_42,&l_42,&l_42},{&l_42,&l_42,&l_42,&l_42},{&l_42,&l_42,&l_42,&l_42}}; int i, j; (*g_73) = g_48; g_53 = &g_5; } } else { /* block id: 41 */ int32_t **l_76 = &l_42; int32_t ***l_75 = &l_76; uint16_t l_77 = 0xC540L; if ((((*l_75) = &g_53) == &g_53)) { /* block id: 43 */ l_77--; } else { /* block id: 45 */ l_68 ^= ((**l_76) = 0x56B38323L); } (***l_75) = ((uint8_t)g_9[0] << (uint8_t)1); } (*g_53) = l_69; return g_54; }