parent
a1bc7517af
commit
ddaee3f069
@ -116,7 +116,7 @@ namespace big
|
||||
call(thread, gta_util::find_script_program(m_script), args);
|
||||
|
||||
delete[] stack;
|
||||
delete[] (uint8_t*)thread; // without the cast it ends up calling the destructor which leads to some pretty funny crashes
|
||||
delete[](uint8_t*) thread; // without the cast it ends up calling the destructor which leads to some pretty funny crashes
|
||||
}
|
||||
|
||||
void script_function::operator()(std::initializer_list<std::uint64_t> args)
|
||||
|
@ -120,7 +120,7 @@ namespace big
|
||||
for (auto& item : components)
|
||||
{
|
||||
ImGui::SetNextItemWidth(60);
|
||||
if (ImGui::InputInt(std::format("{} [0,{}]", item.label, item.drawable_id_max).c_str(), &item.drawable_id, ImGuiInputTextFlags_None))
|
||||
if (ImGui::InputInt(std::format("{} [0,{}]", item.label, item.drawable_id_max).c_str(), &item.drawable_id, 0))
|
||||
{
|
||||
g_fiber_pool->queue_job([item] {
|
||||
PED::SET_PED_COMPONENT_VARIATION(self::ped, item.id, item.drawable_id, 0, PED::GET_PED_PALETTE_VARIATION(self::ped, item.id));
|
||||
@ -135,7 +135,7 @@ namespace big
|
||||
for (auto& item : components)
|
||||
{
|
||||
ImGui::SetNextItemWidth(60);
|
||||
if (ImGui::InputInt(std::format("{} {} [0,{}]", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), &item.texture_id, ImGuiInputTextFlags_None))
|
||||
if (ImGui::InputInt(std::format("{} {} [0,{}]", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), &item.texture_id, 0))
|
||||
{
|
||||
g_fiber_pool->queue_job([item] {
|
||||
PED::SET_PED_COMPONENT_VARIATION(self::ped, item.id, item.drawable_id, item.texture_id, PED::GET_PED_PALETTE_VARIATION(self::ped, item.id));
|
||||
@ -150,7 +150,7 @@ namespace big
|
||||
for (auto& item : props)
|
||||
{
|
||||
ImGui::SetNextItemWidth(60);
|
||||
if (ImGui::InputInt(std::format("{} [0,{}]", item.label, item.drawable_id_max).c_str(), &item.drawable_id, ImGuiInputTextFlags_None))
|
||||
if (ImGui::InputInt(std::format("{} [0,{}]", item.label, item.drawable_id_max).c_str(), &item.drawable_id, 0))
|
||||
{
|
||||
g_fiber_pool->queue_job([item] {
|
||||
if (item.drawable_id == -1)
|
||||
@ -168,7 +168,7 @@ namespace big
|
||||
for (auto& item : props)
|
||||
{
|
||||
ImGui::SetNextItemWidth(60);
|
||||
if (ImGui::InputInt(std::format("{} {} [0,{}]", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), &item.texture_id, ImGuiInputTextFlags_None))
|
||||
if (ImGui::InputInt(std::format("{} {} [0,{}]", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), &item.texture_id, 0))
|
||||
{
|
||||
g_fiber_pool->queue_job([item] {
|
||||
PED::SET_PED_PROP_INDEX(self::ped, item.id, item.drawable_id, item.texture_id, TRUE, 1);
|
||||
@ -192,8 +192,6 @@ namespace big
|
||||
ImGui::SameLine();
|
||||
|
||||
components::button("OUTFIT_SAVE_CURRENT"_T, [] {
|
||||
if (outfit_name[0] != '\0')
|
||||
{
|
||||
nlohmann::json j;
|
||||
nlohmann::json j_components;
|
||||
nlohmann::json j_props;
|
||||
@ -220,11 +218,10 @@ namespace big
|
||||
size_t index = 0;
|
||||
std::string str = outfit_name;
|
||||
while (saved_outfit_path.get_file(str + ".json").exists())
|
||||
str = std::format("{} ({})", outfit_name, ++index);
|
||||
str = std::format("{}({})", outfit_name, ++index);
|
||||
|
||||
std::ofstream o(saved_outfit_path.get_file(str + ".json").get_path());
|
||||
o << std::setw(4) << j << std::endl;
|
||||
}
|
||||
});
|
||||
ImGui::SameLine();
|
||||
|
||||
@ -240,7 +237,7 @@ namespace big
|
||||
std::stringstream ss(item.key());
|
||||
int id = 0;
|
||||
ss >> id;
|
||||
int draw_id = item.value()["draw_id"];
|
||||
int draw_id = item.value()["drawable_id"];
|
||||
int texture_id = item.value()["texture_id"];
|
||||
PED::SET_PED_COMPONENT_VARIATION(self::ped, id, draw_id, texture_id, PED::GET_PED_PALETTE_VARIATION(self::ped, id));
|
||||
}
|
||||
@ -250,7 +247,7 @@ namespace big
|
||||
std::stringstream ss(item.key());
|
||||
int id = 0;
|
||||
ss >> id;
|
||||
int draw_id = item.value()["draw_id"];
|
||||
int draw_id = item.value()["drawable_id"];
|
||||
int texture_id = item.value()["texture_id"];
|
||||
if (draw_id == -1)
|
||||
PED::CLEAR_PED_PROP(self::ped, id, 1);
|
||||
|
@ -115,7 +115,7 @@ namespace big
|
||||
for (auto& item : components)
|
||||
{
|
||||
ImGui::SetNextItemWidth(60);
|
||||
ImGui::InputInt(std::format("{} [0,{}]", item.label, item.drawable_id_max).c_str(), outfit::get_component_drawable_id_address(slot, item.id), ImGuiInputTextFlags_None);
|
||||
ImGui::InputInt(std::format("{} [0,{}]", item.label, item.drawable_id_max).c_str(), outfit::get_component_drawable_id_address(slot, item.id), 0);
|
||||
}
|
||||
ImGui::EndGroup();
|
||||
|
||||
@ -125,7 +125,7 @@ namespace big
|
||||
for (auto& item : components)
|
||||
{
|
||||
ImGui::SetNextItemWidth(60);
|
||||
ImGui::InputInt(std::format("{} {} [0,{}]", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), outfit::get_component_texture_id_address(slot, item.id), ImGuiInputTextFlags_None);
|
||||
ImGui::InputInt(std::format("{} {} [0,{}]", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), outfit::get_component_texture_id_address(slot, item.id), 0);
|
||||
}
|
||||
ImGui::EndGroup();
|
||||
|
||||
@ -135,7 +135,7 @@ namespace big
|
||||
for (auto& item : props)
|
||||
{
|
||||
ImGui::SetNextItemWidth(60);
|
||||
ImGui::InputInt(std::format("{} [0,{}]", item.label, item.drawable_id_max).c_str(), outfit::get_prop_drawable_id_address(slot, item.id), ImGuiInputTextFlags_None);
|
||||
ImGui::InputInt(std::format("{} [0,{}]", item.label, item.drawable_id_max).c_str(), outfit::get_prop_drawable_id_address(slot, item.id), 0);
|
||||
}
|
||||
ImGui::EndGroup();
|
||||
|
||||
@ -145,7 +145,7 @@ namespace big
|
||||
for (auto& item : props)
|
||||
{
|
||||
ImGui::SetNextItemWidth(60);
|
||||
ImGui::InputInt(std::format("{} {} [0,{}]", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), outfit::get_prop_texture_id_address(slot, item.id), ImGuiInputTextFlags_None);
|
||||
ImGui::InputInt(std::format("{} {} [0,{}]", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), outfit::get_prop_texture_id_address(slot, item.id), 0);
|
||||
}
|
||||
ImGui::EndGroup();
|
||||
}
|
||||
|
Reference in New Issue
Block a user