diff --git a/src/custom/filehandler.cpp b/src/custom/filehandler.cpp index 7d8d4db..1925876 100644 --- a/src/custom/filehandler.cpp +++ b/src/custom/filehandler.cpp @@ -15,7 +15,8 @@ void FileHandler::GenerateHandlingFile(tHandlingData *pHandling, std::mapm_fTractionMultiplier; float tractionLoss = pHandling->m_fTractionLoss; float tractionBias = pHandling->m_fTractionBias; - float engineAcceleration = pHandling->m_transmissionData.m_fEngineAcceleration * 12500; + float engineAcceleration = pHandling->m_transmissionData.m_fEngineAcceleration * 25000.0f; + engineAcceleration /= pHandling->m_transmissionData.m_nDriveType == 52 ? 4.0f : 2.0f; float engineInertia = pHandling->m_transmissionData.m_fEngineInertia; int driveType = pHandling->m_transmissionData.m_nDriveType; int engineType = pHandling->m_transmissionData.m_nEngineType; diff --git a/src/custom/vehcustmzr.cpp b/src/custom/vehcustmzr.cpp index a3bab9c..552c684 100644 --- a/src/custom/vehcustmzr.cpp +++ b/src/custom/vehcustmzr.cpp @@ -639,9 +639,11 @@ void VehCustmzrMgr::Draw() Widget::EditRadioBtnAddr(TEXT("Vehicle.DriveType"), (int)&pHandlingData->m_transmissionData.m_nDriveType, drive_type); // Engine acceleration calculation - float fEngineAcceleration = pHandlingData->m_transmissionData.m_fEngineAcceleration * 12500; - Widget::EditAddr(TEXT("Vehicle.EngineAccel"), (int)&fEngineAcceleration, 0.0f, 0.0f, 49.0f, 12500.0f); - pHandlingData->m_transmissionData.m_fEngineAcceleration = fEngineAcceleration / 12500; + float fEngineAcceleration = pHandlingData->m_transmissionData.m_fEngineAcceleration * 25000.0f; + fEngineAcceleration /= pHandlingData->m_transmissionData.m_nDriveType == 52 ? 4.0f : 2.0f; + Widget::EditAddr(TEXT("Vehicle.EngineAccel"), (int)&fEngineAcceleration, 0.0f, 0.0f, 49.0f, 1.0f); + fEngineAcceleration *= pHandlingData->m_transmissionData.m_nDriveType == 52 ? 4.0f : 2.0f; + pHandlingData->m_transmissionData.m_fEngineAcceleration = fEngineAcceleration / 25000.0f; Widget::EditAddr(TEXT("Vehicle.EngineInertia"), (int)&pHandlingData->m_transmissionData.m_fEngineInertia, 0.1f, 0.1f, 400.0f); @@ -664,7 +666,7 @@ void VehCustmzrMgr::Draw() Widget::EditBits(TEXT("Vehicle.HandlingFlags"), (int)&pHandlingData->m_nHandlingFlags, m_HandlingFlagNames); Widget::EditAddr(TEXT("Vehicle.HighSpeedDamping"), (int)&pHandlingData->m_fSuspensionDampingLevel, -10.0f, -10.0f, 10.0f); // test later - Widget::EditAddr(TEXT("Vehicle.LowerKimit"), (int)&pHandlingData->m_fSuspensionLowerLimit, -10.0f, -10.0f, 10.0f); // test later + Widget::EditAddr(TEXT("Vehicle.LowerLimit"), (int)&pHandlingData->m_fSuspensionLowerLimit, -10.0f, -10.0f, 10.0f); // test later Widget::EditAddr(TEXT("Vehicle.Mass"), (int)&pHandlingData->m_fMass, 1.0f, 1.0f, 50000.0f); // Max Velocity calculation diff --git a/src/pages/vehicle.cpp b/src/pages/vehicle.cpp index f652243..9ce9edd 100644 --- a/src/pages/vehicle.cpp +++ b/src/pages/vehicle.cpp @@ -9,6 +9,7 @@ #include "custom/filehandler.h" #include "custom/vehcustmzr.h" #include "custom/autodrive.h" +#include VehiclePage& vehiclePage = VehiclePage::Get(); VehiclePage::VehiclePage() @@ -446,20 +447,21 @@ void VehiclePage::SpawnVehicle(std::string& rootkey, std::string& vehName, std:: float x,y,z; player->m_placement.GetOrientation(x, y, z); veh->m_placement.SetOrientation(x, y, z); + Command(hplayer, hveh); #else float x,y,z; player->GetOrientation(x, y, z); + player->SetObjective(OBJECTIVE_ENTER_CAR_AS_DRIVER); + player->WarpPedIntoCar(veh); veh->SetOrientation(x, y, z); #endif - CWorld::Remove(player); - Command(hplayer, hveh); - CWorld::Add(player); + Util::SetCarForwardSpeed(veh, speed); } else { player->TransformFromObjectSpace(pos); - Command(imodel, pos.x, pos.y, pos.z + 3.0f, &hveh); + Command(imodel, pos.x, pos.y, pos.z + 4.0f, &hveh); veh = CPools::GetVehicle(hveh); #ifdef GTAVC float x,y,z;