Skip to content

Commit

Permalink
Fix crash for custom model
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNormalnij committed Nov 3, 2023
1 parent 9562337 commit fe4d0c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Client/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4276,7 +4276,9 @@ bool CLuaVehicleDefs::SetVehicleAudioSetting(CClientVehicle* pVehicle, const eVe

std::unordered_map<std::string, float> CLuaVehicleDefs::GetVehicleModelAudioSetting(const uint uiModel)
{
CVehicleAudioSettingsEntry* pEntry = g_pGame->GetVehicleAudioSettingsManager()->GetVehicleModelAudioSettingsData((eVehicleTypes)uiModel);
auto rootModelId = CClientVehicleManager::GetRootModelId(uiModel);

CVehicleAudioSettingsEntry* pEntry = g_pGame->GetVehicleAudioSettingsManager()->GetVehicleModelAudioSettingsData((eVehicleTypes)rootModelId);

std::unordered_map<std::string, float> output;

Expand Down

0 comments on commit fe4d0c3

Please sign in to comment.