diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-06-06 12:31:09 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-06-06 12:31:09 +0200 |
commit | 3f26250d73d5c196a66262821a7980ccdbd8deed (patch) | |
tree | 6dde51e7159bee42448d95fca35edc8e0be92561 /src | |
parent | fixed linux saving (diff) | |
download | re3-3f26250d73d5c196a66262821a7980ccdbd8deed.tar re3-3f26250d73d5c196a66262821a7980ccdbd8deed.tar.gz re3-3f26250d73d5c196a66262821a7980ccdbd8deed.tar.bz2 re3-3f26250d73d5c196a66262821a7980ccdbd8deed.tar.lz re3-3f26250d73d5c196a66262821a7980ccdbd8deed.tar.xz re3-3f26250d73d5c196a66262821a7980ccdbd8deed.tar.zst re3-3f26250d73d5c196a66262821a7980ccdbd8deed.zip |
Diffstat (limited to '')
-rw-r--r-- | src/control/Script.cpp | 4 | ||||
-rw-r--r-- | src/entities/Physical.cpp | 3 | ||||
-rw-r--r-- | src/math/Matrix.h | 4 | ||||
-rw-r--r-- | src/peds/Ped.cpp | 3 | ||||
-rw-r--r-- | src/peds/PlayerPed.cpp | 8 | ||||
-rw-r--r-- | src/vehicles/Plane.cpp | 4 | ||||
-rw-r--r-- | src/vehicles/Train.cpp | 4 | ||||
-rw-r--r-- | src/vehicles/Vehicle.cpp | 3 |
8 files changed, 31 insertions, 2 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp index bc15a695..94590087 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -11763,7 +11763,11 @@ void CTheScripts::UpdateObjectIndices() if (!pModel) continue; strcpy(name, pModel->GetName()); +#ifdef FIX_BUGS + for (int k = 0; k < USED_OBJECT_NAME_LENGTH && name[k]; k++) +#else for (int k = 0; k < USED_OBJECT_NAME_LENGTH; k++) +#endif name[k] = toupper(name[k]); if (strcmp(name, UsedObjectArray[i].name) == 0) { found = true; diff --git a/src/entities/Physical.cpp b/src/entities/Physical.cpp index 9fc5a853..f76c3e29 100644 --- a/src/entities/Physical.cpp +++ b/src/entities/Physical.cpp @@ -63,6 +63,9 @@ CPhysical::CPhysical(void) m_phy_flagA10 = false; m_phy_flagA20 = false; +#ifdef FIX_BUGS + m_nSurfaceTouched = SURFACE_DEFAULT; +#endif m_nZoneLevel = LEVEL_NONE; } diff --git a/src/math/Matrix.h b/src/math/Matrix.h index 5ec79aba..d8920a65 100644 --- a/src/math/Matrix.h +++ b/src/math/Matrix.h @@ -30,7 +30,11 @@ public: RwMatrixDestroy(m_attachment); } void Attach(RwMatrix *matrix, bool owner = false){ +#ifdef FIX_BUGS + if(m_attachment && m_hasRwMatrix) +#else if(m_hasRwMatrix && m_attachment) +#endif RwMatrixDestroy(m_attachment); m_attachment = matrix; m_hasRwMatrix = owner; diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index eebfa099..4e9280e6 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -187,6 +187,9 @@ CPed::CPed(uint32 pedType) : m_pedIK(this) m_queuedSound = SOUND_NO_SOUND; m_objective = OBJECTIVE_NONE; m_prevObjective = OBJECTIVE_NONE; +#ifdef FIX_BUGS + m_objectiveTimer = 0; +#endif CharCreatedBy = RANDOM_CHAR; m_leader = nil; m_pedInObjective = nil; diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp index 305c329e..6613ea1b 100644 --- a/src/peds/PlayerPed.cpp +++ b/src/peds/PlayerPed.cpp @@ -35,6 +35,9 @@ CPlayerPed::CPlayerPed(void) : CPed(PEDTYPE_PLAYER1) { m_fMoveSpeed = 0.0f; SetModelIndex(MI_PLAYER); +#ifdef FIX_BUGS + m_fCurrentStamina = m_fMaxStamina = 150.0f; +#endif SetInitialState(); m_pWanted = new CWanted(); @@ -46,8 +49,9 @@ CPlayerPed::CPlayerPed(void) : CPed(PEDTYPE_PLAYER1) m_bSpeedTimerFlag = false; m_pPointGunAt = nil; m_nPedState = PED_IDLE; - m_fMaxStamina = 150.0f; - m_fCurrentStamina = m_fMaxStamina; +#ifndef FIX_BUGS + m_fCurrentStamina = m_fMaxStamina = 150.0f; +#endif m_fStaminaProgress = 0.0f; m_nEvadeAmount = 0; field_1367 = 0; diff --git a/src/vehicles/Plane.cpp b/src/vehicles/Plane.cpp index 71189d84..3bf385a0 100644 --- a/src/vehicles/Plane.cpp +++ b/src/vehicles/Plane.cpp @@ -84,6 +84,10 @@ CPlane::CPlane(int32 id, uint8 CreatedBy) SetStatus(STATUS_PLANE); bIsBIGBuilding = true; m_level = LEVEL_NONE; + +#ifdef FIX_BUGS + m_isFarAway = true; +#endif } CPlane::~CPlane() diff --git a/src/vehicles/Train.cpp b/src/vehicles/Train.cpp index 38bb1300..baf6bfb7 100644 --- a/src/vehicles/Train.cpp +++ b/src/vehicles/Train.cpp @@ -63,6 +63,10 @@ CTrain::CTrain(int32 id, uint8 CreatedBy) bUsesCollision = true; SetStatus(STATUS_TRAIN_MOVING); + +#ifdef FIX_BUGS + m_isFarAway = true; +#endif } void diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp index dbb15b5d..addbfc3d 100644 --- a/src/vehicles/Vehicle.cpp +++ b/src/vehicles/Vehicle.cpp @@ -59,6 +59,9 @@ CVehicle::CVehicle(uint8 CreatedBy) bIsLawEnforcer = false; bIsAmbulanceOnDuty = false; bIsFireTruckOnDuty = false; +#ifdef FIX_BUGS + bIsHandbrakeOn = false; +#endif CCarCtrl::UpdateCarCount(this, false); m_fHealth = 1000.0f; bEngineOn = true; |