From da378077f78a1773a6c4bf5a768c6ebb5a7c75b5 Mon Sep 17 00:00:00 2001 From: withmorten Date: Sun, 31 Jan 2021 02:08:42 +0100 Subject: [PATCH 1/5] renderer fix from miami --- src/render/Renderer.cpp | 4 ++++ src/rw/VisibilityPlugins.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index d41f27e3..2c224677 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -1396,6 +1396,10 @@ CRenderer::ScanSectorPoly(RwV2d *poly, int32 numVertices, void (*scanfunc)(CPtrL void CRenderer::InsertEntityIntoList(CEntity *ent) { +#ifdef FIX_BUGS + if (!ent->m_rwObject) return; +#endif + #ifdef NEW_RENDERER // TODO: there are more flags being checked here if(gbNewRenderer && (ent->IsVehicle() || ent->IsPed())) diff --git a/src/rw/VisibilityPlugins.cpp b/src/rw/VisibilityPlugins.cpp index 32461d1c..051a6883 100644 --- a/src/rw/VisibilityPlugins.cpp +++ b/src/rw/VisibilityPlugins.cpp @@ -192,6 +192,10 @@ CVisibilityPlugins::InitAlphaEntityList(void) bool CVisibilityPlugins::InsertEntityIntoSortedList(CEntity *e, float dist) { +#ifdef FIX_BUGS + if (!e->m_rwObject) return true; +#endif + AlphaObjectInfo item; item.entity = e; item.sort = dist; From 5de4e88d7a7637d9e0f806855a8f0d66b4f2f276 Mon Sep 17 00:00:00 2001 From: shfil Date: Sun, 31 Jan 2021 15:00:36 +0100 Subject: [PATCH 2/5] fix realloc --- src/core/re3.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/re3.cpp b/src/core/re3.cpp index 37b2cdf0..474a4644 100644 --- a/src/core/re3.cpp +++ b/src/core/re3.cpp @@ -690,7 +690,7 @@ void CTweakVars::Add(CTweakVar *var) TweakVarsListSize = 0; } if(TweakVarsListSize > 63) - TweakVarsList = (CTweakVar**) realloc(TweakVarsList, (TweakVarsListSize + 1) * sizeof(*var)); + TweakVarsList = (CTweakVar**) realloc(TweakVarsList, (TweakVarsListSize + 1) * sizeof(CTweakVar*)); TweakVarsList[TweakVarsListSize++] = var; // TweakVarsList.push_back(var); From 7a3b80a9b7f414967fe59f89ab0fe5416735babe Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Sun, 31 Jan 2021 20:44:39 +0100 Subject: [PATCH 3/5] First batch of fixes (CallAndMessage) --- src/control/Pickups.cpp | 9 ++++++- src/control/Script.cpp | 9 +++++-- src/control/Script4.cpp | 9 +++++-- src/control/Script6.cpp | 6 +++-- src/core/Camera.cpp | 25 ++++++++++--------- src/core/FileLoader.cpp | 9 +++++++ src/core/Pools.cpp | 10 ++++++-- src/core/Radar.cpp | 3 +++ src/entities/Entity.cpp | 6 +++++ src/entities/Physical.cpp | 27 +++++++++++--------- src/peds/Ped.cpp | 16 ++++++------ src/peds/PedAI.cpp | 44 ++++++++++++++++++++++++++------- src/render/WaterLevel.cpp | 5 +++- src/save/GenericGameStorage.cpp | 3 +++ src/vehicles/CarGen.cpp | 7 +++++- 15 files changed, 139 insertions(+), 49 deletions(-) diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp index 96a8a670..8318bc1a 100644 --- a/src/control/Pickups.cpp +++ b/src/control/Pickups.cpp @@ -814,6 +814,9 @@ void CPickups::RenderPickUpText() { wchar *strToPrint; +#ifdef FIX_BUGS + strToPrint = nil; +#endif for (int32 i = 0; i < NumMessages; i++) { if (aMessages[i].m_quantity <= 39) { switch (aMessages[i].m_quantity) // could use some enum maybe @@ -1285,7 +1288,11 @@ CPacManPickups::GeneratePMPickUpsForRace(int32 race) int i = 0; if (race == 0) pPos = aRacePoints1; // there's only one available - assert(pPos != nil); + + if(!pPos) { + debug("This shouldn't happen"); + return; + } while (!pPos->IsZero()) { while (aPMPickUps[i].m_eType != PACMAN_NONE) diff --git a/src/control/Script.cpp b/src/control/Script.cpp index e70bd508..83f43276 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -3439,8 +3439,13 @@ int8 CRunningScript::ProcessCommands100To199(int32 command) } else { CVehicle* car; - if (!CModelInfo::IsBikeModel(ScriptParams[0])) - car = new CAutomobile(ScriptParams[0], MISSION_VEHICLE); + if(!CModelInfo::IsBikeModel(ScriptParams[0])) car = new CAutomobile(ScriptParams[0], MISSION_VEHICLE); +#ifdef FIX_BUGS + else { + debug("This shouldn't happen"); + return 0; + } +#endif CVector pos = *(CVector*)&ScriptParams[1]; if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); diff --git a/src/control/Script4.cpp b/src/control/Script4.cpp index 40f9f2f1..740a8e2e 100644 --- a/src/control/Script4.cpp +++ b/src/control/Script4.cpp @@ -1817,8 +1817,13 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) if (model == -1) return 0; CVehicle* car; - if (!CModelInfo::IsBikeModel(model)) - car = new CAutomobile(model, RANDOM_VEHICLE); + if(!CModelInfo::IsBikeModel(model)) car = new CAutomobile(model, RANDOM_VEHICLE); +#ifdef FIX_BUGS + else { + debug("This shouldn't happen"); + return 0; + } +#endif CVector pos = *(CVector*)&ScriptParams[0]; pos.z += car->GetDistanceFromCentreOfMassToBaseOfModel(); car->SetPosition(pos); diff --git a/src/control/Script6.cpp b/src/control/Script6.cpp index 31be6987..f8e2d8f1 100644 --- a/src/control/Script6.cpp +++ b/src/control/Script6.cpp @@ -971,8 +971,10 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) pClosestEntity = apEntities[i]; } } - if (pClosestEntity->IsDummy()) - pClosestEntity = nil; +#ifdef FIX_BUGS + if(pClosestEntity) +#endif + if(pClosestEntity->IsDummy()) pClosestEntity = nil; } if (pClosestEntity) { script_assert(pClosestEntity->IsObject()); diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp index 2ce4e754..712e9d09 100644 --- a/src/core/Camera.cpp +++ b/src/core/Camera.cpp @@ -1699,10 +1699,12 @@ CCamera::CamControl(void) Cams[ActiveCam].CamTargetEntity = pTargetEntity; // Ped visibility - if((Cams[ActiveCam].Mode == CCam::MODE_1STPERSON || - Cams[ActiveCam].Mode == CCam::MODE_SNIPER || - Cams[ActiveCam].Mode == CCam::MODE_M16_1STPERSON || - Cams[ActiveCam].Mode == CCam::MODE_ROCKETLAUNCHER) && pTargetEntity->IsPed() || + if(((Cams[ActiveCam].Mode == CCam::MODE_1STPERSON || Cams[ActiveCam].Mode == CCam::MODE_SNIPER || Cams[ActiveCam].Mode == CCam::MODE_M16_1STPERSON || + Cams[ActiveCam].Mode == CCam::MODE_ROCKETLAUNCHER) && +#ifdef FIX_BUGS + pTargetEntity && +#endif + pTargetEntity->IsPed()) || Cams[ActiveCam].Mode == CCam::MODE_FLYBY) FindPlayerPed()->bIsVisible = false; else @@ -1754,14 +1756,15 @@ CCamera::UpdateTargetEntity(void) PLAYER->m_pMyVehicle && PLAYER->m_pMyVehicle->CanPedOpenLocks(PLAYER)) cantOpen = false; - - if(PLAYER->GetPedState() == PED_ENTER_CAR && !cantOpen){ - if(!enteringCar && CarZoomIndicator != CAM_ZOOM_1STPRS){ - pTargetEntity = PLAYER->m_pMyVehicle; - if(PLAYER->m_pMyVehicle == nil) - pTargetEntity = PLAYER; +#ifdef FIX_BUGS + if(PLAYER) +#endif + if(PLAYER->GetPedState() == PED_ENTER_CAR && !cantOpen) { + if(!enteringCar && CarZoomIndicator != CAM_ZOOM_1STPRS) { + pTargetEntity = PLAYER->m_pMyVehicle; + if(PLAYER->m_pMyVehicle == nil) pTargetEntity = PLAYER; + } } - } if((PLAYER->GetPedState() == PED_CARJACK || PLAYER->GetPedState() == PED_OPEN_DOOR) && !cantOpen){ if(!enteringCar && CarZoomIndicator != CAM_ZOOM_1STPRS) diff --git a/src/core/FileLoader.cpp b/src/core/FileLoader.cpp index 22e0159c..7724d919 100644 --- a/src/core/FileLoader.cpp +++ b/src/core/FileLoader.cpp @@ -1090,6 +1090,9 @@ CFileLoader::LoadObject(const char *line) char model[24], txd[24]; float dist[3]; uint32 flags; +#ifdef FIX_BUGS + flags = 0; +#endif int damaged; CSimpleModelInfo *mi; @@ -1186,6 +1189,9 @@ CFileLoader::LoadTimeObject(const char *line) char model[24], txd[24]; float dist[3]; uint32 flags; +#ifdef FIX_BUGS + flags = 0; +#endif int timeOn, timeOff; int damaged; CTimeModelInfo *mi, *other; @@ -1790,6 +1796,9 @@ CFileLoader::ReloadObject(const char *line) char model[24], txd[24]; float dist[3]; uint32 flags; +#ifdef FIX_BUGS + flags = 0; +#endif CSimpleModelInfo *mi; if(sscanf(line, "%d %s %s %d", &id, model, txd, &numObjs) != 4) diff --git a/src/core/Pools.cpp b/src/core/Pools.cpp index 39cfb1d4..54055243 100644 --- a/src/core/Pools.cpp +++ b/src/core/Pools.cpp @@ -144,8 +144,11 @@ INITSAVEBUF pVehicle = new(slot) CBoat(model, RANDOM_VEHICLE); else if (type == VEHICLE_TYPE_CAR) pVehicle = new(slot) CAutomobile(model, RANDOM_VEHICLE); - else + else { assert(0); + debug("This shouldn't happen"); + return; + } --CCarCtrl::NumRandomCars; pVehicle->Load(buf); CWorld::Add(pVehicle); @@ -518,8 +521,11 @@ INITSAVEBUF if (pedtype == PEDTYPE_PLAYER1) pPed = new(ref) CPlayerPed(); - else + else { assert(0); + debug("This shouldn't happen"); + return; + } pPed->Load(buf); if (pedtype == PEDTYPE_PLAYER1) { diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp index 4fd7f1a5..7f778498 100644 --- a/src/core/Radar.cpp +++ b/src/core/Radar.cpp @@ -404,6 +404,9 @@ void CRadar::Draw3dMarkers() case BLIP_CHAR: { CEntity *entity = CPools::GetPedPool()->GetAt(ms_RadarTrace[i].m_nEntityHandle); +#ifdef FIX_BUGS + if(!entity) break; +#endif if (entity != nil) { if (((CPed*)entity)->InVehicle()) entity = ((CPed * )entity)->m_pMyVehicle; diff --git a/src/entities/Entity.cpp b/src/entities/Entity.cpp index 4885d631..dc70a31a 100644 --- a/src/entities/Entity.cpp +++ b/src/entities/Entity.cpp @@ -504,6 +504,9 @@ CEntity::Add(void) case ENTITY_TYPE_DUMMY: list = &s->m_lists[ENTITYLIST_DUMMIES_OVERLAP]; break; +#ifdef FIX_BUGS + default: debug("This shouldn't happen"); return; +#endif } list->InsertItem(this); } @@ -564,6 +567,9 @@ CEntity::Remove(void) case ENTITY_TYPE_DUMMY: list = &s->m_lists[ENTITYLIST_DUMMIES_OVERLAP]; break; +#ifdef FIX_BUGS + default: debug("This shouldn't happen"); return; +#endif } list->RemoveItem(this); } diff --git a/src/entities/Physical.cpp b/src/entities/Physical.cpp index ed01297e..4088f1d1 100644 --- a/src/entities/Physical.cpp +++ b/src/entities/Physical.cpp @@ -126,6 +126,8 @@ CPhysical::Add(void) break; default: assert(0); + debug("This shouldn't happen"); + return; } CPtrNode *node = list->InsertItem(this); assert(node); @@ -191,17 +193,20 @@ CPhysical::RemoveAndAdd(void) list = &s->m_lists[ENTITYLIST_OBJECTS_OVERLAP]; break; } - if(next){ - // If we still have old nodes, use them - next->list->RemoveNode(next->listnode); - list->InsertNode(next->listnode); - next->list = list; - next->sector = s; - next = next->next; - }else{ - CPtrNode *node = list->InsertItem(this); - m_entryInfoList.InsertItem(list, node, s); - } +#ifdef FIX_BUGS + if(list) +#endif + if(next) { + // If we still have old nodes, use them + next->list->RemoveNode(next->listnode); + list->InsertNode(next->listnode); + next->list = list; + next->sector = s; + next = next->next; + } else { + CPtrNode *node = list->InsertItem(this); + m_entryInfoList.InsertItem(list, node, s); + } } // Remove old nodes we no longer need diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index 87e77ef3..a498e251 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -4348,13 +4348,15 @@ CPed::PedSetDraggedOutCarCB(CAnimBlendAssociation *dragAssoc, void *arg) } #endif - if (quickJackedAssoc) { - dragAssoc->SetDeleteCallback(PedSetQuickDraggedOutCarPositionCB, ped); - } else { - dragAssoc->SetDeleteCallback(PedSetDraggedOutCarPositionCB, ped); - if (ped->CanSetPedState()) - CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_GETUP1, 1000.0f); - } +#ifdef FIX_BUGS + if(dragAssoc) +#endif + if(quickJackedAssoc) { + dragAssoc->SetDeleteCallback(PedSetQuickDraggedOutCarPositionCB, ped); + } else { + dragAssoc->SetDeleteCallback(PedSetDraggedOutCarPositionCB, ped); + if(ped->CanSetPedState()) CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_GETUP1, 1000.0f); + } ped->ReplaceWeaponWhenExitingVehicle(); diff --git a/src/peds/PedAI.cpp b/src/peds/PedAI.cpp index 089c8d9d..73958a43 100644 --- a/src/peds/PedAI.cpp +++ b/src/peds/PedAI.cpp @@ -2244,6 +2244,9 @@ CPed::PedAnimAlignCB(CAnimBlendAssociation *animAssoc, void *arg) enterDoor = DOOR_REAR_LEFT; break; default: +#ifdef FIX_BUGS + enterDoor = DOOR_BONNET; +#endif break; } @@ -2356,7 +2359,7 @@ CPed::PedAnimDoorOpenCB(CAnimBlendAssociation* animAssoc, void* arg) case CAR_DOOR_RR: door = DOOR_REAR_RIGHT; pedInSeat = veh->pPassengers[2]; break; case CAR_DOOR_LF: door = DOOR_FRONT_LEFT; pedInSeat = veh->pDriver; break; case CAR_DOOR_LR: door = DOOR_REAR_LEFT; pedInSeat = veh->pPassengers[1]; break; - default: assert(0); + default: assert(0); debug("This shouldn't happen"); return; } if (ped->m_fHealth == 0.0f || CPad::GetPad(0)->ArePlayerControlsDisabled() && pedInSeat && pedInSeat->IsPlayer()) { @@ -2554,6 +2557,9 @@ CPed::PedAnimPullPedOutCB(CAnimBlendAssociation* animAssoc, void* arg) case PEDTYPE_PLAYER4: padNo = 3; break; + default: + padNo = 0; + break; } CPad *pad = CPad::GetPad(padNo); @@ -2657,6 +2663,9 @@ CPed::PedAnimGetInCB(CAnimBlendAssociation *animAssoc, void *arg) enterDoor = DOOR_REAR_LEFT; break; default: +#ifdef FIX_BUGS + enterDoor = DOOR_BONNET; +#endif break; } if (!veh->IsDoorMissing(enterDoor)) { @@ -2752,12 +2761,15 @@ CPed::PedAnimDoorCloseCB(CAnimBlendAssociation *animAssoc, void *arg) veh->ProcessOpenDoor(ped->m_vehDoor, ANIM_CAR_CLOSEDOOR_LHS, 1.0f); eDoors door; - switch (ped->m_vehDoor) { - case CAR_DOOR_RF: door = DOOR_FRONT_RIGHT; break; - case CAR_DOOR_RR: door = DOOR_REAR_RIGHT; break; - case CAR_DOOR_LF: door = DOOR_FRONT_LEFT; break; - case CAR_DOOR_LR: door = DOOR_REAR_LEFT; break; - default: assert(0); + switch(ped->m_vehDoor) { + case CAR_DOOR_RF: door = DOOR_FRONT_RIGHT; break; + case CAR_DOOR_RR: door = DOOR_REAR_RIGHT; break; + case CAR_DOOR_LF: door = DOOR_FRONT_LEFT; break; + case CAR_DOOR_LR: door = DOOR_REAR_LEFT; break; + default: + assert(0); + debug("This shouldn't happen"); + return; } if (veh->Damage.GetDoorStatus(door) == DOOR_STATUS_SWINGING) @@ -2926,6 +2938,9 @@ CPed::PedAnimStepOutCarCB(CAnimBlendAssociation* animAssoc, void* arg) door = DOOR_REAR_LEFT; break; default: +#ifdef FIX_BUGS + door = DOOR_BONNET; +#endif break; } bool closeDoor = !veh->IsDoorMissing(door); @@ -2947,6 +2962,12 @@ CPed::PedAnimStepOutCarCB(CAnimBlendAssociation* animAssoc, void* arg) case PEDTYPE_PLAYER4: padNo = 3; break; + default: +#ifdef FIX_BUGS + padNo = 0; + debug("This shouldn't happen"); +#endif + break; } CPad* pad = CPad::GetPad(padNo); bool engineIsIntact = veh->IsCar() && ((CAutomobile*)veh)->Damage.GetEngineStatus() >= 225; @@ -3285,6 +3306,9 @@ CPed::SetCarJack(CVehicle* car) { uint8 doorFlag; eDoors door; +#ifdef FIX_BUGS + door = DOOR_BONNET; +#endif CPed *pedInSeat = nil; if (car->IsBoat()) @@ -3440,8 +3464,10 @@ CPed::BeingDraggedFromCar(void) if (!dontRunAnim) m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, enterAnim); - - m_pVehicleAnim->SetFinishCallback(PedSetDraggedOutCarCB, this); +#ifdef FIX_BUGS + if(m_pVehicleAnim) +#endif + m_pVehicleAnim->SetFinishCallback(PedSetDraggedOutCarCB, this); lineUpType = LINE_UP_TO_CAR_START; } else if (m_pVehicleAnim->currentTime <= 1.4f) { m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.0f); diff --git a/src/render/WaterLevel.cpp b/src/render/WaterLevel.cpp index 7aa01f5a..231ae14f 100644 --- a/src/render/WaterLevel.cpp +++ b/src/render/WaterLevel.cpp @@ -745,7 +745,10 @@ CWaterLevel::RenderWater() if ( fHugeSectorDistToCamSqr >= SQR(500.0f) /*fHugeSectorNearDist*/ ) { float fZ; - +#ifdef FIX_BUGS + fZ = 0.f; +#endif + if ( aWaterBlockList[2*x+0][2*y+0] >= 0 ) fZ = ms_aWaterZs[ aWaterBlockList[2*x+0][2*y+0] ]; diff --git a/src/save/GenericGameStorage.cpp b/src/save/GenericGameStorage.cpp index a7cafec8..d0f9e7ba 100644 --- a/src/save/GenericGameStorage.cpp +++ b/src/save/GenericGameStorage.cpp @@ -251,6 +251,9 @@ GenericLoad() uint8 *buf; int32 file; uint32 size; +#ifdef FIX_BUGS + size = 0; +#endif #ifdef MISSION_REPLAY int8 qs; #endif diff --git a/src/vehicles/CarGen.cpp b/src/vehicles/CarGen.cpp index 7524444b..9a0e5847 100644 --- a/src/vehicles/CarGen.cpp +++ b/src/vehicles/CarGen.cpp @@ -100,7 +100,12 @@ void CCarGenerator::DoInternalProcessing() // 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); - +#ifdef FIX_BUGS + else { + debug("This shouldn't happen"); + return; + } +#endif pCar->SetIsStatic(false); pCar->bEngineOn = false; pos.z += pCar->GetDistanceFromCentreOfMassToBaseOfModel(); From 3d4791f2915a5b1f38c34a0cf01e0dffc588af8c Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Sun, 31 Jan 2021 21:06:38 +0100 Subject: [PATCH 4/5] Revert "First batch of fixes (CallAndMessage)" This reverts commit 7a3b80a9b7f414967fe59f89ab0fe5416735babe. --- src/control/Pickups.cpp | 9 +------ src/control/Script.cpp | 9 ++----- src/control/Script4.cpp | 9 ++----- src/control/Script6.cpp | 6 ++--- src/core/Camera.cpp | 25 +++++++++---------- src/core/FileLoader.cpp | 9 ------- src/core/Pools.cpp | 10 ++------ src/core/Radar.cpp | 3 --- src/entities/Entity.cpp | 6 ----- src/entities/Physical.cpp | 27 +++++++++----------- src/peds/Ped.cpp | 16 ++++++------ src/peds/PedAI.cpp | 44 +++++++-------------------------- src/render/WaterLevel.cpp | 5 +--- src/save/GenericGameStorage.cpp | 3 --- src/vehicles/CarGen.cpp | 7 +----- 15 files changed, 49 insertions(+), 139 deletions(-) diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp index 8318bc1a..96a8a670 100644 --- a/src/control/Pickups.cpp +++ b/src/control/Pickups.cpp @@ -814,9 +814,6 @@ void CPickups::RenderPickUpText() { wchar *strToPrint; -#ifdef FIX_BUGS - strToPrint = nil; -#endif for (int32 i = 0; i < NumMessages; i++) { if (aMessages[i].m_quantity <= 39) { switch (aMessages[i].m_quantity) // could use some enum maybe @@ -1288,11 +1285,7 @@ CPacManPickups::GeneratePMPickUpsForRace(int32 race) int i = 0; if (race == 0) pPos = aRacePoints1; // there's only one available - - if(!pPos) { - debug("This shouldn't happen"); - return; - } + assert(pPos != nil); while (!pPos->IsZero()) { while (aPMPickUps[i].m_eType != PACMAN_NONE) diff --git a/src/control/Script.cpp b/src/control/Script.cpp index 83f43276..e70bd508 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -3439,13 +3439,8 @@ int8 CRunningScript::ProcessCommands100To199(int32 command) } else { CVehicle* car; - if(!CModelInfo::IsBikeModel(ScriptParams[0])) car = new CAutomobile(ScriptParams[0], MISSION_VEHICLE); -#ifdef FIX_BUGS - else { - debug("This shouldn't happen"); - return 0; - } -#endif + if (!CModelInfo::IsBikeModel(ScriptParams[0])) + car = new CAutomobile(ScriptParams[0], MISSION_VEHICLE); CVector pos = *(CVector*)&ScriptParams[1]; if (pos.z <= MAP_Z_LOW_LIMIT) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); diff --git a/src/control/Script4.cpp b/src/control/Script4.cpp index 740a8e2e..40f9f2f1 100644 --- a/src/control/Script4.cpp +++ b/src/control/Script4.cpp @@ -1817,13 +1817,8 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) if (model == -1) return 0; CVehicle* car; - if(!CModelInfo::IsBikeModel(model)) car = new CAutomobile(model, RANDOM_VEHICLE); -#ifdef FIX_BUGS - else { - debug("This shouldn't happen"); - return 0; - } -#endif + if (!CModelInfo::IsBikeModel(model)) + car = new CAutomobile(model, RANDOM_VEHICLE); CVector pos = *(CVector*)&ScriptParams[0]; pos.z += car->GetDistanceFromCentreOfMassToBaseOfModel(); car->SetPosition(pos); diff --git a/src/control/Script6.cpp b/src/control/Script6.cpp index f8e2d8f1..31be6987 100644 --- a/src/control/Script6.cpp +++ b/src/control/Script6.cpp @@ -971,10 +971,8 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) pClosestEntity = apEntities[i]; } } -#ifdef FIX_BUGS - if(pClosestEntity) -#endif - if(pClosestEntity->IsDummy()) pClosestEntity = nil; + if (pClosestEntity->IsDummy()) + pClosestEntity = nil; } if (pClosestEntity) { script_assert(pClosestEntity->IsObject()); diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp index 712e9d09..2ce4e754 100644 --- a/src/core/Camera.cpp +++ b/src/core/Camera.cpp @@ -1699,12 +1699,10 @@ CCamera::CamControl(void) Cams[ActiveCam].CamTargetEntity = pTargetEntity; // Ped visibility - if(((Cams[ActiveCam].Mode == CCam::MODE_1STPERSON || Cams[ActiveCam].Mode == CCam::MODE_SNIPER || Cams[ActiveCam].Mode == CCam::MODE_M16_1STPERSON || - Cams[ActiveCam].Mode == CCam::MODE_ROCKETLAUNCHER) && -#ifdef FIX_BUGS - pTargetEntity && -#endif - pTargetEntity->IsPed()) || + if((Cams[ActiveCam].Mode == CCam::MODE_1STPERSON || + Cams[ActiveCam].Mode == CCam::MODE_SNIPER || + Cams[ActiveCam].Mode == CCam::MODE_M16_1STPERSON || + Cams[ActiveCam].Mode == CCam::MODE_ROCKETLAUNCHER) && pTargetEntity->IsPed() || Cams[ActiveCam].Mode == CCam::MODE_FLYBY) FindPlayerPed()->bIsVisible = false; else @@ -1756,15 +1754,14 @@ CCamera::UpdateTargetEntity(void) PLAYER->m_pMyVehicle && PLAYER->m_pMyVehicle->CanPedOpenLocks(PLAYER)) cantOpen = false; -#ifdef FIX_BUGS - if(PLAYER) -#endif - if(PLAYER->GetPedState() == PED_ENTER_CAR && !cantOpen) { - if(!enteringCar && CarZoomIndicator != CAM_ZOOM_1STPRS) { - pTargetEntity = PLAYER->m_pMyVehicle; - if(PLAYER->m_pMyVehicle == nil) pTargetEntity = PLAYER; - } + + if(PLAYER->GetPedState() == PED_ENTER_CAR && !cantOpen){ + if(!enteringCar && CarZoomIndicator != CAM_ZOOM_1STPRS){ + pTargetEntity = PLAYER->m_pMyVehicle; + if(PLAYER->m_pMyVehicle == nil) + pTargetEntity = PLAYER; } + } if((PLAYER->GetPedState() == PED_CARJACK || PLAYER->GetPedState() == PED_OPEN_DOOR) && !cantOpen){ if(!enteringCar && CarZoomIndicator != CAM_ZOOM_1STPRS) diff --git a/src/core/FileLoader.cpp b/src/core/FileLoader.cpp index 7724d919..22e0159c 100644 --- a/src/core/FileLoader.cpp +++ b/src/core/FileLoader.cpp @@ -1090,9 +1090,6 @@ CFileLoader::LoadObject(const char *line) char model[24], txd[24]; float dist[3]; uint32 flags; -#ifdef FIX_BUGS - flags = 0; -#endif int damaged; CSimpleModelInfo *mi; @@ -1189,9 +1186,6 @@ CFileLoader::LoadTimeObject(const char *line) char model[24], txd[24]; float dist[3]; uint32 flags; -#ifdef FIX_BUGS - flags = 0; -#endif int timeOn, timeOff; int damaged; CTimeModelInfo *mi, *other; @@ -1796,9 +1790,6 @@ CFileLoader::ReloadObject(const char *line) char model[24], txd[24]; float dist[3]; uint32 flags; -#ifdef FIX_BUGS - flags = 0; -#endif CSimpleModelInfo *mi; if(sscanf(line, "%d %s %s %d", &id, model, txd, &numObjs) != 4) diff --git a/src/core/Pools.cpp b/src/core/Pools.cpp index 54055243..39cfb1d4 100644 --- a/src/core/Pools.cpp +++ b/src/core/Pools.cpp @@ -144,11 +144,8 @@ INITSAVEBUF pVehicle = new(slot) CBoat(model, RANDOM_VEHICLE); else if (type == VEHICLE_TYPE_CAR) pVehicle = new(slot) CAutomobile(model, RANDOM_VEHICLE); - else { + else assert(0); - debug("This shouldn't happen"); - return; - } --CCarCtrl::NumRandomCars; pVehicle->Load(buf); CWorld::Add(pVehicle); @@ -521,11 +518,8 @@ INITSAVEBUF if (pedtype == PEDTYPE_PLAYER1) pPed = new(ref) CPlayerPed(); - else { + else assert(0); - debug("This shouldn't happen"); - return; - } pPed->Load(buf); if (pedtype == PEDTYPE_PLAYER1) { diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp index 7f778498..4fd7f1a5 100644 --- a/src/core/Radar.cpp +++ b/src/core/Radar.cpp @@ -404,9 +404,6 @@ void CRadar::Draw3dMarkers() case BLIP_CHAR: { CEntity *entity = CPools::GetPedPool()->GetAt(ms_RadarTrace[i].m_nEntityHandle); -#ifdef FIX_BUGS - if(!entity) break; -#endif if (entity != nil) { if (((CPed*)entity)->InVehicle()) entity = ((CPed * )entity)->m_pMyVehicle; diff --git a/src/entities/Entity.cpp b/src/entities/Entity.cpp index dc70a31a..4885d631 100644 --- a/src/entities/Entity.cpp +++ b/src/entities/Entity.cpp @@ -504,9 +504,6 @@ CEntity::Add(void) case ENTITY_TYPE_DUMMY: list = &s->m_lists[ENTITYLIST_DUMMIES_OVERLAP]; break; -#ifdef FIX_BUGS - default: debug("This shouldn't happen"); return; -#endif } list->InsertItem(this); } @@ -567,9 +564,6 @@ CEntity::Remove(void) case ENTITY_TYPE_DUMMY: list = &s->m_lists[ENTITYLIST_DUMMIES_OVERLAP]; break; -#ifdef FIX_BUGS - default: debug("This shouldn't happen"); return; -#endif } list->RemoveItem(this); } diff --git a/src/entities/Physical.cpp b/src/entities/Physical.cpp index 4088f1d1..ed01297e 100644 --- a/src/entities/Physical.cpp +++ b/src/entities/Physical.cpp @@ -126,8 +126,6 @@ CPhysical::Add(void) break; default: assert(0); - debug("This shouldn't happen"); - return; } CPtrNode *node = list->InsertItem(this); assert(node); @@ -193,20 +191,17 @@ CPhysical::RemoveAndAdd(void) list = &s->m_lists[ENTITYLIST_OBJECTS_OVERLAP]; break; } -#ifdef FIX_BUGS - if(list) -#endif - if(next) { - // If we still have old nodes, use them - next->list->RemoveNode(next->listnode); - list->InsertNode(next->listnode); - next->list = list; - next->sector = s; - next = next->next; - } else { - CPtrNode *node = list->InsertItem(this); - m_entryInfoList.InsertItem(list, node, s); - } + if(next){ + // If we still have old nodes, use them + next->list->RemoveNode(next->listnode); + list->InsertNode(next->listnode); + next->list = list; + next->sector = s; + next = next->next; + }else{ + CPtrNode *node = list->InsertItem(this); + m_entryInfoList.InsertItem(list, node, s); + } } // Remove old nodes we no longer need diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index a498e251..87e77ef3 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -4348,15 +4348,13 @@ CPed::PedSetDraggedOutCarCB(CAnimBlendAssociation *dragAssoc, void *arg) } #endif -#ifdef FIX_BUGS - if(dragAssoc) -#endif - if(quickJackedAssoc) { - dragAssoc->SetDeleteCallback(PedSetQuickDraggedOutCarPositionCB, ped); - } else { - dragAssoc->SetDeleteCallback(PedSetDraggedOutCarPositionCB, ped); - if(ped->CanSetPedState()) CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_GETUP1, 1000.0f); - } + if (quickJackedAssoc) { + dragAssoc->SetDeleteCallback(PedSetQuickDraggedOutCarPositionCB, ped); + } else { + dragAssoc->SetDeleteCallback(PedSetDraggedOutCarPositionCB, ped); + if (ped->CanSetPedState()) + CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_GETUP1, 1000.0f); + } ped->ReplaceWeaponWhenExitingVehicle(); diff --git a/src/peds/PedAI.cpp b/src/peds/PedAI.cpp index 73958a43..089c8d9d 100644 --- a/src/peds/PedAI.cpp +++ b/src/peds/PedAI.cpp @@ -2244,9 +2244,6 @@ CPed::PedAnimAlignCB(CAnimBlendAssociation *animAssoc, void *arg) enterDoor = DOOR_REAR_LEFT; break; default: -#ifdef FIX_BUGS - enterDoor = DOOR_BONNET; -#endif break; } @@ -2359,7 +2356,7 @@ CPed::PedAnimDoorOpenCB(CAnimBlendAssociation* animAssoc, void* arg) case CAR_DOOR_RR: door = DOOR_REAR_RIGHT; pedInSeat = veh->pPassengers[2]; break; case CAR_DOOR_LF: door = DOOR_FRONT_LEFT; pedInSeat = veh->pDriver; break; case CAR_DOOR_LR: door = DOOR_REAR_LEFT; pedInSeat = veh->pPassengers[1]; break; - default: assert(0); debug("This shouldn't happen"); return; + default: assert(0); } if (ped->m_fHealth == 0.0f || CPad::GetPad(0)->ArePlayerControlsDisabled() && pedInSeat && pedInSeat->IsPlayer()) { @@ -2557,9 +2554,6 @@ CPed::PedAnimPullPedOutCB(CAnimBlendAssociation* animAssoc, void* arg) case PEDTYPE_PLAYER4: padNo = 3; break; - default: - padNo = 0; - break; } CPad *pad = CPad::GetPad(padNo); @@ -2663,9 +2657,6 @@ CPed::PedAnimGetInCB(CAnimBlendAssociation *animAssoc, void *arg) enterDoor = DOOR_REAR_LEFT; break; default: -#ifdef FIX_BUGS - enterDoor = DOOR_BONNET; -#endif break; } if (!veh->IsDoorMissing(enterDoor)) { @@ -2761,15 +2752,12 @@ CPed::PedAnimDoorCloseCB(CAnimBlendAssociation *animAssoc, void *arg) veh->ProcessOpenDoor(ped->m_vehDoor, ANIM_CAR_CLOSEDOOR_LHS, 1.0f); eDoors door; - switch(ped->m_vehDoor) { - case CAR_DOOR_RF: door = DOOR_FRONT_RIGHT; break; - case CAR_DOOR_RR: door = DOOR_REAR_RIGHT; break; - case CAR_DOOR_LF: door = DOOR_FRONT_LEFT; break; - case CAR_DOOR_LR: door = DOOR_REAR_LEFT; break; - default: - assert(0); - debug("This shouldn't happen"); - return; + switch (ped->m_vehDoor) { + case CAR_DOOR_RF: door = DOOR_FRONT_RIGHT; break; + case CAR_DOOR_RR: door = DOOR_REAR_RIGHT; break; + case CAR_DOOR_LF: door = DOOR_FRONT_LEFT; break; + case CAR_DOOR_LR: door = DOOR_REAR_LEFT; break; + default: assert(0); } if (veh->Damage.GetDoorStatus(door) == DOOR_STATUS_SWINGING) @@ -2938,9 +2926,6 @@ CPed::PedAnimStepOutCarCB(CAnimBlendAssociation* animAssoc, void* arg) door = DOOR_REAR_LEFT; break; default: -#ifdef FIX_BUGS - door = DOOR_BONNET; -#endif break; } bool closeDoor = !veh->IsDoorMissing(door); @@ -2962,12 +2947,6 @@ CPed::PedAnimStepOutCarCB(CAnimBlendAssociation* animAssoc, void* arg) case PEDTYPE_PLAYER4: padNo = 3; break; - default: -#ifdef FIX_BUGS - padNo = 0; - debug("This shouldn't happen"); -#endif - break; } CPad* pad = CPad::GetPad(padNo); bool engineIsIntact = veh->IsCar() && ((CAutomobile*)veh)->Damage.GetEngineStatus() >= 225; @@ -3306,9 +3285,6 @@ CPed::SetCarJack(CVehicle* car) { uint8 doorFlag; eDoors door; -#ifdef FIX_BUGS - door = DOOR_BONNET; -#endif CPed *pedInSeat = nil; if (car->IsBoat()) @@ -3464,10 +3440,8 @@ CPed::BeingDraggedFromCar(void) if (!dontRunAnim) m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, enterAnim); -#ifdef FIX_BUGS - if(m_pVehicleAnim) -#endif - m_pVehicleAnim->SetFinishCallback(PedSetDraggedOutCarCB, this); + + m_pVehicleAnim->SetFinishCallback(PedSetDraggedOutCarCB, this); lineUpType = LINE_UP_TO_CAR_START; } else if (m_pVehicleAnim->currentTime <= 1.4f) { m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.0f); diff --git a/src/render/WaterLevel.cpp b/src/render/WaterLevel.cpp index 231ae14f..7aa01f5a 100644 --- a/src/render/WaterLevel.cpp +++ b/src/render/WaterLevel.cpp @@ -745,10 +745,7 @@ CWaterLevel::RenderWater() if ( fHugeSectorDistToCamSqr >= SQR(500.0f) /*fHugeSectorNearDist*/ ) { float fZ; -#ifdef FIX_BUGS - fZ = 0.f; -#endif - + if ( aWaterBlockList[2*x+0][2*y+0] >= 0 ) fZ = ms_aWaterZs[ aWaterBlockList[2*x+0][2*y+0] ]; diff --git a/src/save/GenericGameStorage.cpp b/src/save/GenericGameStorage.cpp index d0f9e7ba..a7cafec8 100644 --- a/src/save/GenericGameStorage.cpp +++ b/src/save/GenericGameStorage.cpp @@ -251,9 +251,6 @@ GenericLoad() uint8 *buf; int32 file; uint32 size; -#ifdef FIX_BUGS - size = 0; -#endif #ifdef MISSION_REPLAY int8 qs; #endif diff --git a/src/vehicles/CarGen.cpp b/src/vehicles/CarGen.cpp index 9a0e5847..7524444b 100644 --- a/src/vehicles/CarGen.cpp +++ b/src/vehicles/CarGen.cpp @@ -100,12 +100,7 @@ void CCarGenerator::DoInternalProcessing() // 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); -#ifdef FIX_BUGS - else { - debug("This shouldn't happen"); - return; - } -#endif + pCar->SetIsStatic(false); pCar->bEngineOn = false; pos.z += pCar->GetDistanceFromCentreOfMassToBaseOfModel(); From 4afa7b86aefdb98eab039e76bdaf0c6f75c67cfa Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sun, 31 Jan 2021 23:44:30 +0200 Subject: [PATCH 5/5] Add radio off text --- gamefiles/TEXT/american.gxt | Bin 220146 -> 220176 bytes src/audio/MusicManager.cpp | 4 ++-- utils/gxt/american.txt | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gamefiles/TEXT/american.gxt b/gamefiles/TEXT/american.gxt index cf4bb1e537a7ed4f0ca43b2455bfbe51dde8435f..756fafa301e5a9e12e6e0d9ed307629a277800bf 100644 GIT binary patch delta 7058 zcmX|`4U`nsm4NSSejGV8M+nk1I}03|Ap;`g{4k9C9jfc6f2OLsrmDJoW&{dwM9`4{ zvVbJgh)9%(icgRrl8FZaSyVz#BDx|v3oZd9!eUfHIMLM{Hj6Av&{Yn)d#mbJ!GZJD zt^4l1@4owf>h;w(qR$+R_OYAgwxOH){5?K$X#@nV7TiAvUI&*Q_vx>EAluDm@;BL( zXvg!Oj?;|tY?(!RMOY>8)7xRQ`8~aBSUca`I}z=_5tXc3CxuEq{AlkKo57=fPQAQz#D z*H&0n2N$6vC)gRi779NJxDEy^4!9on@mDHp*k%4H{(q)?^UYSTsDjNzx0O;03;4qR ziTv3WC`k*p8{Lh^T$TkJ`(L@9xDKE(VC;kua09@CfF}Yx6>uZKuJUL7v1b=K8xUjL z%kcp#`m?vnn}*%R;-CBx%@%A&G;NrF)@Ru?;Q;Sbd6=!@M=NVs7yr7lCcX#LDanfD zMz$UQA?tz$a9?@aKi)NCfe(dpbmRzD>iT5_WUY`k@&+8(iL6VQNPwX) z`y~@Y=)+wH<$mfFcV{on^pK;(93!tB4y=Zm#ilB#dh(|30xIzW!f* ziK5*JXa5|q4h8T1oiuUS zK<5Li+@clm|51ENRU%$}z_lzof~dmsA2FY88?N$KtFSG-O`6THoS(*4(>WUxV~cov z%#^wM>wa5NmEpbBFmDh!UXazjl{RuIH=Kku4Ll~`ClwiG(7H=n&@N-2F(1B+7=4X{-)2_WDXk76H78| zp@e2N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%_gwDc6wdQqglAKF(Tr zCyU!JvFOQp{)QfB5&oIJsMxw90u53|OW@Vy1=NsLXb3q4 zM#yQfLe4;Q$PLi$`zoU2Mwl5o)?iM^I?NB*fQ2Dvp*1vwC&ZAOU~b5GtrRlmCS(V0 zgq(xs6}ad5y=;c5p@Tdu3Aq62wL(YSjRI^bEz3U6*qYLH6YFI=UuMN|G+(xkRxB1; z_?jgC=6dY67+8A3{uyHn`4>){9WIsS{vpEV^ZW8U*$sX&KUQ4a7vj<5iz1+9#4N@w zgx42b_A%dBcp5JoD_Y!&G0);t9k1!}qN3}1Vmz63@(nGg@lvs^HHLT9zi3^A*8Yk- zjh8(%mi6Wm{(q^o?4h4Btjpb#o~|xz$Hv)ar4|eNU%4I^u7J$1NV; zdIaT3*%0$SJza3h;}b6l*0T5>4|kQCrtIv(2J^o^vXhU%ApSjVFckwCtKf&3IIGbOpoN+H3zj;Fh@OB}S#mUk7T)+wF%L7irrI7L7Wfwzz z-IP)aOyW;H`rnl|=c8s)OhAAEj|&zP5Fp`kt;g+r@*6$wv*}T(H?HQC%O*p0f^MA~uV}2O{M=E5} zn2gTSN00wsB>FYZGDolTK8g$}U0nDYtEgLyqFh1|89PHPGPaffcJU&%hWC3ShRbyQ z6Q`>u;*CH)W4I6E*PgA!asj`t;F>JtmfZ?>lib0BMekDelD~Cf=bx@z{_D!+?9IyM vk+PQV1Hgcv!=g?5+ai^lhNRdXn=XIHx^24M7AfDfwJp-?%_l#NEM58k$!ev@ diff --git a/src/audio/MusicManager.cpp b/src/audio/MusicManager.cpp index 54c1b0bc..ad304985 100644 --- a/src/audio/MusicManager.cpp +++ b/src/audio/MusicManager.cpp @@ -163,13 +163,13 @@ cMusicManager::DisplayRadioStationName() case CHATTERBOX: string = TheText.Get("FEA_FM8"); break; case USERTRACK: string = TheText.Get("FEA_FM9"); break; #ifdef RADIO_OFF_TEXT - case RADIO_OFF: case POLICE_RADIO: string = TheText.Get("FEM_OFF"); break; + case RADIO_OFF: case POLICE_RADIO: string = TheText.Get("FEA_FMN"); break; #endif default: return; }; #ifdef RADIO_OFF_TEXT - if(pRetune == USERTRACK && !SampleManager.IsMP3RadioChannelAvailable()) { string = TheText.Get("FEM_OFF"); } + if(pRetune == USERTRACK && !SampleManager.IsMP3RadioChannelAvailable()) { string = TheText.Get("FEA_FMN"); } #else if(pRetune > CHATTERBOX && !SampleManager.IsMP3RadioChannelAvailable()) { return; } #endif diff --git a/utils/gxt/american.txt b/utils/gxt/american.txt index 95e9d280..3b010736 100644 --- a/utils/gxt/american.txt +++ b/utils/gxt/american.txt @@ -8070,6 +8070,9 @@ INVERT PAD VERTICALLY [FEM_TWP] Toggle Waypoint +[FEA_FMN] +RADIO OFF + { end of file } [DUMMY]