more CAutomobile

This commit is contained in:
aap
2019-07-09 09:57:44 +02:00
parent b26e83fc6e
commit 74fcbc8c0a
17 changed files with 395 additions and 36 deletions

View File

@ -92,7 +92,7 @@ CVehicle::RemoveLighting(bool reset)
float
CVehicle::GetHeightAboveRoad(void)
{
return -1.0f * CModelInfo::GetModelInfo(GetModelIndex())->GetColModel()->boundingBox.min.z;
return -1.0f * GetColModel()->boundingBox.min.z;
}
@ -442,7 +442,7 @@ CVehicle::IsSphereTouchingVehicle(float sx, float sy, float sz, float radius)
float x, y, z;
// sphere relative to vehicle
CVector sph = CVector(sx, sy, sz) - GetPosition();
CColModel *colmodel = CModelInfo::GetModelInfo(GetModelIndex())->GetColModel();
CColModel *colmodel = GetColModel();
x = DotProduct(sph, GetRight());
if(colmodel->boundingBox.min.x - radius > x ||