[III & VC] Add flip vehicle
This commit is contained in:
parent
b60b6e8b04
commit
be1ab9aad9
63
.vscode/c_cpp_properties.json
vendored
63
.vscode/c_cpp_properties.json
vendored
@ -1,21 +1,70 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Win32",
|
||||
"name": "GTASA",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/**",
|
||||
"${PLUGIN_SDK_DIR}/*",
|
||||
"${DIRECTX9_SDK_DIR}/Include/*",
|
||||
"${PLUGIN_SDK_DIR}/plugin_sa/*",
|
||||
"${PLUGIN_SDK_DIR}/plugin_sa/game_sa/*",
|
||||
"${PLUGIN_SDK_DIR}/shared/*",
|
||||
"${PLUGIN_SDK_DIR}/shared/game/*",
|
||||
"C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\ucrt\\*"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"IS_PLATFORM_WIN",
|
||||
"_CRT_SECURE_NO_WARNINGS",
|
||||
"_CRT_NON_CONFORMING_SWPRINTFS",
|
||||
"GTASA",
|
||||
"_DX9_SDK_INSTALLED",
|
||||
"PLUGIN_SGV_10US"
|
||||
],
|
||||
"windowsSdkVersion": "10.0.19041.0",
|
||||
"compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe",
|
||||
"cStandard": "c17",
|
||||
"cppStandard": "c++20",
|
||||
"intelliSenseMode": "windows-msvc-x86"
|
||||
},
|
||||
{
|
||||
"name": "GTAVC",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/**",
|
||||
"${PLUGIN_SDK_DIR}/*",
|
||||
"${DIRECTX9_SDK_DIR}/Include/*",
|
||||
"${PLUGIN_SDK_DIR}/plugin_vc/*",
|
||||
"${PLUGIN_SDK_DIR}/plugin_vc/game_vc/*",
|
||||
"${PLUGIN_SDK_DIR}/shared/*",
|
||||
"${PLUGIN_SDK_DIR}/shared/game/*",
|
||||
"C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\ucrt\\*"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"IS_PLATFORM_WIN",
|
||||
"_CRT_SECURE_NO_WARNINGS",
|
||||
"_CRT_NON_CONFORMING_SWPRINTFS",
|
||||
"GTAVC",
|
||||
"_DX9_SDK_INSTALLED",
|
||||
"PLUGIN_SGV_10US"
|
||||
],
|
||||
"windowsSdkVersion": "10.0.19041.0",
|
||||
"compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe",
|
||||
"cStandard": "c17",
|
||||
"cppStandard": "c++20",
|
||||
"intelliSenseMode": "windows-msvc-x86"
|
||||
},
|
||||
{
|
||||
"name": "GTA3",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/**",
|
||||
"${PLUGIN_SDK_DIR}/*",
|
||||
"${DIRECTX9_SDK_DIR}/Include/*",
|
||||
// "${PLUGIN_SDK_DIR}/plugin_sa/*",
|
||||
// "${PLUGIN_SDK_DIR}/plugin_sa/game_sa/*",
|
||||
// "${PLUGIN_SDK_DIR}/plugin_vc/*",
|
||||
// "${PLUGIN_SDK_DIR}/plugin_vc/game_vc/*",
|
||||
"${PLUGIN_SDK_DIR}/plugin_III/*",
|
||||
"${PLUGIN_SDK_DIR}/plugin_III/game_III/*",
|
||||
"${PLUGIN_SDK_DIR}/shared/*",
|
||||
"${PLUGIN_SDK_DIR}/shared/game/*",
|
||||
"C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\ucrt\\*",
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30037\\include\\*"
|
||||
"C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\ucrt\\*"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
|
@ -517,7 +517,7 @@ void Vehicle::Draw()
|
||||
int hplayer = CPools::GetPedRef(pPlayer);
|
||||
CVehicle *pVeh = pPlayer->m_pVehicle;
|
||||
|
||||
if (ImGui::Button("Blow up cars", ImVec2(Ui::GetSize(BY_GAME(3,2,2)))))
|
||||
if (ImGui::Button("Blow up cars", ImVec2(Ui::GetSize(3))))
|
||||
{
|
||||
for (CVehicle *pVeh : CPools::ms_pVehiclePool)
|
||||
{
|
||||
@ -527,7 +527,7 @@ void Vehicle::Draw()
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
if (ImGui::Button("Fix vehicle", ImVec2(Ui::GetSize(BY_GAME(3,2,2)))))
|
||||
if (ImGui::Button("Fix vehicle", ImVec2(Ui::GetSize(3))))
|
||||
{
|
||||
if (pPlayer && pVeh)
|
||||
{
|
||||
@ -535,11 +535,11 @@ void Vehicle::Draw()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef GTASA
|
||||
ImGui::SameLine();
|
||||
|
||||
if (ImGui::Button("Flip vehicle", ImVec2(Ui::GetSize(3))))
|
||||
{
|
||||
#ifdef GTASA
|
||||
if (pPlayer->m_nPedFlags.bInVehicle)
|
||||
{
|
||||
int hveh = CPools::GetVehicleRef(pPlayer->m_pVehicle);
|
||||
@ -550,8 +550,25 @@ void Vehicle::Draw()
|
||||
Command<Commands::SET_CAR_ROLL>(hveh, roll);
|
||||
Command<Commands::SET_CAR_ROLL>(hveh, roll); // z rot fix
|
||||
}
|
||||
#elif GTAVC
|
||||
if (pPlayer->m_bInVehicle)
|
||||
{
|
||||
float x,y,z;
|
||||
pPlayer->m_pVehicle->m_placement.GetOrientation(x, y, z);
|
||||
y += 135.0f;
|
||||
pPlayer->m_pVehicle->m_placement.SetOrientation(x, y, z);
|
||||
}
|
||||
|
||||
#else // GTA3
|
||||
if (pPlayer->m_bInVehicle)
|
||||
{
|
||||
float x,y,z;
|
||||
pPlayer->m_pVehicle->GetOrientation(x, y, z);
|
||||
y += 135.0f;
|
||||
pPlayer->m_pVehicle->SetOrientation(x, y, z);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
ImGui::Spacing();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user