@@ -8905,6 +8905,10 @@ bool CStaticFunctionDefinitions::SetVehicleHandling(CClientVehicle* pVehicle, Ha
89058905 {
89068906 if (SetEntryHandling (pEntry, eProperty, ucValue))
89078907 {
8908+ CModelInfo* pModelInfo = g_pGame->GetModelInfo (pVehicle->GetModel ());
8909+ if (!pModelInfo || !pModelInfo->IsLoaded ())
8910+ return false ;
8911+
89088912 pVehicle->ApplyHandling ();
89098913 return true ;
89108914 }
@@ -8922,6 +8926,10 @@ bool CStaticFunctionDefinitions::SetVehicleHandling(CClientVehicle* pVehicle, Ha
89228926 {
89238927 if (SetEntryHandling (pEntry, eProperty, uiValue))
89248928 {
8929+ CModelInfo* pModelInfo = g_pGame->GetModelInfo (pVehicle->GetModel ());
8930+ if (!pModelInfo || !pModelInfo->IsLoaded ())
8931+ return false ;
8932+
89258933 pVehicle->ApplyHandling ();
89268934 return true ;
89278935 }
@@ -8939,6 +8947,10 @@ bool CStaticFunctionDefinitions::SetVehicleHandling(CClientVehicle* pVehicle, Ha
89398947 {
89408948 if (SetEntryHandling (pEntry, eProperty, fValue ))
89418949 {
8950+ CModelInfo* pModelInfo = g_pGame->GetModelInfo (pVehicle->GetModel ());
8951+ if (!pModelInfo || !pModelInfo->IsLoaded ())
8952+ return false ;
8953+
89428954 pVehicle->ApplyHandling ();
89438955 return true ;
89448956 }
@@ -8956,6 +8968,10 @@ bool CStaticFunctionDefinitions::SetVehicleHandling(CClientVehicle* pVehicle, Ha
89568968 {
89578969 if (SetEntryHandling (pEntry, eProperty, strValue))
89588970 {
8971+ CModelInfo* pModelInfo = g_pGame->GetModelInfo (pVehicle->GetModel ());
8972+ if (!pModelInfo || !pModelInfo->IsLoaded ())
8973+ return false ;
8974+
89598975 pVehicle->ApplyHandling ();
89608976 return true ;
89618977 }
@@ -8973,6 +8989,10 @@ bool CStaticFunctionDefinitions::SetVehicleHandling(CClientVehicle* pVehicle, Ha
89738989 {
89748990 if (SetEntryHandling (pEntry, eProperty, vecValue))
89758991 {
8992+ CModelInfo* pModelInfo = g_pGame->GetModelInfo (pVehicle->GetModel ());
8993+ if (!pModelInfo || !pModelInfo->IsLoaded ())
8994+ return false ;
8995+
89768996 pVehicle->ApplyHandling ();
89778997 return true ;
89788998 }
@@ -9031,6 +9051,10 @@ bool CStaticFunctionDefinitions::ResetVehicleHandling(CClientVehicle* pVehicle)
90319051 pEntry->SetSuspensionUpperLimit (pEntry->GetSuspensionLowerLimit () - 0 .1f );
90329052 }
90339053
9054+ CModelInfo* pModelInfo = g_pGame->GetModelInfo (pVehicle->GetModel ());
9055+ if (!pModelInfo || !pModelInfo->IsLoaded ())
9056+ return false ;
9057+
90349058 pVehicle->ApplyHandling ();
90359059
90369060 return true ;
@@ -9080,6 +9104,10 @@ bool CStaticFunctionDefinitions::ResetVehicleHandlingProperty(CClientVehicle* pV
90809104 return false ;
90819105 }
90829106
9107+ CModelInfo* pModelInfo = g_pGame->GetModelInfo (pVehicle->GetModel ());
9108+ if (!pModelInfo || !pModelInfo->IsLoaded ())
9109+ return false ;
9110+
90839111 pVehicle->ApplyHandling ();
90849112
90859113 return true ;
0 commit comments