summaryrefslogtreecommitdiffstats
path: root/src/peds
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-06-01 10:44:33 +0200
committerGitHub <noreply@github.com>2020-06-01 10:44:33 +0200
commit6d3e54369ce9ac826ab7c74da4be1c15d3ff3df0 (patch)
tree5f09d5f4358b1518262068d65ac713993b2cf437 /src/peds
parentMerge branch 'miami' of https://github.com/GTAmodding/re3 into miami (diff)
parentfix (diff)
downloadre3-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')
-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 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)
{
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]; }