diff options
author | majestic <majesticcoding@gmail.com> | 2020-08-09 21:54:00 +0200 |
---|---|---|
committer | majestic <majesticcoding@gmail.com> | 2020-08-10 06:42:12 +0200 |
commit | 70029752f517dfe8c8837f7e6f94e6184c14cbfe (patch) | |
tree | b472c4a75ad4f162933bd6f4abd7106dd7adfdf8 /src/peds/Ped.cpp | |
parent | CWindModifiers (diff) | |
parent | drunk blur done (diff) | |
download | re3-70029752f517dfe8c8837f7e6f94e6184c14cbfe.tar re3-70029752f517dfe8c8837f7e6f94e6184c14cbfe.tar.gz re3-70029752f517dfe8c8837f7e6f94e6184c14cbfe.tar.bz2 re3-70029752f517dfe8c8837f7e6f94e6184c14cbfe.tar.lz re3-70029752f517dfe8c8837f7e6f94e6184c14cbfe.tar.xz re3-70029752f517dfe8c8837f7e6f94e6184c14cbfe.tar.zst re3-70029752f517dfe8c8837f7e6f94e6184c14cbfe.zip |
Diffstat (limited to 'src/peds/Ped.cpp')
-rw-r--r-- | src/peds/Ped.cpp | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index f6624c1f..a1c03024 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -64,6 +64,7 @@ #include "GameLogic.h" #include "Bike.h" #include "WindModifiers.h" +#include "CutsceneShadow.h" #define CAN_SEE_ENTITY_ANGLE_THRESHOLD DEGTORAD(60.0f) @@ -147,6 +148,9 @@ void CPed::operator delete(void *p, int handle) { CPools::GetPedPool()->Delete(( // --MIAMI: Done CPed::~CPed(void) { +#ifdef USE_CUTSCENE_SHADOW_FOR_PED + if ( m_pRTShadow ) delete m_pRTShadow; +#endif CWorld::Remove(this); if (m_attractor) GetPedAttractorManager()->DeRegisterPed(this, m_attractor); @@ -204,6 +208,9 @@ CPed::FlagToDestroyWhenNextProcessed(void) CPed::CPed(uint32 pedType) : m_pedIK(this) { +#ifdef USE_CUTSCENE_SHADOW_FOR_PED + m_pRTShadow = nil; +#endif m_type = ENTITY_TYPE_PED; bPedPhysics = true; bUseCollisionRecords = true; @@ -2782,12 +2789,16 @@ CPed::SetModelIndex(uint32 mi) // This is a mistake by R*, velocity is CVector, whereas m_vecAnimMoveDelta is CVector2D. (*RPANIMBLENDCLUMPDATA(m_rwObject))->velocity = (CVector*) &m_vecAnimMoveDelta; -#ifdef PED_SKIN if(modelInfo->GetHitColModel() == nil) modelInfo->CreateHitColModelSkinned(GetClump()); - if (IsClumpSkinned(GetClump())) // condition isn't there in VC - UpdateRpHAnim(); + UpdateRpHAnim(); +#ifdef USE_CUTSCENE_SHADOW_FOR_PED + if (!m_pRTShadow) + { + m_pRTShadow = new CCutsceneShadow; + m_pRTShadow->Create(m_rwObject, 10, 1, 1, 1); + } #endif } @@ -16421,16 +16432,16 @@ CPed::PreRender(void) && !CCullZones::PlayerNoRain() && GetPedState() != PED_DRIVING) bIsWindModifierTurnedOn = true; - bool bIsPlayerDrivingBikeOrOpenTopCar = false; + bool bIsPedDrivingBikeOrOpenTopCar = false; if (GetPedState() == PED_DRIVING && m_pMyVehicle) { if (m_pMyVehicle->m_vehType == VEHICLE_TYPE_BIKE || (m_pMyVehicle->m_vehType == VEHICLE_TYPE_CAR && m_pMyVehicle->IsOpenTopCar())) - bIsPlayerDrivingBikeOrOpenTopCar = true; + bIsPedDrivingBikeOrOpenTopCar = true; } - if (bIsWindModifierTurnedOn || bIsPlayerDrivingBikeOrOpenTopCar) { + if (bIsWindModifierTurnedOn || bIsPedDrivingBikeOrOpenTopCar) { float fWindMult = 0.0f; - if (bIsPlayerDrivingBikeOrOpenTopCar) { + if (bIsPedDrivingBikeOrOpenTopCar) { fWindMult = DotProduct(m_pMyVehicle->m_vecMoveSpeed, GetForward()); if (fWindMult > 0.4f) { float volume = (fWindMult - 0.4f) / 0.6f; |