Fixes for aap review (audio8)

This commit is contained in:
Filip Gawin 2019-10-25 18:39:26 +02:00
parent fef3b5f978
commit 8808e6fdfe
11 changed files with 1247 additions and 2322 deletions

File diff suppressed because it is too large Load Diff

View File

@ -64,11 +64,14 @@ cMusicManager::DisplayRadioStationName()
if(SampleManager.IsMP3RadioChannelAvailable()) { if(SampleManager.IsMP3RadioChannelAvailable()) {
gStreamedSound = MusicManager.m_nCurrentStreamedSound; gStreamedSound = MusicManager.m_nCurrentStreamedSound;
if(gStreamedSound != STREAMED_SOUND_CITY_AMBIENT && if(gStreamedSound == STREAMED_SOUND_CITY_AMBIENT ||
gStreamedSound != STREAMED_SOUND_WATER_AMBIENT) { gStreamedSound == STREAMED_SOUND_WATER_AMBIENT) {
if(gStreamedSound > STREAMED_SOUND_RADIO_MP3_PLAYER) return;
} else {
gStreamedSound = STREAMED_SOUND_RADIO_POLICE; gStreamedSound = STREAMED_SOUND_RADIO_POLICE;
} else {
if(gStreamedSound >
STREAMED_SOUND_RADIO_MP3_PLAYER)
return;
} }
pRetune = gNumRetunePresses + gStreamedSound; pRetune = gNumRetunePresses + gStreamedSound;

View File

@ -592,7 +592,7 @@ void CCarAI::MakeWayForCarWithSiren(CVehicle *pVehicle)
CVehicle* vehicle = CPools::GetVehiclePool()->GetSlot(i); CVehicle* vehicle = CPools::GetVehiclePool()->GetSlot(i);
if (!vehicle) if (!vehicle)
continue; continue;
if (vehicle->m_vehType != VEHICLE_TYPE_AUTOMOBILE && vehicle->m_vehType != VEHICLE_TYPE_BIKE) if (vehicle->m_vehType != VEHICLE_TYPE_CAR && vehicle->m_vehType != VEHICLE_TYPE_BIKE)
continue; continue;
if (vehicle->m_status != STATUS_SIMPLE && vehicle->m_status != STATUS_PHYSICS) if (vehicle->m_status != STATUS_SIMPLE && vehicle->m_status != STATUS_PHYSICS)
continue; continue;

View File

@ -255,7 +255,7 @@ CAnimViewer::Update(void)
if (modelInfo->m_type == MITYPE_VEHICLE) { if (modelInfo->m_type == MITYPE_VEHICLE) {
CVehicleModelInfo* veh = (CVehicleModelInfo*)modelInfo; CVehicleModelInfo* veh = (CVehicleModelInfo*)modelInfo;
if (veh->m_vehicleType != VEHICLE_TYPE_AUTOMOBILE) { if (veh->m_vehicleType != VEHICLE_TYPE_CAR) {
// Not ready yet // Not ready yet
/* if (veh->m_vehicleType == VEHICLE_TYPE_BOAT) /* if (veh->m_vehicleType == VEHICLE_TYPE_BOAT)
{ {

View File

@ -738,7 +738,7 @@ CFileLoader::LoadVehicleObject(const char *line)
if(strncmp(type, "car", 4) == 0){ if(strncmp(type, "car", 4) == 0){
mi->m_wheelId = misc; mi->m_wheelId = misc;
mi->m_wheelScale = wheelScale; mi->m_wheelScale = wheelScale;
mi->m_vehicleType = VEHICLE_TYPE_AUTOMOBILE; mi->m_vehicleType = VEHICLE_TYPE_CAR;
}else if(strncmp(type, "boat", 5) == 0){ }else if(strncmp(type, "boat", 5) == 0){
mi->m_vehicleType = VEHICLE_TYPE_BOAT; mi->m_vehicleType = VEHICLE_TYPE_BOAT;
}else if(strncmp(type, "train", 6) == 0){ }else if(strncmp(type, "train", 6) == 0){

View File

@ -793,7 +793,7 @@ CWorld::TestSphereAgainstSectorList(CPtrList &list, CVector spherePos, float rad
*eCol, &ms_testSpherePoint, nil, nil); *eCol, &ms_testSpherePoint, nil, nil);
if (collidedSpheres != 0 || if (collidedSpheres != 0 ||
(e->IsVehicle() && ((CVehicle*)e)->m_vehType == VEHICLE_TYPE_AUTOMOBILE && (e->IsVehicle() && ((CVehicle*)e)->m_vehType == VEHICLE_TYPE_CAR &&
e->m_modelIndex != MI_DODO && radius + eCol->boundingBox.max.x > distance)) { e->m_modelIndex != MI_DODO && radius + eCol->boundingBox.max.x > distance)) {
return e; return e;
} }

View File

@ -1897,7 +1897,7 @@ CPhysical::ProcessCollision(void)
CTimer::SetTimeStep(savedTimeStep); CTimer::SetTimeStep(savedTimeStep);
if(IsVehicle()){ if(IsVehicle()){
CVehicle *veh = (CVehicle*)this; CVehicle *veh = (CVehicle*)this;
if(veh->m_vehType == VEHICLE_TYPE_AUTOMOBILE){ if(veh->m_vehType == VEHICLE_TYPE_CAR){
CAutomobile *car = (CAutomobile*)this; CAutomobile *car = (CAutomobile*)this;
car->m_aSuspensionSpringRatio[0] = 1.0f; car->m_aSuspensionSpringRatio[0] = 1.0f;
car->m_aSuspensionSpringRatio[1] = 1.0f; car->m_aSuspensionSpringRatio[1] = 1.0f;

View File

@ -26,7 +26,7 @@ enum {
}; };
enum eVehicleType { enum eVehicleType {
VEHICLE_TYPE_AUTOMOBILE, VEHICLE_TYPE_CAR,
VEHICLE_TYPE_BOAT, VEHICLE_TYPE_BOAT,
VEHICLE_TYPE_TRAIN, VEHICLE_TYPE_TRAIN,
VEHICLE_TYPE_HELI, VEHICLE_TYPE_HELI,

View File

@ -4388,7 +4388,7 @@ CPed::SetEvasiveStep(CEntity *reason, uint8 animType)
neededTurn = 2 * PI - neededTurn; neededTurn = 2 * PI - neededTurn;
CVehicle *veh = (CVehicle*)reason; CVehicle *veh = (CVehicle*)reason;
if (reason->IsVehicle() && veh->m_vehType == VEHICLE_TYPE_AUTOMOBILE) { if (reason->IsVehicle() && veh->m_vehType == VEHICLE_TYPE_CAR) {
if (veh->m_nCarHornTimer) { if (veh->m_nCarHornTimer) {
vehPressedHorn = true; vehPressedHorn = true;
if (!IsPlayer()) if (!IsPlayer())
@ -4456,7 +4456,7 @@ CPed::SetEvasiveDive(CPhysical *reason, uint8 onlyRandomJump)
angleToFace = m_fRotationCur; angleToFace = m_fRotationCur;
CVehicle *veh = (CVehicle*) reason; CVehicle *veh = (CVehicle*) reason;
if (reason->IsVehicle() && veh->m_vehType == VEHICLE_TYPE_AUTOMOBILE && veh->m_nCarHornTimer && !IsPlayer()) { if (reason->IsVehicle() && veh->m_vehType == VEHICLE_TYPE_CAR && veh->m_nCarHornTimer && !IsPlayer()) {
onlyRandomJump = true; onlyRandomJump = true;
} }
@ -7245,7 +7245,7 @@ CPed::Seek(void)
false, true, false, false, false, false); false, true, false, false, false, false);
if (obstacle) { if (obstacle) {
if (!obstacle->IsVehicle() || ((CVehicle*)obstacle)->m_vehType == VEHICLE_TYPE_AUTOMOBILE) { if (!obstacle->IsVehicle() || ((CVehicle*)obstacle)->m_vehType == VEHICLE_TYPE_CAR) {
distanceToCountItDone = 2.5f; distanceToCountItDone = 2.5f;
} else { } else {
CVehicleModelInfo *vehModel = (CVehicleModelInfo*) CModelInfo::GetModelInfo(obstacle->m_modelIndex); CVehicleModelInfo *vehModel = (CVehicleModelInfo*) CModelInfo::GetModelInfo(obstacle->m_modelIndex);
@ -8481,7 +8481,7 @@ CPed::KillPedWithCar(CVehicle *car, float impulse)
if (damageDir > 3) if (damageDir > 3)
damageDir = damageDir - 4; damageDir = damageDir - 4;
if (car->m_vehType == VEHICLE_TYPE_AUTOMOBILE) { if (car->m_vehType == VEHICLE_TYPE_CAR) {
CObject *bonnet = ((CAutomobile*)car)->RemoveBonnetInPedCollision(); CObject *bonnet = ((CAutomobile*)car)->RemoveBonnetInPedCollision();
if (bonnet) { if (bonnet) {

View File

@ -55,7 +55,7 @@ CAutomobile::CAutomobile(int32 id, uint8 CreatedBy)
{ {
int i; int i;
m_vehType = VEHICLE_TYPE_AUTOMOBILE; m_vehType = VEHICLE_TYPE_CAR;
CVehicleModelInfo *mi = (CVehicleModelInfo*)CModelInfo::GetModelInfo(id); CVehicleModelInfo *mi = (CVehicleModelInfo*)CModelInfo::GetModelInfo(id);
m_fFireBlowUpTimer = 0.0f; m_fFireBlowUpTimer = 0.0f;

View File

@ -230,7 +230,7 @@ public:
virtual float GetHeightAboveRoad(void); virtual float GetHeightAboveRoad(void);
virtual void PlayCarHorn(void) {} virtual void PlayCarHorn(void) {}
bool IsCar(void) { return m_vehType == VEHICLE_TYPE_AUTOMOBILE; } bool IsCar(void) { return m_vehType == VEHICLE_TYPE_CAR; }
bool IsBoat(void) { return m_vehType == VEHICLE_TYPE_BOAT; } bool IsBoat(void) { return m_vehType == VEHICLE_TYPE_BOAT; }
bool IsTrain(void) { return m_vehType == VEHICLE_TYPE_TRAIN; } bool IsTrain(void) { return m_vehType == VEHICLE_TYPE_TRAIN; }
bool IsHeli(void) { return m_vehType == VEHICLE_TYPE_HELI; } bool IsHeli(void) { return m_vehType == VEHICLE_TYPE_HELI; }