summaryrefslogtreecommitdiffstats
path: root/src/peds
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-06-01 18:05:24 +0200
committeraap <aap@papnet.eu>2020-06-01 18:05:24 +0200
commit25273485d93dcb85e84f184d5e3e6d35a0944164 (patch)
tree1ebede77df503742ec1b7e441d64281cbf494523 /src/peds
parentgravity (diff)
parentMerge pull request #608 from Nick007J/miami (diff)
downloadre3-25273485d93dcb85e84f184d5e3e6d35a0944164.tar
re3-25273485d93dcb85e84f184d5e3e6d35a0944164.tar.gz
re3-25273485d93dcb85e84f184d5e3e6d35a0944164.tar.bz2
re3-25273485d93dcb85e84f184d5e3e6d35a0944164.tar.lz
re3-25273485d93dcb85e84f184d5e3e6d35a0944164.tar.xz
re3-25273485d93dcb85e84f184d5e3e6d35a0944164.tar.zst
re3-25273485d93dcb85e84f184d5e3e6d35a0944164.zip
Diffstat (limited to 'src/peds')
-rw-r--r--src/peds/Ped.cpp36
-rw-r--r--src/peds/Ped.h2
2 files changed, 38 insertions, 0 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index 47d72ed6..e60d702b 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);
@@ -18669,6 +18676,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)
{
diff --git a/src/peds/Ped.h b/src/peds/Ped.h
index 155e6cea..bbc5334b 100644
--- a/src/peds/Ped.h
+++ b/src/peds/Ped.h
@@ -916,6 +916,8 @@ public:
void SetNewAttraction(CPedAttractor* pAttractor, const CVector& pos, float, float, int);
void ClearWaitState(void);
+ void Undress(const char*);
+ void Dress(void);
bool HasWeaponSlot(uint8 slot) { return m_weapons[slot].m_eWeaponType != WEAPONTYPE_UNARMED; }
CWeapon& GetWeapon(uint8 slot) { return m_weapons[slot]; }