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()) {
gStreamedSound = MusicManager.m_nCurrentStreamedSound;
if(gStreamedSound != STREAMED_SOUND_CITY_AMBIENT &&
gStreamedSound != STREAMED_SOUND_WATER_AMBIENT) {
if(gStreamedSound > STREAMED_SOUND_RADIO_MP3_PLAYER) return;
} else {
if(gStreamedSound == STREAMED_SOUND_CITY_AMBIENT ||
gStreamedSound == STREAMED_SOUND_WATER_AMBIENT) {
gStreamedSound = STREAMED_SOUND_RADIO_POLICE;
} else {
if(gStreamedSound >
STREAMED_SOUND_RADIO_MP3_PLAYER)
return;
}
pRetune = gNumRetunePresses + gStreamedSound;
@ -242,4 +245,4 @@ void
cMusicManager::Service()
{
EAXJMP(0x57D440);
}
}

View file

@ -592,7 +592,7 @@ void CCarAI::MakeWayForCarWithSiren(CVehicle *pVehicle)
CVehicle* vehicle = CPools::GetVehiclePool()->GetSlot(i);
if (!vehicle)
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;
if (vehicle->m_status != STATUS_SIMPLE && vehicle->m_status != STATUS_PHYSICS)
continue;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -230,7 +230,7 @@ public:
virtual float GetHeightAboveRoad(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 IsTrain(void) { return m_vehType == VEHICLE_TYPE_TRAIN; }
bool IsHeli(void) { return m_vehType == VEHICLE_TYPE_HELI; }