This commit is contained in:
Aure7138 2023-03-30 06:37:31 +08:00 committed by GitHub
parent 8ad4cf01dd
commit f6da0f1ceb

View File

@ -106,8 +106,14 @@ namespace big::ped
outfit::components_t components;
for (auto& item : components.items)
{
int drawable_id = range(0, PED::GET_NUMBER_OF_PED_DRAWABLE_VARIATIONS(ped, item.id) - 1);
int texture_id = range(0, PED::GET_NUMBER_OF_PED_TEXTURE_VARIATIONS(ped, item.id, drawable_id) - 1);
int drawable_id_max = PED::GET_NUMBER_OF_PED_DRAWABLE_VARIATIONS(ped, item.id) - 1;
if (drawable_id_max == -1)
continue;
int drawable_id = range(0, drawable_id_max);
int texture_id_max = PED::GET_NUMBER_OF_PED_TEXTURE_VARIATIONS(ped, item.id, drawable_id) - 1;
if (texture_id_max == -1)
continue;
int texture_id = range(0, texture_id_max);
PED::SET_PED_COMPONENT_VARIATION(ped, item.id, drawable_id, texture_id, PED::GET_PED_PALETTE_VARIATION(ped, item.id));
}
}