Merge pull request #701 from erorcun/miami

Peds objectives and wait states done, fixes
This commit is contained in:
erorcun 2020-09-10 03:21:23 +03:00 committed by GitHub
commit e9a7ab789d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 563 additions and 283 deletions

View File

@ -3773,7 +3773,7 @@ int8 CRunningScript::ProcessCommands100To199(int32 command)
CPed* pNearPed = ped->m_nearPeds[i]; CPed* pNearPed = ped->m_nearPeds[i];
if (pNearPed->m_leader == ped) { if (pNearPed->m_leader == ped) {
pNearPed->Teleport(pos); pNearPed->Teleport(pos);
pNearPed->PositionPedOutOfCollision(); // TODO(MIAMI): this is PositionAnyPedOutOfCollision!!! pNearPed->PositionAnyPedOutOfCollision();
} }
} }
} }

View File

@ -24,6 +24,7 @@ enum eEventType
EVENT_CAR_SET_ON_FIRE, EVENT_CAR_SET_ON_FIRE,
EVENT_ASSAULT_NASTYWEAPON, EVENT_ASSAULT_NASTYWEAPON,
EVENT_ASSAULT_NASTYWEAPON_POLICE, EVENT_ASSAULT_NASTYWEAPON_POLICE,
EVENT_UNK, // Not on SA it seems
EVENT_ICECREAM, EVENT_ICECREAM,
EVENT_ATM, EVENT_ATM,
EVENT_SHOPSTALL, EVENT_SHOPSTALL,

File diff suppressed because it is too large Load Diff

View File

@ -14,6 +14,7 @@
#define FEET_OFFSET 1.04f #define FEET_OFFSET 1.04f
#define CHECK_NEARBY_THINGS_MAX_DIST 15.0f #define CHECK_NEARBY_THINGS_MAX_DIST 15.0f
#define ENTER_CAR_MAX_DIST 30.0f
class CAccident; class CAccident;
class CObject; class CObject;
@ -459,8 +460,8 @@ public:
uint32 bHasAlreadyUsedAttractor : 1; uint32 bHasAlreadyUsedAttractor : 1;
uint32 b155_2 : 1; uint32 b155_2 : 1;
uint32 bCarPassenger : 1; uint32 bCarPassenger : 1;
uint32 b155_8 : 1; uint32 bFleeWhenStanding : 1;
uint32 b155_10 : 1; uint32 bGotUpOfMyOwnAccord : 1;
uint32 bMiamiViceCop : 1; uint32 bMiamiViceCop : 1;
uint32 bMoneyHasBeenGivenByScript : 1; // uint32 bMoneyHasBeenGivenByScript : 1; //
uint32 bHasBeenPhotographed : 1; // uint32 bHasBeenPhotographed : 1; //
@ -477,10 +478,10 @@ public:
uint32 bDontFight : 1; uint32 bDontFight : 1;
uint32 bDoomAim : 1; uint32 bDoomAim : 1;
uint32 bCanBeShotInVehicle : 1; uint32 bCanBeShotInVehicle : 1;
uint32 b157_8 : 1; uint32 bCanGiveUpSunbathing : 1;
uint32 bMakeFleeScream : 1; uint32 bMakeFleeScream : 1;
uint32 bPushedAlongByCar : 1; uint32 bPushedAlongByCar : 1;
uint32 b157_40 : 1; uint32 bRemoveMeWhenIGotIntoCar : 1;
uint32 bIgnoreThreatsBehindObjects : 1; uint32 bIgnoreThreatsBehindObjects : 1;
uint32 bNeverEverTargetThisPed : 1; uint32 bNeverEverTargetThisPed : 1;
@ -489,7 +490,7 @@ public:
uint32 b158_8 : 1; uint32 b158_8 : 1;
uint32 bCollectBusFare : 1; uint32 bCollectBusFare : 1;
uint32 bBoughtIceCream : 1; uint32 bBoughtIceCream : 1;
uint32 b158_40 : 1; uint32 bDonePositionOutOfCollision : 1;
uint32 b158_80 : 1; uint32 b158_80 : 1;
// our own flags // our own flags
@ -582,7 +583,7 @@ public:
float m_fleeFromPosY; float m_fleeFromPosY;
CEntity *m_fleeFrom; CEntity *m_fleeFrom;
uint32 m_fleeTimer; uint32 m_fleeTimer;
CEntity* pThreatEx; // TODO(Miami): What is this? CEntity* m_threatEx; // TODO(Miami): What is this?
CEntity* m_collidingEntityWhileFleeing; CEntity* m_collidingEntityWhileFleeing;
uint32 m_collidingThingTimer; uint32 m_collidingThingTimer;
CEntity *m_pCollidingEntity; CEntity *m_pCollidingEntity;
@ -833,6 +834,7 @@ public:
void ReactToPointGun(CEntity*); void ReactToPointGun(CEntity*);
void SeekCar(void); void SeekCar(void);
bool PositionPedOutOfCollision(void); bool PositionPedOutOfCollision(void);
bool PositionAnyPedOutOfCollision(void);
bool RunToReportCrime(eCrimeType); bool RunToReportCrime(eCrimeType);
bool PlacePedOnDryLand(void); bool PlacePedOnDryLand(void);
bool PossiblyFindBetterPosToSeekCar(CVector*, CVehicle*); bool PossiblyFindBetterPosToSeekCar(CVector*, CVehicle*);
@ -907,6 +909,9 @@ public:
static void RestoreHeadingRateCB(CAnimBlendAssociation *assoc, void *arg); static void RestoreHeadingRateCB(CAnimBlendAssociation *assoc, void *arg);
static void PedSetQuickDraggedOutCarPositionCB(CAnimBlendAssociation *assoc, void *arg); static void PedSetQuickDraggedOutCarPositionCB(CAnimBlendAssociation *assoc, void *arg);
static void PedSetDraggedOutCarPositionCB(CAnimBlendAssociation *assoc, void *arg); static void PedSetDraggedOutCarPositionCB(CAnimBlendAssociation *assoc, void *arg);
static void DeleteSunbatheIdleAnimCB(CAnimBlendAssociation *assoc, void *arg);
static void PedSetPreviousStateCB(CAnimBlendAssociation *assoc, void *arg);
static void PedAnimShuffleCB(CAnimBlendAssociation *assoc, void *arg);
bool IsPlayer(void); bool IsPlayer(void);
bool IsFemale(void) { return m_nPedType == PEDTYPE_CIVFEMALE || m_nPedType == PEDTYPE_PROSTITUTE; } bool IsFemale(void) { return m_nPedType == PEDTYPE_CIVFEMALE || m_nPedType == PEDTYPE_PROSTITUTE; }