diff options
author | Roman Masanin <36927roma@gmail.com> | 2020-11-08 14:23:05 +0100 |
---|---|---|
committer | Roman Masanin <36927roma@gmail.com> | 2020-11-08 14:23:05 +0100 |
commit | 23d23f646273db1a9b6f287110557d83d0a9c5c9 (patch) | |
tree | 53350895edf7e286180ca226bdef019db089fc5d /src/peds | |
parent | FORMAT (diff) | |
parent | Pickups fix (diff) | |
download | re3-23d23f646273db1a9b6f287110557d83d0a9c5c9.tar re3-23d23f646273db1a9b6f287110557d83d0a9c5c9.tar.gz re3-23d23f646273db1a9b6f287110557d83d0a9c5c9.tar.bz2 re3-23d23f646273db1a9b6f287110557d83d0a9c5c9.tar.lz re3-23d23f646273db1a9b6f287110557d83d0a9c5c9.tar.xz re3-23d23f646273db1a9b6f287110557d83d0a9c5c9.tar.zst re3-23d23f646273db1a9b6f287110557d83d0a9c5c9.zip |
Diffstat (limited to '')
-rw-r--r-- | src/peds/Ped.cpp | 16 | ||||
-rw-r--r-- | src/peds/Ped.h | 3 | ||||
-rw-r--r-- | src/peds/PedAttractor.cpp | 4 | ||||
-rw-r--r-- | src/peds/PlayerPed.cpp | 1 |
4 files changed, 20 insertions, 4 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index 03c0bf2c..3a04b196 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -522,7 +522,7 @@ CPed::CPed(uint32 pedType) : m_pedIK(this) m_delayedSoundID = -1; m_delayedSoundTimer = 0; CPopulation::UpdatePedCount((ePedType)m_nPedType, false); - m_lastComment = -1; + m_lastComment = UINT32_MAX; } // --MIAMI: Done @@ -21440,3 +21440,17 @@ CPed::SetLook(float direction) SetLookFlag(direction, false); } } + +// --MIAMI: Done +// Unused +void CPed::PedSetGetInCarPositionCB(CAnimBlendAssociation* assoc, void* arg) +{ + CPed* pPed = (CPed*)arg; + CMatrix mat(pPed->GetMatrix()); + CVehicle* pVehicle = pPed->m_pMyVehicle; + const CVector& offset = (pVehicle->bIsVan && (pPed->m_vehEnterType == CAR_DOOR_RR || pPed->m_vehEnterType == CAR_DOOR_LR)) ? vecPedVanRearDoorAnimOffset : vecPedCarDoorAnimOffset; + CVector position = Multiply3x3(mat, offset) + pPed->GetPosition(); + CPedPlacement::FindZCoorForPed(&position); + pPed->SetMoveSpeed(0.0f, 0.0f, 0.0f); + pPed->SetPosition(position); +} diff --git a/src/peds/Ped.h b/src/peds/Ped.h index 1f0e9243..6fc9ab67 100644 --- a/src/peds/Ped.h +++ b/src/peds/Ped.h @@ -646,7 +646,7 @@ public: uint16 m_lastQueuedSound; uint16 m_queuedSound; bool m_canTalk; - int32 m_lastComment; + uint32 m_lastComment; CVector m_vecSeekPosEx; // used for OBJECTIVE_GUARD_SPOT float m_distanceToCountSeekDoneEx; // used for OBJECTIVE_GUARD_SPOT @@ -911,6 +911,7 @@ public: static void DeleteSunbatheIdleAnimCB(CAnimBlendAssociation *assoc, void *arg); static void PedSetPreviousStateCB(CAnimBlendAssociation *assoc, void *arg); static void PedAnimShuffleCB(CAnimBlendAssociation *assoc, void *arg); + static void PedSetGetInCarPositionCB(CAnimBlendAssociation* assoc, void* arg); bool IsPlayer(void); bool IsFemale(void) { return m_nPedType == PEDTYPE_CIVFEMALE || m_nPedType == PEDTYPE_PROSTITUTE; } diff --git a/src/peds/PedAttractor.cpp b/src/peds/PedAttractor.cpp index 45bed947..05e72ed3 100644 --- a/src/peds/PedAttractor.cpp +++ b/src/peds/PedAttractor.cpp @@ -136,7 +136,7 @@ void CPedAttractorManager::RemoveIceCreamVanEffects(C2dEffect* pEffect) return; for (std::vector<CVehicleToEffect>::const_iterator assoc = vVehicleToEffect.cbegin(); assoc != vVehicleToEffect.cend();) { if (assoc->GetVehicle() != pVehicle) { - assoc++; + ++assoc; continue; } uint32 total = 0; @@ -145,7 +145,7 @@ void CPedAttractorManager::RemoveIceCreamVanEffects(C2dEffect* pEffect) total++; } if (total > 0) - assoc++; + ++assoc; else assoc = vVehicleToEffect.erase(assoc); } diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp index 1f53853f..24718b19 100644 --- a/src/peds/PlayerPed.cpp +++ b/src/peds/PlayerPed.cpp @@ -1055,6 +1055,7 @@ CPlayerPed::FindWeaponLockOnTarget(void) if (nextTarget) nextTarget->RegisterReference((CEntity**)&m_pPointGunAt); SetPointGunAt(nextTarget); + Say(SOUND_PED_AIMING); return true; } |