mirror of
https://github.com/halpz/re3.git
synced 2025-07-03 07:30:50 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@ -74,11 +74,12 @@ void CCarGenerator::DoInternalProcessing()
|
||||
}
|
||||
m_nVehicleHandle = CPools::GetVehiclePool()->GetIndex(pBoat);
|
||||
}else{
|
||||
bool groundFound = false;
|
||||
bool groundFound;
|
||||
CVector pos = m_vecPos;
|
||||
if (pos.z > -100.0f){
|
||||
pos.z = CWorld::FindGroundZFor3DCoord(pos.x, pos.y, pos.z, &groundFound);
|
||||
}else{
|
||||
groundFound = false;
|
||||
CColPoint cp;
|
||||
CEntity* pEntity;
|
||||
groundFound = CWorld::ProcessVerticalLine(CVector(pos.x, pos.y, 1000.0f), -1000.0f,
|
||||
@ -89,7 +90,12 @@ void CCarGenerator::DoInternalProcessing()
|
||||
if (!groundFound) {
|
||||
debug("CCarGenerator::DoInternalProcessing - can't find ground z for new car x = %f y = %f \n", m_vecPos.x, m_vecPos.y);
|
||||
}else{
|
||||
CAutomobile* pCar = new CAutomobile(m_nModelIndex, PARKED_VEHICLE);
|
||||
CAutomobile* pCar;
|
||||
|
||||
// So game crashes if it's bike :D
|
||||
if (((CVehicleModelInfo*)CModelInfo::GetModelInfo(m_nModelIndex))->m_vehicleType != VEHICLE_TYPE_BIKE)
|
||||
pCar = new CAutomobile(m_nModelIndex, PARKED_VEHICLE);
|
||||
|
||||
pCar->bIsStatic = false;
|
||||
pCar->bEngineOn = false;
|
||||
pos.z += pCar->GetDistanceFromCentreOfMassToBaseOfModel();
|
||||
|
Reference in New Issue
Block a user