diff options
author | aap <aap@papnet.eu> | 2020-06-01 10:44:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-01 10:44:33 +0200 |
commit | 6d3e54369ce9ac826ab7c74da4be1c15d3ff3df0 (patch) | |
tree | 5f09d5f4358b1518262068d65ac713993b2cf437 /src/peds/Ped.cpp | |
parent | Merge branch 'miami' of https://github.com/GTAmodding/re3 into miami (diff) | |
parent | fix (diff) | |
download | re3-6d3e54369ce9ac826ab7c74da4be1c15d3ff3df0.tar re3-6d3e54369ce9ac826ab7c74da4be1c15d3ff3df0.tar.gz re3-6d3e54369ce9ac826ab7c74da4be1c15d3ff3df0.tar.bz2 re3-6d3e54369ce9ac826ab7c74da4be1c15d3ff3df0.tar.lz re3-6d3e54369ce9ac826ab7c74da4be1c15d3ff3df0.tar.xz re3-6d3e54369ce9ac826ab7c74da4be1c15d3ff3df0.tar.zst re3-6d3e54369ce9ac826ab7c74da4be1c15d3ff3df0.zip |
Diffstat (limited to 'src/peds/Ped.cpp')
-rw-r--r-- | src/peds/Ped.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index 687f9da1..406ac23f 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -60,6 +60,7 @@ #include "Streaming.h" #include "PedAttractor.h" #include "Debug.h" +#include "GameLogic.h" #define CAN_SEE_ENTITY_ANGLE_THRESHOLD DEGTORAD(60.0f) @@ -16228,6 +16229,12 @@ CPed::SetExitCar(CVehicle *veh, uint32 wantedDoorNode) return; } if (!someoneExitsFromOurExitDoor || m_nPedType == PEDTYPE_COP && veh->bIsBus) { +#if defined GTAVC_JP_PATCH || defined FIX_BUGS + if (veh->pDriver == this && !IsPlayer() && veh == CGameLogic::pShortCutTaxi) { + m_objective = OBJECTIVE_NONE; + return; + } +#endif // Again, unused... // CVector exitPos = GetPositionToOpenCarDoor(veh, optedDoorNode); bool thereIsRoom = veh->IsRoomForPedToLeaveCar(optedDoorNode, nil); @@ -18666,6 +18673,35 @@ CPed::CanBeDamagedByThisGangMember(CPed* who) return m_gangFlags & (1 << (uint8)(who->m_nPedType - PEDTYPE_GANG1)); } +void +CPed::Undress(const char* name) +{ + int mi = GetModelIndex(); + CAnimBlendAssociation* pAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_PHONE_OUT); + //if (pAnim) + // FinishTalkingOnMobileCB(pAnim, this); // TODO(MIAMI) + DeleteRwObject(); + if (m_nPedType == PEDTYPE_PLAYER1) + mi = MI_PLAYER; + CStreaming::RequestSpecialModel(mi, name, STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED); + CWorld::Remove(this); +} + +void +CPed::Dress(void) +{ + int mi = GetModelIndex(); + m_modelIndex = -1; + SetModelIndex(mi); + m_nPedState = PED_IDLE; + m_nLastPedState = PED_NONE; + m_objective = OBJECTIVE_NONE; + m_prevObjective = OBJECTIVE_NONE; + m_nWaitState = WAITSTATE_FALSE; + CWorld::Add(this); + m_headingRate = m_pedStats->m_headingChangeRate; +} + bool IsPedPointerValid_NotInWorld(CPed* pPed) { |