Exemplo n.º 1
0
int func_39(int iParam0)
{
	int iVar0;
	int iVar1;
	
	iVar1 = 0;
	iVar0 = 0;
	while (iVar0 < Global_101154.f_6378.f_136)
	{
		if (Global_101154.f_6378[iVar0 /*15*/] == iParam0)
		{
			if (Global_36258 != iVar0)
			{
				func_46(iVar0);
				func_43(iParam0);
				iVar1 = 1;
			}
		}
		iVar0++;
	}
	iVar0 = 0;
	while (iVar0 < Global_101154.f_6378.f_198)
	{
		if (Global_101154.f_6378.f_137[iVar0 /*15*/] == iParam0)
		{
			func_43(iParam0);
			iVar1 = 1;
		}
		iVar0++;
	}
	iVar0 = 0;
	while (iVar0 < Global_101154.f_6378.f_650)
	{
		if (Global_101154.f_6378.f_199[iVar0 /*15*/] == iParam0)
		{
			func_42(iParam0);
			iVar1 = 1;
		}
		iVar0++;
	}
	iVar0 = 0;
	while (iVar0 < Global_101154.f_6378.f_764)
	{
		if (Global_101154.f_6378.f_651[iVar0 /*14*/] == iParam0)
		{
			func_41(iVar0);
			iVar1 = 1;
		}
		iVar0++;
	}
	iVar0 = 0;
	while (iVar0 < Global_101154.f_6378.f_866)
	{
		if (Global_101154.f_6378.f_765[iVar0 /*10*/] == iParam0)
		{
			func_40(iVar0);
			iVar1 = 1;
		}
		iVar0++;
	}
	return iVar1;
}
void main()
{
	Vector3 vVar0;
	Vector3 vVar3;
	
	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_18 = "NULL";
	fLocal_21 = 0f;
	fLocal_25 = -0.0375f;
	fLocal_26 = 0.17f;
	fLocal_30 = 80f;
	fLocal_31 = 140f;
	fLocal_32 = 180f;
	iLocal_35 = 3;
	iLocal_85 = -1;
	iLocal_86 = -1;
	if (PLAYER::HAS_FORCE_CLEANUP_OCCURRED(19))
	{
		func_55();
	}
	if (!func_52())
	{
		func_55();
	}
	if (!func_51(iLocal_82))
	{
		func_55();
	}
	else
	{
		func_50();
		iLocal_83 = GAMEPLAY::GET_GAME_TIMER();
		iLocal_85 = func_49();
		iLocal_84 = 0;
		func_48(1, &uLocal_88);
	}
	while (true)
	{
		if (!PED::IS_PED_INJURED(PLAYER::PLAYER_PED_ID()))
		{
			if (!func_51(iLocal_82))
			{
				func_55();
			}
			vVar0 = {ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), 1)};
			vVar3 = {ENTITY::GET_ENTITY_COORDS(iLocal_82, 1)};
			if (vdist2(vVar0, vVar3) >= 100f * 100f)
			{
				func_55();
			}
			switch (iLocal_87)
			{
				case 0:
					func_43(vVar3, vVar0, 18000, 1101004800);
					if (func_25(&iLocal_82, 0))
					{
						func_24();
						func_16(0);
						func_12(vVar3, vVar0);
						request_anim_dict(func_11());
						iLocal_87 = 1;
					}
					break;
				
				case 1:
					if (func_5(&iLocal_82, &iLocal_79, &iLocal_86))
					{
						iLocal_87 = 2;
					}
					break;
				
				case 2:
					if (!func_4(iLocal_82, 1805844857) && !is_ped_fleeing(iLocal_82))
					{
						if (!is_entity_playing_anim(iLocal_82, func_11(), func_3(), 3))
						{
							func_1();
						}
					}
					else
					{
						func_55();
					}
					break;
				}
		}
		wait(0);
	}
}
Exemplo n.º 3
0
/* 
 * reads : g_14 g_22 g_51 g_21
 * writes: g_21 g_22
 */
uint32_t  func_1(void)
{ /* block id: 0 */
    uint8_t l_9 = 8L;
    int32_t *l_17 = 0;
    int32_t l_18 = 0xAAD9DDCEL;
    int32_t **l_19 = 0;
    int32_t **l_20[9][6];
    int64_t l_23 = 0x9EA7EB8E136DC992LL;
    int i, j;
    for (i = 0; i < 9; i++)
    {
        for (j = 0; j < 6; j++)
            l_20[i][j] = 0;
    }
    g_21 = func_2((!(safe_mul_func_int16_t_s_s(l_9, ((safe_div_func_int16_t_s_s((l_9 ^ l_9), (safe_lshift_func_int8_t_s_s(g_14[0], g_14[2])))) == (safe_mod_func_int64_t_s_s(g_14[0], (g_14[0] >= g_14[0]))))))), 0, l_17, l_18);
    g_22 ^= (0xB1510AFBL & (l_23 <= (~g_14[0])));
    for (l_23 = -17; (l_23 > -24); l_23 = safe_sub_func_int32_t_s_s(l_23, 7))
    { /* block id: 7 */
        uint64_t l_38[8][1];
        int32_t *l_50[1][9];
        int i, j;
        for (i = 0; i < 8; i++)
        {
            for (j = 0; j < 1; j++)
                l_38[i][j] = 0xCA0CEC51938D10FBLL;
        }
        for (i = 0; i < 1; i++)
        {
            for (j = 0; j < 9; j++)
                l_50[i][j] = &l_18;
        }
        if ((safe_mul_func_uint16_t_u_u(g_22, 0x205F5A2FL)))
        { /* block id: 8 */
            int16_t l_28 = 0x13E4L;
            return l_28;
        }
        else
        { /* block id: 10 */
            uint16_t l_33 = -1L;
            if ((safe_mod_func_uint16_t_u_u((safe_div_func_uint16_t_u_u(l_33, ((safe_add_func_int32_t_s_s((safe_mul_func_int16_t_s_s(l_38[3][0], (safe_div_func_int16_t_s_s(l_33, g_14[0])))), g_14[4])) ^ ((safe_mul_func_int8_t_s_s(func_43(l_50[0][1], g_51, &g_21, &g_22), (g_21 != g_21))) >= (g_14[2] || g_51))))), g_14[5])))
            { /* block id: 14 */
                int64_t l_56[7];
                int i;
                for (i = 0; i < 7; i++)
                    l_56[i] = 0x11CD4EE3B919D6B8LL;
                g_22 &= ((safe_sub_func_uint64_t_u_u((safe_sub_func_int16_t_s_s(1L, 0x41A4633BL)), g_14[0])) && (0x84D23765L > l_56[6]));
                g_22 = (safe_add_func_int32_t_s_s(l_56[6], -10L));
            }
            else
            { /* block id: 17 */
                return g_51;
            }
        }
    }
    return g_51;
}
Exemplo n.º 4
0
void func_1()
{
	Vector3 vVar0;
	Vector3 vVar3;
	
	vVar0 = {1.5f, 1.5f, 1.5f};
	switch (iLocal_322)
	{
		case 0:
			if (Global_1572920 == 8)
			{
				Global_1572920 = -1;
			}
			if (func_63() == 5)
			{
				iLocal_326 = network_create_synchronised_scene(vLocal_343, vLocal_346, 2, false, true, 1f, 0f, 1f);
				network_add_ped_to_synchronised_scene(PLAYER::PLAYER_PED_ID(), iLocal_326, sLocal_329, sLocal_331, 8f, -2f, 261, 0, 1000f, 0);
				network_start_synchronised_scene(iLocal_326);
				iLocal_322 = 7;
			}
			else if (func_48(8))
			{
				if ((((func_44(vLocal_339, vVar0) && get_interior_from_entity(PLAYER::PLAYER_PED_ID()) == get_interior_at_coords(vLocal_339)) && is_entity_in_angled_area(PLAYER::PLAYER_PED_ID(), vLocal_333, vLocal_336, 2f, 0, true, 0)) && func_43()) && !func_40(player_id()))
				{
					if (iLocal_328 == -1)
					{
						func_39(&iLocal_328, 3, "SA_BED_IN", 0, 0, 0, 0);
					}
					iLocal_322 = 1;
				}
			}
			break;
		
		case 1:
			if (func_38(1, 0, 1))
			{
				if (((((func_44(vLocal_339, vVar0) && func_48(8)) && get_interior_from_entity(PLAYER::PLAYER_PED_ID()) == get_interior_at_coords(vLocal_339)) && is_entity_in_angled_area(PLAYER::PLAYER_PED_ID(), vLocal_333, vLocal_336, 2f, 0, true, 0)) && func_43()) && !func_40(player_id()))
				{
					if (func_36(iLocal_328, 1))
					{
						func_34(&iLocal_328);
						func_33();
						Global_1572920 = 8;
						if (func_32("SA_BED_IN"))
						{
							clear_help(1);
						}
						clear_area_of_projectiles(vLocal_339, 3f, 0);
						func_27(player_id(), 0, 256);
						iLocal_36 = 1;
						func_26();
						WEAPON::SET_CURRENT_PED_WEAPON(PLAYER::PLAYER_PED_ID(), joaat("weapon_unarmed"), true);
						func_16(1, 1, 1, 0);
						vLocal_339 = {get_anim_initial_offset_position(sLocal_329, sLocal_330, vLocal_343, vLocal_346, 0, 2)};
						vVar3 = {get_anim_initial_offset_rotation(sLocal_329, sLocal_330, vLocal_343, vLocal_346, 0, 2)};
						fLocal_342 = vVar3.z;
						task_go_straight_to_coord(PLAYER::PLAYER_PED_ID(), vLocal_339, 1f, 5000, fLocal_342, 0.05f);
						if (get_follow_ped_cam_view_mode() == 4)
						{
							set_ped_desired_heading(PLAYER::PLAYER_PED_ID(), func_15(ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), 1), ENTITY::GET_ENTITY_COORDS(iLocal_41, 1)));
							force_ped_motion_state(PLAYER::PLAYER_PED_ID(), 1063765679, false, 0, 0);
							set_ped_reset_flag(PLAYER::PLAYER_PED_ID(), 69, true);
						}
						iLocal_322 = 2;
					}
				}
				else
				{
					func_34(&iLocal_328);
					if (func_32("SA_BED_IN"))
					{
						clear_help(1);
					}
					iLocal_322 = 0;
				}
			}
			break;
		
		case 2:
			func_14();
			func_11();
			hide_hud_and_radar_this_frame();
			if (get_follow_ped_cam_view_mode() == 4)
			{
				set_ped_desired_heading(PLAYER::PLAYER_PED_ID(), func_15(ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), 1), ENTITY::GET_ENTITY_COORDS(iLocal_41, 1)));
				set_ped_reset_flag(PLAYER::PLAYER_PED_ID(), 69, true);
			}
			if (AI::GET_SCRIPT_TASK_STATUS(PLAYER::PLAYER_PED_ID(), 2106541073) != 1)
			{
				iLocal_326 = network_create_synchronised_scene(vLocal_343, vLocal_346, 2, false, false, 1f, 0f, 1f);
				network_add_ped_to_synchronised_scene(PLAYER::PLAYER_PED_ID(), iLocal_326, sLocal_329, sLocal_330, 4f, -2f, 261, 0, 1000f, 0);
				network_start_synchronised_scene(iLocal_326);
				iLocal_322 = 3;
			}
			break;
		
		case 3:
			func_14();
			func_11();
			hide_hud_and_radar_this_frame();
			iLocal_327 = _0x02C40BF885C567B6(iLocal_326);
			if (is_synchronized_scene_running(iLocal_327))
			{
				iLocal_322 = 4;
			}
			break;
		
		case 4:
			func_14();
			func_11();
			hide_hud_and_radar_this_frame();
			if (get_synchronized_scene_phase(iLocal_327) > 0.9f)
			{
				iLocal_326 = network_create_synchronised_scene(vLocal_343, vLocal_346, 2, false, true, 1f, 0f, 1f);
				network_add_ped_to_synchronised_scene(PLAYER::PLAYER_PED_ID(), iLocal_326, sLocal_329, sLocal_331, 8f, -2f, 261, 0, 1000f, 0);
				network_start_synchronised_scene(iLocal_326);
				iLocal_322 = 5;
			}
			break;
		
		case 5:
			func_14();
			func_11();
			hide_hud_and_radar_this_frame();
			iLocal_327 = _0x02C40BF885C567B6(iLocal_326);
			if (is_synchronized_scene_running(iLocal_327))
			{
				set_synchronized_scene_looped(iLocal_327, true);
				if (!func_32("SA_BED_OUT"))
				{
					func_10("SA_BED_OUT");
				}
				iLocal_322 = 6;
			}
			break;
		
		case 6:
			func_14();
			func_11();
			hide_hud_and_radar_this_frame();
			if (!func_9(1))
			{
				if (!func_32("SA_BED_OUT"))
				{
					func_10("SA_BED_OUT");
				}
			}
			else if (func_32("SA_BED_OUT"))
			{
				clear_help(1);
			}
			if (!func_40(player_id()) && is_control_just_pressed(2, 222))
			{
				if (func_32("SA_BED_OUT"))
				{
					clear_help(1);
				}
				func_8();
				iLocal_326 = network_create_synchronised_scene(vLocal_343, vLocal_346, 2, false, false, 1f, 0f, 1f);
				network_add_ped_to_synchronised_scene(PLAYER::PLAYER_PED_ID(), iLocal_326, sLocal_329, sLocal_332, 2f, -2f, 261, 0, 1000f, 0);
				network_start_synchronised_scene(iLocal_326);
				iLocal_322 = 8;
			}
			break;
		
		case 7:
			if (((is_interior_ready(get_interior_at_coords(vLocal_339)) && !func_7()) && !func_5()) && Global_1312466.f_8 == 0)
			{
				iLocal_324 = true;
				iLocal_326 = network_create_synchronised_scene(vLocal_343, vLocal_346, 2, false, false, 1f, 0f, 1f);
				network_add_ped_to_synchronised_scene(PLAYER::PLAYER_PED_ID(), iLocal_326, sLocal_329, sLocal_332, 1000f, -2f, 261, 0, 1000f, 0);
				network_start_synchronised_scene(iLocal_326);
				iLocal_322 = 8;
			}
			break;
		
		case 8:
			if (!iLocal_324)
			{
				func_14();
				func_11();
				hide_hud_and_radar_this_frame();
			}
			iLocal_327 = _0x02C40BF885C567B6(iLocal_326);
			if (is_synchronized_scene_running(iLocal_327))
			{
				func_4(5);
				iLocal_322 = 9;
			}
			break;
		
		case 9:
			func_14();
			hide_hud_and_radar_this_frame();
			func_3(0);
			if (!is_synchronized_scene_running(iLocal_327))
			{
				func_2();
				if (iLocal_36)
				{
					func_27(player_id(), 1, 0);
					iLocal_36 = 0;
				}
				func_16(0, 1, 1, 0);
				iLocal_322 = 0;
				Global_1572920 = -1;
			}
			break;
	}
}