2019-05-15 14:52:37 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Physical.h"
|
2019-05-29 16:06:33 +00:00
|
|
|
#include "Weapon.h"
|
2019-06-18 12:55:39 +00:00
|
|
|
#include "PedStats.h"
|
2019-06-20 11:22:44 +00:00
|
|
|
#include "PedIK.h"
|
2019-06-16 18:39:48 +00:00
|
|
|
#include "AnimManager.h"
|
2019-06-20 11:22:44 +00:00
|
|
|
#include "WeaponInfo.h"
|
2019-08-22 22:44:38 +00:00
|
|
|
#include "EventList.h"
|
2019-06-16 21:12:14 +00:00
|
|
|
|
2020-03-07 19:22:43 +00:00
|
|
|
#define FEET_OFFSET 1.04f
|
|
|
|
#define CHECK_NEARBY_THINGS_MAX_DIST 15.0f
|
|
|
|
|
2019-06-16 21:12:14 +00:00
|
|
|
struct CPathNode;
|
2019-09-16 17:32:58 +00:00
|
|
|
class CAccident;
|
2019-11-04 23:04:26 +00:00
|
|
|
class CObject;
|
2020-03-28 14:47:52 +00:00
|
|
|
class CFire;
|
|
|
|
struct AnimBlendFrameData;
|
|
|
|
class CAnimBlendAssociation;
|
|
|
|
enum eCrimeType;
|
2019-05-29 16:06:33 +00:00
|
|
|
|
2020-03-07 19:22:43 +00:00
|
|
|
struct PedAudioData
|
2019-07-28 17:39:39 +00:00
|
|
|
{
|
|
|
|
int m_nFixedDelayTime;
|
|
|
|
int m_nOverrideFixedDelayTime;
|
|
|
|
int m_nOverrideMaxRandomDelayTime;
|
|
|
|
int m_nMaxRandomDelayTime;
|
|
|
|
};
|
|
|
|
|
2019-10-06 21:39:25 +00:00
|
|
|
enum eFormation
|
|
|
|
{
|
2019-10-06 22:13:18 +00:00
|
|
|
FORMATION_UNDEFINED,
|
2019-10-06 21:39:25 +00:00
|
|
|
FORMATION_REAR,
|
|
|
|
FORMATION_REAR_LEFT,
|
|
|
|
FORMATION_REAR_RIGHT,
|
|
|
|
FORMATION_FRONT_LEFT,
|
|
|
|
FORMATION_FRONT_RIGHT,
|
|
|
|
FORMATION_LEFT,
|
|
|
|
FORMATION_RIGHT,
|
|
|
|
FORMATION_FRONT
|
|
|
|
};
|
|
|
|
|
2019-09-03 16:53:04 +00:00
|
|
|
enum FightState : int8 {
|
|
|
|
FIGHTSTATE_MOVE_FINISHED = -2,
|
|
|
|
FIGHTSTATE_JUST_ATTACKED,
|
|
|
|
FIGHTSTATE_NO_MOVE,
|
|
|
|
FIGHTSTATE_1
|
|
|
|
};
|
|
|
|
|
2019-08-05 13:07:10 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
ENDFIGHT_NORMAL,
|
|
|
|
ENDFIGHT_WITH_A_STEP,
|
|
|
|
ENDFIGHT_FAST
|
|
|
|
};
|
|
|
|
|
2019-08-12 22:30:31 +00:00
|
|
|
enum PedRouteType
|
|
|
|
{
|
|
|
|
PEDROUTE_STOP_WHEN_DONE = 1,
|
|
|
|
PEDROUTE_GO_BACKWARD_WHEN_DONE,
|
|
|
|
PEDROUTE_GO_TO_START_WHEN_DONE
|
|
|
|
};
|
|
|
|
|
2019-10-29 23:37:05 +00:00
|
|
|
enum FightMoveHitLevel
|
|
|
|
{
|
|
|
|
HITLEVEL_NULL,
|
|
|
|
HITLEVEL_GROUND,
|
|
|
|
HITLEVEL_LOW,
|
|
|
|
HITLEVEL_MEDIUM,
|
|
|
|
HITLEVEL_HIGH
|
|
|
|
};
|
|
|
|
|
2019-07-25 15:06:24 +00:00
|
|
|
struct FightMove
|
|
|
|
{
|
|
|
|
AnimationId animId;
|
|
|
|
float startFireTime;
|
|
|
|
float endFireTime;
|
|
|
|
float comboFollowOnTime;
|
|
|
|
float strikeRadius;
|
2019-10-29 23:37:05 +00:00
|
|
|
uint8 hitLevel; // FightMoveHitLevel
|
2019-07-25 15:06:24 +00:00
|
|
|
uint8 damage;
|
|
|
|
uint8 flags;
|
|
|
|
};
|
|
|
|
static_assert(sizeof(FightMove) == 0x18, "FightMove: error");
|
|
|
|
|
2020-03-07 19:22:43 +00:00
|
|
|
// TODO: This is eFightState on mobile.
|
2019-07-25 15:06:24 +00:00
|
|
|
enum PedFightMoves
|
|
|
|
{
|
|
|
|
FIGHTMOVE_NULL,
|
2019-07-28 17:39:39 +00:00
|
|
|
// Attacker
|
2019-07-25 15:06:24 +00:00
|
|
|
FIGHTMOVE_STDPUNCH,
|
|
|
|
FIGHTMOVE_IDLE,
|
|
|
|
FIGHTMOVE_SHUFFLE_F,
|
|
|
|
FIGHTMOVE_KNEE,
|
|
|
|
FIGHTMOVE_HEADBUTT,
|
|
|
|
FIGHTMOVE_PUNCHJAB,
|
|
|
|
FIGHTMOVE_PUNCHHOOK,
|
|
|
|
FIGHTMOVE_KICK,
|
|
|
|
FIGHTMOVE_LONGKICK,
|
|
|
|
FIGHTMOVE_ROUNDHOUSE,
|
|
|
|
FIGHTMOVE_BODYBLOW,
|
|
|
|
FIGHTMOVE_GROUNDKICK,
|
2019-07-28 17:39:39 +00:00
|
|
|
// Opponent
|
2019-07-25 15:06:24 +00:00
|
|
|
FIGHTMOVE_HITFRONT,
|
|
|
|
FIGHTMOVE_HITBACK,
|
|
|
|
FIGHTMOVE_HITRIGHT,
|
|
|
|
FIGHTMOVE_HITLEFT,
|
|
|
|
FIGHTMOVE_HITBODY,
|
|
|
|
FIGHTMOVE_HITCHEST,
|
|
|
|
FIGHTMOVE_HITHEAD,
|
|
|
|
FIGHTMOVE_HITBIGSTEP,
|
|
|
|
FIGHTMOVE_HITONFLOOR,
|
|
|
|
FIGHTMOVE_HITBEHIND,
|
2019-10-29 23:37:05 +00:00
|
|
|
FIGHTMOVE_IDLE2NORM,
|
|
|
|
NUM_FIGHTMOVES
|
2019-07-25 15:06:24 +00:00
|
|
|
};
|
|
|
|
|
2019-07-18 02:26:46 +00:00
|
|
|
enum ePedPieceTypes
|
|
|
|
{
|
2019-07-18 02:41:57 +00:00
|
|
|
PEDPIECE_TORSO,
|
|
|
|
PEDPIECE_MID,
|
2019-07-18 02:26:46 +00:00
|
|
|
PEDPIECE_LEFTARM,
|
|
|
|
PEDPIECE_RIGHTARM,
|
|
|
|
PEDPIECE_LEFTLEG,
|
|
|
|
PEDPIECE_RIGHTLEG,
|
|
|
|
PEDPIECE_HEAD,
|
|
|
|
};
|
|
|
|
|
2019-07-10 06:06:43 +00:00
|
|
|
enum eWaitState {
|
2019-07-05 22:44:49 +00:00
|
|
|
WAITSTATE_FALSE,
|
|
|
|
WAITSTATE_TRAFFIC_LIGHTS,
|
|
|
|
WAITSTATE_CROSS_ROAD,
|
|
|
|
WAITSTATE_CROSS_ROAD_LOOK,
|
|
|
|
WAITSTATE_LOOK_PED,
|
|
|
|
WAITSTATE_LOOK_SHOP,
|
|
|
|
WAITSTATE_LOOK_ACCIDENT,
|
|
|
|
WAITSTATE_FACEOFF_GANG,
|
|
|
|
WAITSTATE_DOUBLEBACK,
|
|
|
|
WAITSTATE_HITWALL,
|
|
|
|
WAITSTATE_TURN180,
|
|
|
|
WAITSTATE_SURPRISE,
|
|
|
|
WAITSTATE_STUCK,
|
|
|
|
WAITSTATE_LOOK_ABOUT,
|
|
|
|
WAITSTATE_PLAYANIM_DUCK,
|
|
|
|
WAITSTATE_PLAYANIM_COWER,
|
|
|
|
WAITSTATE_PLAYANIM_TAXI,
|
|
|
|
WAITSTATE_PLAYANIM_HANDSUP,
|
|
|
|
WAITSTATE_PLAYANIM_HANDSCOWER,
|
|
|
|
WAITSTATE_PLAYANIM_CHAT,
|
|
|
|
WAITSTATE_FINISH_FLEE
|
|
|
|
};
|
|
|
|
|
|
|
|
enum eObjective : uint32 {
|
2019-07-03 16:34:42 +00:00
|
|
|
OBJECTIVE_NONE,
|
|
|
|
OBJECTIVE_IDLE,
|
|
|
|
OBJECTIVE_FLEE_TILL_SAFE,
|
|
|
|
OBJECTIVE_GUARD_SPOT,
|
2019-09-26 21:01:50 +00:00
|
|
|
OBJECTIVE_GUARD_AREA, // not implemented
|
2019-07-03 16:34:42 +00:00
|
|
|
OBJECTIVE_WAIT_IN_CAR,
|
|
|
|
OBJECTIVE_WAIT_IN_CAR_THEN_GETOUT,
|
|
|
|
OBJECTIVE_KILL_CHAR_ON_FOOT,
|
|
|
|
OBJECTIVE_KILL_CHAR_ANY_MEANS,
|
|
|
|
OBJECTIVE_FLEE_CHAR_ON_FOOT_TILL_SAFE,
|
|
|
|
OBJECTIVE_FLEE_CHAR_ON_FOOT_ALWAYS,
|
|
|
|
OBJECTIVE_GOTO_CHAR_ON_FOOT,
|
|
|
|
OBJECTIVE_FOLLOW_PED_IN_FORMATION,
|
|
|
|
OBJECTIVE_LEAVE_VEHICLE,
|
|
|
|
OBJECTIVE_ENTER_CAR_AS_PASSENGER,
|
|
|
|
OBJECTIVE_ENTER_CAR_AS_DRIVER,
|
2019-09-26 21:01:50 +00:00
|
|
|
OBJECTIVE_FOLLOW_CAR_IN_CAR, // seems not implemented so far
|
|
|
|
OBJECTIVE_FIRE_AT_OBJ_FROM_VEHICLE, // not implemented
|
|
|
|
OBJECTIVE_DESTROY_OBJ, // not implemented
|
2019-07-03 16:34:42 +00:00
|
|
|
OBJECTIVE_DESTROY_CAR,
|
|
|
|
OBJECTIVE_GOTO_AREA_ANY_MEANS,
|
|
|
|
OBJECTIVE_GOTO_AREA_ON_FOOT,
|
|
|
|
OBJECTIVE_RUN_TO_AREA,
|
2019-09-26 21:01:50 +00:00
|
|
|
OBJECTIVE_23, // not implemented
|
|
|
|
OBJECTIVE_24, // not implemented
|
2019-07-03 16:34:42 +00:00
|
|
|
OBJECTIVE_FIGHT_CHAR,
|
|
|
|
OBJECTIVE_SET_LEADER,
|
|
|
|
OBJECTIVE_FOLLOW_ROUTE,
|
|
|
|
OBJECTIVE_SOLICIT,
|
|
|
|
OBJECTIVE_HAIL_TAXI,
|
|
|
|
OBJECTIVE_CATCH_TRAIN,
|
|
|
|
OBJECTIVE_BUY_ICE_CREAM,
|
|
|
|
OBJECTIVE_STEAL_ANY_CAR,
|
|
|
|
OBJECTIVE_MUG_CHAR,
|
|
|
|
OBJECTIVE_FLEE_CAR,
|
2019-09-26 21:01:50 +00:00
|
|
|
#ifdef VC_PED_PORTS
|
|
|
|
OBJECTIVE_LEAVE_CAR_AND_DIE
|
|
|
|
#endif
|
2019-07-03 16:34:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
2019-07-05 12:23:39 +00:00
|
|
|
RANDOM_CHAR = 1,
|
|
|
|
MISSION_CHAR,
|
2019-07-03 16:34:42 +00:00
|
|
|
};
|
|
|
|
|
2019-06-24 14:57:54 +00:00
|
|
|
enum PedLineUpPhase {
|
|
|
|
LINE_UP_TO_CAR_START,
|
|
|
|
LINE_UP_TO_CAR_END,
|
2019-09-16 17:32:58 +00:00
|
|
|
LINE_UP_TO_CAR_2 // Buggy. Used for cops arresting you from passenger door
|
2019-06-24 14:57:54 +00:00
|
|
|
};
|
|
|
|
|
2019-06-20 11:22:44 +00:00
|
|
|
enum PedOnGroundState {
|
|
|
|
NO_PED,
|
2019-08-05 13:07:10 +00:00
|
|
|
PED_IN_FRONT_OF_ATTACKER,
|
2019-06-20 11:22:44 +00:00
|
|
|
PED_ON_THE_FLOOR,
|
|
|
|
PED_DEAD_ON_THE_FLOOR
|
|
|
|
};
|
|
|
|
|
2020-03-02 00:03:39 +00:00
|
|
|
enum PointBlankNecessity : uint8 {
|
|
|
|
NO_POINT_BLANK_PED,
|
|
|
|
POINT_BLANK_FOR_WANTED_PED,
|
|
|
|
POINT_BLANK_FOR_SOMEONE_ELSE
|
|
|
|
};
|
|
|
|
|
2019-05-28 06:39:36 +00:00
|
|
|
enum PedState
|
2019-05-15 14:52:37 +00:00
|
|
|
{
|
2019-05-30 12:50:54 +00:00
|
|
|
PED_NONE,
|
2019-05-28 06:39:36 +00:00
|
|
|
PED_IDLE,
|
|
|
|
PED_LOOK_ENTITY,
|
|
|
|
PED_LOOK_HEADING,
|
|
|
|
PED_WANDER_RANGE,
|
|
|
|
PED_WANDER_PATH,
|
|
|
|
PED_SEEK_POS,
|
|
|
|
PED_SEEK_ENTITY,
|
|
|
|
PED_FLEE_POS,
|
|
|
|
PED_FLEE_ENTITY,
|
|
|
|
PED_PURSUE,
|
|
|
|
PED_FOLLOW_PATH,
|
|
|
|
PED_SNIPER_MODE,
|
|
|
|
PED_ROCKET_ODE,
|
|
|
|
PED_DUMMY,
|
|
|
|
PED_PAUSE,
|
|
|
|
PED_ATTACK,
|
|
|
|
PED_FIGHT,
|
|
|
|
PED_FACE_PHONE,
|
|
|
|
PED_MAKE_CALL,
|
|
|
|
PED_CHAT,
|
|
|
|
PED_MUG,
|
|
|
|
PED_AIM_GUN,
|
|
|
|
PED_AI_CONTROL,
|
|
|
|
PED_SEEK_CAR,
|
|
|
|
PED_SEEK_IN_BOAT,
|
|
|
|
PED_FOLLOW_ROUTE,
|
|
|
|
PED_CPR,
|
|
|
|
PED_SOLICIT,
|
|
|
|
PED_BUY_ICECREAM,
|
|
|
|
PED_INVESTIGATE,
|
|
|
|
PED_STEP_AWAY,
|
|
|
|
PED_ON_FIRE,
|
2019-05-30 12:50:54 +00:00
|
|
|
|
2019-12-02 20:02:32 +00:00
|
|
|
PED_UNKNOWN, // Same with IDLE, but also infects up to 5 peds with same pedType and WANDER_PATH, so they become stone too. HANG_OUT in Fire_Head's idb
|
2019-05-30 12:50:54 +00:00
|
|
|
|
|
|
|
PED_STATES_NO_AI,
|
2019-11-25 02:25:10 +00:00
|
|
|
|
|
|
|
// One of these states isn't on PS2 - start
|
2019-05-28 06:39:36 +00:00
|
|
|
PED_JUMP,
|
|
|
|
PED_FALL,
|
|
|
|
PED_GETUP,
|
|
|
|
PED_STAGGER,
|
|
|
|
PED_DIVE_AWAY,
|
2019-05-30 12:50:54 +00:00
|
|
|
|
2019-05-28 06:39:36 +00:00
|
|
|
PED_STATES_NO_ST,
|
|
|
|
PED_ENTER_TRAIN,
|
|
|
|
PED_EXIT_TRAIN,
|
|
|
|
PED_ARREST_PLAYER,
|
2019-11-25 02:25:10 +00:00
|
|
|
// One of these states isn't on PS2 - end
|
|
|
|
|
2019-05-28 06:39:36 +00:00
|
|
|
PED_DRIVING,
|
|
|
|
PED_PASSENGER,
|
|
|
|
PED_TAXI_PASSENGER,
|
|
|
|
PED_OPEN_DOOR,
|
2019-07-05 12:23:39 +00:00
|
|
|
PED_DIE,
|
|
|
|
PED_DEAD,
|
2019-05-28 06:39:36 +00:00
|
|
|
PED_CARJACK,
|
|
|
|
PED_DRAG_FROM_CAR,
|
|
|
|
PED_ENTER_CAR,
|
|
|
|
PED_STEAL_CAR,
|
|
|
|
PED_EXIT_CAR,
|
|
|
|
PED_HANDS_UP,
|
2019-07-05 12:23:39 +00:00
|
|
|
PED_ARRESTED,
|
2019-05-15 14:52:37 +00:00
|
|
|
};
|
|
|
|
|
2019-07-03 16:34:42 +00:00
|
|
|
enum eMoveState {
|
2019-05-29 16:06:33 +00:00
|
|
|
PEDMOVE_NONE,
|
|
|
|
PEDMOVE_STILL,
|
|
|
|
PEDMOVE_WALK,
|
|
|
|
PEDMOVE_RUN,
|
|
|
|
PEDMOVE_SPRINT,
|
|
|
|
};
|
|
|
|
|
2019-05-15 14:52:37 +00:00
|
|
|
class CVehicle;
|
|
|
|
|
|
|
|
class CPed : public CPhysical
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// 0x128
|
2019-05-19 19:28:10 +00:00
|
|
|
CStoredCollPoly m_collPoly;
|
|
|
|
float m_fCollisionSpeed;
|
2019-07-05 12:23:39 +00:00
|
|
|
|
|
|
|
// cf. https://github.com/DK22Pac/plugin-sdk/blob/master/plugin_sa/game_sa/CPed.h from R*
|
2019-06-28 16:19:00 +00:00
|
|
|
uint8 bIsStanding : 1;
|
2019-09-29 16:44:51 +00:00
|
|
|
uint8 m_ped_flagA2 : 1; // bWasStanding?
|
2019-09-03 16:53:04 +00:00
|
|
|
uint8 bIsAttacking : 1; // doesn't reset after fist fight
|
2019-06-24 14:57:54 +00:00
|
|
|
uint8 bIsPointingGunAt : 1;
|
2019-06-19 12:20:50 +00:00
|
|
|
uint8 bIsLooking : 1;
|
2019-08-22 22:44:38 +00:00
|
|
|
uint8 bKeepTryingToLook : 1; // if we can't look somewhere due to unreachable angles
|
2019-06-19 12:20:50 +00:00
|
|
|
uint8 bIsRestoringLook : 1;
|
|
|
|
uint8 bIsAimingGun : 1;
|
2019-06-30 21:50:40 +00:00
|
|
|
|
2019-06-19 12:20:50 +00:00
|
|
|
uint8 bIsRestoringGun : 1;
|
|
|
|
uint8 bCanPointGunAtTarget : 1;
|
2019-07-05 22:44:49 +00:00
|
|
|
uint8 bIsTalking : 1;
|
|
|
|
uint8 bIsInTheAir : 1;
|
|
|
|
uint8 bIsLanding : 1;
|
2019-09-03 16:53:04 +00:00
|
|
|
uint8 bIsRunning : 1; // on some conditions
|
|
|
|
uint8 bHitSomethingLastFrame : 1;
|
2019-10-26 15:41:04 +00:00
|
|
|
uint8 bVehEnterDoorIsBlocked : 1; // because someone else enters/exits from there
|
2019-06-30 21:50:40 +00:00
|
|
|
|
2019-10-26 15:41:04 +00:00
|
|
|
uint8 bCanPedEnterSeekedCar : 1;
|
2019-07-05 22:44:49 +00:00
|
|
|
uint8 bRespondsToThreats : 1;
|
2019-07-18 02:26:46 +00:00
|
|
|
uint8 bRenderPedInCar : 1;
|
|
|
|
uint8 bChangedSeat : 1;
|
2019-07-25 15:06:24 +00:00
|
|
|
uint8 bUpdateAnimHeading : 1;
|
2019-07-18 02:26:46 +00:00
|
|
|
uint8 bBodyPartJustCameOff : 1;
|
2019-12-31 23:35:54 +00:00
|
|
|
uint8 bIsShooting : 1;
|
2019-08-22 22:44:38 +00:00
|
|
|
uint8 bFindNewNodeAfterStateRestore : 1;
|
2019-06-30 21:50:40 +00:00
|
|
|
|
2019-09-13 19:04:55 +00:00
|
|
|
uint8 bHasACamera : 1; // does ped possess a camera to document accidents involves fire/explosion
|
2020-03-02 00:03:39 +00:00
|
|
|
uint8 bGonnaInvestigateEvent : 1;
|
2019-09-29 16:44:51 +00:00
|
|
|
uint8 bPedIsBleeding : 1;
|
|
|
|
uint8 bStopAndShoot : 1; // Ped cannot reach target to attack with fist, need to use gun
|
2019-07-18 02:26:46 +00:00
|
|
|
uint8 bIsPedDieAnimPlaying : 1;
|
2019-08-17 12:44:25 +00:00
|
|
|
uint8 bUsePedNodeSeek : 1;
|
2019-09-29 16:44:51 +00:00
|
|
|
uint8 bObjectiveCompleted : 1;
|
2019-07-25 20:34:29 +00:00
|
|
|
uint8 bScriptObjectiveCompleted : 1;
|
2019-06-30 21:50:40 +00:00
|
|
|
|
2019-07-25 15:06:24 +00:00
|
|
|
uint8 bKindaStayInSamePlace : 1;
|
2020-03-28 14:47:52 +00:00
|
|
|
uint8 bBeingChasedByPolice : 1; // Unused VC leftover. Should've been set for criminal/gang members
|
2019-07-05 22:44:49 +00:00
|
|
|
uint8 bNotAllowedToDuck : 1;
|
|
|
|
uint8 bCrouchWhenShooting : 1;
|
2019-09-03 16:53:04 +00:00
|
|
|
uint8 bIsDucking : 1;
|
2019-07-25 15:06:24 +00:00
|
|
|
uint8 bGetUpAnimStarted : 1;
|
2019-06-28 16:19:00 +00:00
|
|
|
uint8 bDoBloodyFootprints : 1;
|
2019-09-13 19:04:55 +00:00
|
|
|
uint8 bFleeAfterExitingCar : 1;
|
2019-06-30 21:50:40 +00:00
|
|
|
|
2019-09-03 16:53:04 +00:00
|
|
|
uint8 bWanderPathAfterExitingCar : 1;
|
2019-12-31 23:35:54 +00:00
|
|
|
uint8 bIsLeader : 1;
|
2020-01-03 16:48:13 +00:00
|
|
|
uint8 bDontDragMeOutCar : 1; // unfinished feature
|
2019-05-19 19:28:10 +00:00
|
|
|
uint8 m_ped_flagF8 : 1;
|
2019-08-01 22:04:30 +00:00
|
|
|
uint8 bWillBeQuickJacked : 1;
|
2019-09-05 19:59:44 +00:00
|
|
|
uint8 bCancelEnteringCar : 1; // after door is opened or couldn't be opened due to it's locked
|
2019-09-29 16:44:51 +00:00
|
|
|
uint8 bObstacleShowedUpDuringKillObjective : 1;
|
2019-08-01 22:04:30 +00:00
|
|
|
uint8 bDuckAndCover : 1;
|
2019-06-30 21:50:40 +00:00
|
|
|
|
2019-12-31 23:35:54 +00:00
|
|
|
uint8 bStillOnValidPoly : 1; // set if the polygon the ped is on is still valid for collision
|
|
|
|
uint8 bAllowMedicsToReviveMe : 1;
|
|
|
|
uint8 bResetWalkAnims : 1;
|
2019-09-03 16:53:04 +00:00
|
|
|
uint8 bStartWanderPathOnFoot : 1; // exits the car if he's in it, reset after path found
|
2019-10-03 01:02:02 +00:00
|
|
|
uint8 bOnBoat : 1; // not just driver, may be just standing
|
2019-09-12 12:35:05 +00:00
|
|
|
uint8 bBusJacked : 1;
|
2020-03-07 19:22:43 +00:00
|
|
|
uint8 bGonnaKillTheCarJacker : 1; // only set when car is jacked from right door and when arrested by police
|
2019-09-03 16:53:04 +00:00
|
|
|
uint8 bFadeOut : 1;
|
2019-06-30 21:50:40 +00:00
|
|
|
|
2020-03-02 00:03:39 +00:00
|
|
|
uint8 bKnockedUpIntoAir : 1; // has ped been knocked up into the air by a car collision
|
2019-10-03 01:02:02 +00:00
|
|
|
uint8 bHitSteepSlope : 1; // has ped collided/is standing on a steep slope (surface type)
|
2019-12-31 23:35:54 +00:00
|
|
|
uint8 bCullExtraFarAway : 1; // special ped only gets culled if it's extra far away (for roadblocks)
|
2019-07-25 15:06:24 +00:00
|
|
|
uint8 bClearObjective : 1;
|
2019-12-31 23:35:54 +00:00
|
|
|
uint8 bTryingToReachDryLand : 1; // has ped just exited boat and trying to get to dry land
|
2019-09-12 12:35:05 +00:00
|
|
|
uint8 bCollidedWithMyVehicle : 1;
|
2019-12-31 23:35:54 +00:00
|
|
|
uint8 bRichFromMugging : 1; // ped has lots of cash cause they've been mugging people
|
|
|
|
uint8 bChrisCriminal : 1; // Is a criminal as killed during Chris' police mission (should be counted as such)
|
2019-06-30 21:50:40 +00:00
|
|
|
|
2019-08-17 12:44:25 +00:00
|
|
|
uint8 bShakeFist : 1; // test shake hand at look entity
|
2019-07-25 15:06:24 +00:00
|
|
|
uint8 bNoCriticalHits : 1; // if set, limbs won't came off
|
2020-03-02 00:03:39 +00:00
|
|
|
uint8 bVehExitWillBeInstant : 1;
|
2019-07-09 07:57:44 +00:00
|
|
|
uint8 bHasAlreadyBeenRecorded : 1;
|
2019-08-22 22:44:38 +00:00
|
|
|
uint8 bFallenDown : 1;
|
2019-10-05 18:50:02 +00:00
|
|
|
#ifdef VC_PED_PORTS
|
2020-03-02 00:03:39 +00:00
|
|
|
uint8 bSomeVCflag1 : 1;
|
2019-10-05 18:50:02 +00:00
|
|
|
#else
|
2019-05-19 19:28:10 +00:00
|
|
|
uint8 m_ped_flagI20 : 1;
|
2019-10-05 18:50:02 +00:00
|
|
|
#endif
|
2019-11-25 02:25:10 +00:00
|
|
|
uint8 m_ped_flagI40 : 1; // bMakePedsRunToPhonesToReportCrimes makes use of this as runover by car indicator
|
|
|
|
uint8 m_ped_flagI80 : 1; // KANGAROO_CHEAT define makes use of this as cheat toggle
|
2019-07-05 12:23:39 +00:00
|
|
|
|
2019-06-30 10:59:55 +00:00
|
|
|
uint8 stuff10[3];
|
2019-07-05 12:23:39 +00:00
|
|
|
uint8 CharCreatedBy;
|
2019-06-30 21:50:40 +00:00
|
|
|
uint8 field_161;
|
|
|
|
uint8 pad_162[2];
|
2019-07-03 16:34:42 +00:00
|
|
|
eObjective m_objective;
|
|
|
|
eObjective m_prevObjective;
|
|
|
|
CPed *m_pedInObjective;
|
|
|
|
CVehicle *m_carInObjective;
|
2019-08-12 22:30:31 +00:00
|
|
|
CVector m_nextRoutePointPos;
|
2019-07-03 16:34:42 +00:00
|
|
|
CPed *m_leader;
|
2019-10-06 21:39:25 +00:00
|
|
|
eFormation m_pedFormation;
|
2019-06-30 21:50:40 +00:00
|
|
|
uint32 m_fearFlags;
|
|
|
|
CEntity *m_threatEntity;
|
2019-07-29 12:01:44 +00:00
|
|
|
CVector2D m_eventOrThreat;
|
2019-06-30 21:50:40 +00:00
|
|
|
uint32 m_eventType;
|
|
|
|
CEntity* m_pEventEntity;
|
2019-06-15 15:53:25 +00:00
|
|
|
float m_fAngleToEvent;
|
2019-06-14 14:14:22 +00:00
|
|
|
AnimBlendFrameData *m_pFrames[PED_NODE_MAX];
|
2019-06-24 14:57:54 +00:00
|
|
|
AssocGroupId m_animGroup;
|
|
|
|
CAnimBlendAssociation *m_pVehicleAnim;
|
2019-06-14 12:33:08 +00:00
|
|
|
CVector2D m_vecAnimMoveDelta;
|
|
|
|
CVector m_vecOffsetSeek;
|
|
|
|
CPedIK m_pedIK;
|
2019-06-30 21:50:40 +00:00
|
|
|
float m_actionX;
|
|
|
|
float m_actionY;
|
2019-06-16 18:39:48 +00:00
|
|
|
uint32 m_nPedStateTimer;
|
2019-06-20 11:22:44 +00:00
|
|
|
PedState m_nPedState;
|
2019-06-24 14:57:54 +00:00
|
|
|
PedState m_nLastPedState;
|
2019-07-03 16:34:42 +00:00
|
|
|
eMoveState m_nMoveState;
|
2019-07-25 15:06:24 +00:00
|
|
|
int32 m_nStoredMoveState;
|
|
|
|
int32 m_nPrevMoveState;
|
2019-07-05 22:44:49 +00:00
|
|
|
eWaitState m_nWaitState;
|
2019-06-30 21:50:40 +00:00
|
|
|
uint32 m_nWaitTimer;
|
2019-11-25 02:25:10 +00:00
|
|
|
void *m_pPathNodesStates[8]; // unused, probably leftover from VC
|
2019-06-30 21:50:40 +00:00
|
|
|
CVector2D m_stPathNodeStates[10];
|
2019-06-14 23:34:19 +00:00
|
|
|
uint16 m_nPathNodes;
|
2019-07-10 06:06:43 +00:00
|
|
|
int16 m_nCurPathNode;
|
2019-11-19 22:15:45 +00:00
|
|
|
int8 m_nPathDir;
|
2019-06-14 23:34:19 +00:00
|
|
|
private:
|
|
|
|
int8 _pad2B5[3];
|
|
|
|
public:
|
|
|
|
CPathNode *m_pLastPathNode;
|
2019-08-10 15:15:22 +00:00
|
|
|
CPathNode *m_pNextPathNode;
|
2019-06-16 22:16:38 +00:00
|
|
|
float m_fHealth;
|
|
|
|
float m_fArmour;
|
2019-06-30 21:50:40 +00:00
|
|
|
int16 m_routeLastPoint;
|
2019-08-12 22:30:31 +00:00
|
|
|
uint16 m_routeStartPoint;
|
|
|
|
int16 m_routePointsPassed;
|
2019-10-06 21:39:25 +00:00
|
|
|
int16 m_routeType; // See PedRouteType
|
2019-08-12 22:30:31 +00:00
|
|
|
int16 m_routePointsBeingPassed;
|
2019-06-30 21:50:40 +00:00
|
|
|
uint16 field_2D2;
|
2019-07-03 16:34:42 +00:00
|
|
|
CVector2D m_moved;
|
2019-06-17 09:48:42 +00:00
|
|
|
float m_fRotationCur;
|
|
|
|
float m_fRotationDest;
|
2019-07-01 16:26:46 +00:00
|
|
|
float m_headingRate;
|
2019-07-29 17:18:03 +00:00
|
|
|
uint16 m_vehEnterType; // TODO: this is more like a door, not a type
|
2019-09-29 16:44:51 +00:00
|
|
|
int16 m_walkAroundType;
|
2019-11-04 23:04:26 +00:00
|
|
|
CPhysical *m_pCurrentPhysSurface;
|
2019-05-15 14:52:37 +00:00
|
|
|
CVector m_vecOffsetFromPhysSurface;
|
|
|
|
CEntity *m_pCurSurface;
|
2019-08-10 15:15:22 +00:00
|
|
|
CVector m_vecSeekPos;
|
2019-06-27 12:01:55 +00:00
|
|
|
CEntity *m_pSeekTarget;
|
2019-05-15 14:52:37 +00:00
|
|
|
CVehicle *m_pMyVehicle;
|
2019-06-16 22:16:38 +00:00
|
|
|
bool bInVehicle;
|
2019-06-30 21:50:40 +00:00
|
|
|
uint8 pad_315[3];
|
2019-08-10 15:15:22 +00:00
|
|
|
float m_distanceToCountSeekDone;
|
2019-07-29 12:01:44 +00:00
|
|
|
bool bRunningToPhone;
|
2019-06-30 21:50:40 +00:00
|
|
|
uint8 field_31D;
|
|
|
|
int16 m_phoneId;
|
2019-09-16 17:32:58 +00:00
|
|
|
eCrimeType m_crimeToReportOnPhone;
|
2019-06-30 21:50:40 +00:00
|
|
|
uint32 m_phoneTalkTimer;
|
2019-09-16 17:32:58 +00:00
|
|
|
CAccident *m_lastAccident;
|
2020-02-16 02:15:58 +00:00
|
|
|
uint32 m_nPedType;
|
2019-06-19 16:35:51 +00:00
|
|
|
CPedStats *m_pedStats;
|
2019-06-30 21:50:40 +00:00
|
|
|
float m_fleeFromPosX;
|
|
|
|
float m_fleeFromPosY;
|
|
|
|
CEntity *m_fleeFrom;
|
|
|
|
uint32 m_fleeTimer;
|
2019-08-10 15:15:22 +00:00
|
|
|
CEntity* m_collidingEntityWhileFleeing;
|
|
|
|
uint32 m_collidingThingTimer;
|
2019-05-19 19:28:10 +00:00
|
|
|
CEntity *m_pCollidingEntity;
|
2019-06-30 21:50:40 +00:00
|
|
|
uint8 m_stateUnused;
|
|
|
|
uint8 pad_351[3];
|
|
|
|
uint32 m_timerUnused;
|
2019-10-06 21:39:25 +00:00
|
|
|
CVector2D *m_wanderRangeBounds; // array with 2 CVector2D (actually unused CRange2D class) - unused
|
2019-07-04 20:31:21 +00:00
|
|
|
CWeapon m_weapons[WEAPONTYPE_TOTAL_INVENTORY_WEAPONS];
|
2019-06-24 14:57:54 +00:00
|
|
|
eWeaponType m_storedWeapon;
|
2019-06-21 18:16:51 +00:00
|
|
|
uint8 m_currentWeapon; // eWeaponType
|
|
|
|
uint8 m_maxWeaponTypeAllowed; // eWeaponType
|
2019-06-30 21:50:40 +00:00
|
|
|
uint8 m_wepSkills;
|
|
|
|
uint8 m_wepAccuracy;
|
|
|
|
CEntity *m_pPointGunAt;
|
2019-06-14 12:33:08 +00:00
|
|
|
CVector m_vecHitLastPos;
|
2020-03-02 00:03:39 +00:00
|
|
|
uint32 m_lastFightMove;
|
2019-07-25 15:06:24 +00:00
|
|
|
uint8 m_fightButtonPressure;
|
2019-09-03 16:53:04 +00:00
|
|
|
FightState m_fightState;
|
2019-08-05 13:07:10 +00:00
|
|
|
bool m_takeAStepAfterAttack;
|
2019-07-25 15:06:24 +00:00
|
|
|
uint8 pad_4B3;
|
2019-07-29 12:01:44 +00:00
|
|
|
CFire *m_pFire;
|
2019-06-19 12:06:13 +00:00
|
|
|
CEntity *m_pLookTarget;
|
2019-06-14 12:33:08 +00:00
|
|
|
float m_fLookDirection;
|
|
|
|
int32 m_wepModelID;
|
2019-06-15 15:53:25 +00:00
|
|
|
uint32 m_leaveCarTimer;
|
|
|
|
uint32 m_getUpTimer;
|
|
|
|
uint32 m_lookTimer;
|
2019-06-18 12:34:27 +00:00
|
|
|
uint32 m_standardTimer;
|
|
|
|
uint32 m_attackTimer;
|
2019-09-03 16:53:04 +00:00
|
|
|
uint32 m_shootTimer; // shooting is a part of attack
|
2019-06-21 18:16:51 +00:00
|
|
|
uint32 m_hitRecoverTimer;
|
2019-07-03 16:34:42 +00:00
|
|
|
uint32 m_objectiveTimer;
|
2019-06-21 18:16:51 +00:00
|
|
|
uint32 m_duckTimer;
|
2019-08-01 22:04:30 +00:00
|
|
|
uint32 m_duckAndCoverTimer;
|
2020-03-07 19:22:43 +00:00
|
|
|
uint32 m_bloodyFootprintCountOrDeathTime; // Death time when bDoBloodyFootprints is false. Weird decision
|
2019-07-29 12:01:44 +00:00
|
|
|
uint8 m_panicCounter;
|
2019-09-03 16:53:04 +00:00
|
|
|
bool m_deadBleeding;
|
2019-10-13 04:05:08 +00:00
|
|
|
int8 m_bodyPartBleeding; // PedNode, but -1 if there isn't
|
2019-06-16 18:39:48 +00:00
|
|
|
uint8 m_field_4F3;
|
|
|
|
CPed *m_nearPeds[10];
|
2019-06-20 11:22:44 +00:00
|
|
|
uint16 m_numNearPeds;
|
2019-06-30 21:50:40 +00:00
|
|
|
int8 m_lastWepDam;
|
|
|
|
uint8 pad_51F;
|
2019-07-29 12:01:44 +00:00
|
|
|
uint32 m_lastSoundStart;
|
|
|
|
uint32 m_soundStart;
|
2019-07-28 17:39:39 +00:00
|
|
|
uint16 m_lastQueuedSound;
|
|
|
|
uint16 m_queuedSound;
|
2019-11-09 15:17:54 +00:00
|
|
|
CVector m_vecSeekPosEx; // used for OBJECTIVE_GUARD_SPOT
|
|
|
|
float m_distanceToCountSeekDoneEx; // used for OBJECTIVE_GUARD_SPOT
|
2019-05-15 14:52:37 +00:00
|
|
|
|
2019-06-02 15:13:56 +00:00
|
|
|
static void *operator new(size_t);
|
2019-06-30 10:59:55 +00:00
|
|
|
static void *operator new(size_t, int);
|
2019-06-02 15:13:56 +00:00
|
|
|
static void operator delete(void*, size_t);
|
2019-06-30 13:20:11 +00:00
|
|
|
static void operator delete(void*, int);
|
2019-05-19 19:28:10 +00:00
|
|
|
|
2019-06-30 21:50:40 +00:00
|
|
|
CPed(uint32 pedType);
|
2019-07-08 06:46:42 +00:00
|
|
|
~CPed(void);
|
|
|
|
|
|
|
|
void SetModelIndex(uint32 mi);
|
|
|
|
void ProcessControl(void);
|
|
|
|
void Teleport(CVector);
|
|
|
|
void PreRender(void);
|
|
|
|
void Render(void);
|
|
|
|
bool SetupLighting(void);
|
|
|
|
void RemoveLighting(bool);
|
|
|
|
void FlagToDestroyWhenNextProcessed(void);
|
|
|
|
int32 ProcessEntityCollision(CEntity*, CColPoint*);
|
2019-06-30 21:50:40 +00:00
|
|
|
|
2019-07-08 06:46:42 +00:00
|
|
|
virtual void SetMoveAnim(void);
|
2019-06-30 10:59:55 +00:00
|
|
|
|
2019-06-14 12:33:08 +00:00
|
|
|
void AddWeaponModel(int id);
|
2019-06-20 11:22:44 +00:00
|
|
|
void AimGun(void);
|
2019-05-19 19:28:10 +00:00
|
|
|
void KillPedWithCar(CVehicle *veh, float impulse);
|
2019-06-16 21:12:14 +00:00
|
|
|
void Say(uint16 audio);
|
2020-02-12 23:33:21 +00:00
|
|
|
void SetLookFlag(CEntity *target, bool keepTryingToLook);
|
|
|
|
void SetLookFlag(float direction, bool keepTryingToLook);
|
2019-06-16 18:39:48 +00:00
|
|
|
void SetLookTimer(int time);
|
2019-06-15 15:53:25 +00:00
|
|
|
void SetDie(AnimationId anim, float arg1, float arg2);
|
2019-07-09 16:50:35 +00:00
|
|
|
void SetDead(void);
|
2019-06-15 15:53:25 +00:00
|
|
|
void ApplyHeadShot(eWeaponType weaponType, CVector pos, bool evenOnPlayer);
|
2019-07-18 02:26:46 +00:00
|
|
|
void RemoveBodyPart(PedNode nodeId, int8 direction);
|
2019-06-19 12:06:13 +00:00
|
|
|
bool OurPedCanSeeThisOne(CEntity *target);
|
2019-06-17 09:48:42 +00:00
|
|
|
void Avoid(void);
|
2019-06-20 11:22:44 +00:00
|
|
|
void Attack(void);
|
|
|
|
void ClearAimFlag(void);
|
|
|
|
void ClearLookFlag(void);
|
|
|
|
void RestorePreviousState(void);
|
|
|
|
void ClearAttack(void);
|
|
|
|
bool IsPedHeadAbovePos(float zOffset);
|
2019-06-21 18:16:51 +00:00
|
|
|
void RemoveWeaponModel(int modelId);
|
2019-07-01 16:26:46 +00:00
|
|
|
void SetCurrentWeapon(uint32 weaponType);
|
2019-06-21 18:16:51 +00:00
|
|
|
void Duck(void);
|
|
|
|
void ClearDuck(void);
|
|
|
|
void ClearPointGunAt(void);
|
2019-06-24 14:57:54 +00:00
|
|
|
void BeingDraggedFromCar(void);
|
|
|
|
void RestartNonPartialAnims(void);
|
|
|
|
void LineUpPedWithCar(PedLineUpPhase phase);
|
|
|
|
void SetPedPositionInCar(void);
|
2019-06-28 16:19:00 +00:00
|
|
|
void PlayFootSteps(void);
|
2019-06-30 10:59:55 +00:00
|
|
|
void QuitEnteringCar(void);
|
2019-06-30 21:50:40 +00:00
|
|
|
void BuildPedLists(void);
|
2019-07-01 19:46:44 +00:00
|
|
|
uint32 GiveWeapon(eWeaponType weaponType, uint32 ammo);
|
2019-07-03 16:34:42 +00:00
|
|
|
void CalculateNewOrientation(void);
|
|
|
|
float WorkOutHeadingForMovingFirstPerson(float);
|
|
|
|
void CalculateNewVelocity(void);
|
|
|
|
bool CanSeeEntity(CEntity*, float);
|
|
|
|
void RestorePreviousObjective(void);
|
2019-07-05 22:44:49 +00:00
|
|
|
void SetIdle(void);
|
2019-07-03 16:34:42 +00:00
|
|
|
void SetObjective(eObjective, void*);
|
2019-07-05 22:44:49 +00:00
|
|
|
void SetObjective(eObjective);
|
|
|
|
void SetObjective(eObjective, int16, int16);
|
2019-10-12 19:00:31 +00:00
|
|
|
void SetObjective(eObjective, CVector);
|
|
|
|
void SetObjective(eObjective, CVector, float);
|
2019-07-05 22:44:49 +00:00
|
|
|
void ClearChat(void);
|
|
|
|
void InformMyGangOfAttack(CEntity*);
|
|
|
|
void ReactToAttack(CEntity*);
|
|
|
|
void SetDuck(uint32);
|
|
|
|
void RegisterThreatWithGangPeds(CEntity*);
|
|
|
|
bool TurnBody(void);
|
|
|
|
void Chat(void);
|
2019-07-10 06:06:43 +00:00
|
|
|
void CheckAroundForPossibleCollisions(void);
|
2019-07-15 12:11:40 +00:00
|
|
|
void SetSeek(CVector, float);
|
2019-08-01 22:04:30 +00:00
|
|
|
void SetSeek(CEntity*, float);
|
2019-07-15 12:11:40 +00:00
|
|
|
bool MakePhonecall(void);
|
|
|
|
bool FacePhone(void);
|
|
|
|
CPed *CheckForDeadPeds(void);
|
|
|
|
bool CheckForExplosions(CVector2D &area);
|
|
|
|
CPed *CheckForGunShots(void);
|
2020-03-02 00:03:39 +00:00
|
|
|
PointBlankNecessity CheckForPointBlankPeds(CPed*);
|
2019-07-15 12:11:40 +00:00
|
|
|
bool CheckIfInTheAir(void);
|
|
|
|
void ClearAll(void);
|
|
|
|
void SetPointGunAt(CEntity*);
|
2019-07-16 16:31:18 +00:00
|
|
|
bool Seek(void);
|
2019-07-20 21:29:58 +00:00
|
|
|
bool SetWanderPath(int8);
|
2019-10-13 21:33:18 +00:00
|
|
|
bool SetFollowPath(CVector);
|
2019-07-18 02:26:46 +00:00
|
|
|
void ClearAttackByRemovingAnim(void);
|
|
|
|
void SetStoredState(void);
|
|
|
|
void StopNonPartialAnims(void);
|
|
|
|
bool InflictDamage(CEntity*, eWeaponType, float, ePedPieceTypes, uint8);
|
|
|
|
void ClearFlee(void);
|
|
|
|
void ClearFall(void);
|
|
|
|
void SetGetUp(void);
|
2019-07-20 21:29:58 +00:00
|
|
|
void ClearInvestigateEvent(void);
|
|
|
|
void ClearLeader(void);
|
|
|
|
void ClearLook(void);
|
|
|
|
void ClearObjective(void);
|
|
|
|
void ClearPause(void);
|
|
|
|
void ClearSeek(void);
|
|
|
|
void ClearWeapons(void);
|
|
|
|
void RestoreGunPosition(void);
|
|
|
|
void RestoreHeadingRate(void);
|
|
|
|
void SetAimFlag(CEntity* to);
|
|
|
|
void SetAimFlag(float angle);
|
|
|
|
void SetAmmo(eWeaponType weaponType, uint32 ammo);
|
|
|
|
void SetEvasiveStep(CEntity*, uint8);
|
2019-07-25 20:34:29 +00:00
|
|
|
void GrantAmmo(eWeaponType, uint32);
|
2019-07-25 15:06:24 +00:00
|
|
|
void SetEvasiveDive(CPhysical*, uint8);
|
|
|
|
void SetAttack(CEntity*);
|
|
|
|
void StartFightAttack(uint8);
|
|
|
|
void SetWaitState(eWaitState, void*);
|
|
|
|
bool FightStrike(CVector&);
|
2019-08-16 18:17:15 +00:00
|
|
|
int GetLocalDirection(const CVector2D &);
|
2019-07-25 15:06:24 +00:00
|
|
|
void StartFightDefend(uint8, uint8, uint8);
|
|
|
|
void PlayHitSound(CPed*);
|
|
|
|
void SetFall(int, AnimationId, uint8);
|
2019-07-28 17:39:39 +00:00
|
|
|
void SetFlee(CEntity*, int);
|
2019-08-16 16:25:02 +00:00
|
|
|
void SetFlee(CVector2D const &, int);
|
2019-07-29 12:01:44 +00:00
|
|
|
void RemoveInCarAnims(void);
|
|
|
|
void CollideWithPed(CPed*);
|
|
|
|
void SetDirectionToWalkAroundObject(CEntity*);
|
2019-08-01 22:04:30 +00:00
|
|
|
void CreateDeadPedMoney(void);
|
|
|
|
void CreateDeadPedWeaponPickups(void);
|
|
|
|
void SetAttackTimer(uint32);
|
|
|
|
void SetBeingDraggedFromCar(CVehicle*, uint32, bool);
|
|
|
|
void SetRadioStation(void);
|
|
|
|
void SetBuyIceCream(void);
|
|
|
|
void SetChat(CEntity*, uint32);
|
|
|
|
void DeadPedMakesTyresBloody(void);
|
|
|
|
void MakeTyresMuddySectorList(CPtrList&);
|
|
|
|
uint8 DoesLOSBulletHitPed(CColPoint &point);
|
|
|
|
bool DuckAndCover(void);
|
2019-08-03 17:14:45 +00:00
|
|
|
void EndFight(uint8);
|
2019-08-05 13:07:10 +00:00
|
|
|
void EnterCar(void);
|
|
|
|
uint8 GetNearestTrainPedPosition(CVehicle*, CVector&);
|
|
|
|
uint8 GetNearestTrainDoor(CVehicle*, CVector&);
|
|
|
|
void LineUpPedWithTrain(void);
|
|
|
|
void ExitCar(void);
|
|
|
|
void Fight(void);
|
2019-08-22 22:44:38 +00:00
|
|
|
bool FindBestCoordsFromNodes(CVector, CVector*);
|
2019-08-08 00:21:38 +00:00
|
|
|
void Wait(void);
|
|
|
|
void ProcessObjective(void);
|
2019-08-10 15:15:22 +00:00
|
|
|
bool SeekFollowingPath(CVector*);
|
|
|
|
void Flee(void);
|
|
|
|
void FollowPath(void);
|
|
|
|
CVector GetFormationPosition(void);
|
|
|
|
void GetNearestDoor(CVehicle*, CVector&);
|
2019-08-12 22:30:31 +00:00
|
|
|
bool GetNearestPassengerDoor(CVehicle*, CVector&);
|
|
|
|
int GetNextPointOnRoute(void);
|
|
|
|
uint8 GetPedRadioCategory(uint32);
|
|
|
|
int GetWeaponSlot(eWeaponType);
|
|
|
|
void GoToNearestDoor(CVehicle*);
|
2019-08-22 22:44:38 +00:00
|
|
|
bool HaveReachedNextPointOnRoute(float);
|
2019-08-12 22:30:31 +00:00
|
|
|
void Idle(void);
|
|
|
|
void InTheAir(void);
|
|
|
|
void SetLanding(void);
|
2019-08-17 19:03:57 +00:00
|
|
|
void InvestigateEvent(void);
|
|
|
|
bool IsPedDoingDriveByShooting(void);
|
|
|
|
bool IsRoomToBeCarJacked(void);
|
2019-08-22 22:44:38 +00:00
|
|
|
void SetInvestigateEvent(eEventType, CVector2D, float, uint16, float);
|
|
|
|
bool LookForInterestingNodes(void);
|
|
|
|
void LookForSexyCars(void);
|
|
|
|
void LookForSexyPeds(void);
|
|
|
|
void Mug(void);
|
|
|
|
void MoveHeadToLook(void);
|
|
|
|
void Pause(void);
|
2019-09-03 16:53:04 +00:00
|
|
|
void ProcessBuoyancy(void);
|
|
|
|
void ServiceTalking(void);
|
|
|
|
void SetJump(void);
|
|
|
|
void WanderPath(void);
|
|
|
|
void ReactToPointGun(CEntity*);
|
|
|
|
void SeekCar(void);
|
2019-09-13 19:04:55 +00:00
|
|
|
bool PositionPedOutOfCollision(void);
|
2019-09-16 17:32:58 +00:00
|
|
|
bool RunToReportCrime(eCrimeType);
|
|
|
|
bool PlacePedOnDryLand(void);
|
2019-09-20 19:40:33 +00:00
|
|
|
bool PossiblyFindBetterPosToSeekCar(CVector*, CVehicle*);
|
2019-09-26 21:01:50 +00:00
|
|
|
void UpdateFromLeader(void);
|
2019-10-24 23:25:11 +00:00
|
|
|
uint32 ScanForThreats(void);
|
2019-09-26 21:01:50 +00:00
|
|
|
void SetEnterCar(CVehicle*, uint32);
|
|
|
|
bool WarpPedToNearEntityOffScreen(CEntity*);
|
|
|
|
void SetExitCar(CVehicle*, uint32);
|
2019-10-06 21:39:25 +00:00
|
|
|
void SetFormation(eFormation);
|
|
|
|
bool WillChat(CPed*);
|
|
|
|
void SetEnterTrain(CVehicle*, uint32);
|
|
|
|
void SetEnterCar_AllClear(CVehicle*, uint32, uint32);
|
2019-10-13 04:05:08 +00:00
|
|
|
void SetSolicit(uint32 time);
|
2019-10-24 23:25:11 +00:00
|
|
|
void ScanForInterestingStuff(void);
|
2019-10-26 15:41:04 +00:00
|
|
|
void WarpPedIntoCar(CVehicle*);
|
|
|
|
void SetCarJack(CVehicle*);
|
2019-11-19 22:15:45 +00:00
|
|
|
bool WarpPedToNearLeaderOffScreen(void);
|
2019-11-25 02:25:10 +00:00
|
|
|
void Solicit(void);
|
2019-12-09 23:02:02 +00:00
|
|
|
void SetExitBoat(CVehicle*);
|
2019-07-03 16:34:42 +00:00
|
|
|
|
|
|
|
// Static methods
|
2019-07-26 16:48:14 +00:00
|
|
|
static CVector GetLocalPositionToOpenCarDoor(CVehicle *veh, uint32 component, float offset);
|
|
|
|
static CVector GetPositionToOpenCarDoor(CVehicle *veh, uint32 component, float seatPosMult);
|
|
|
|
static CVector GetPositionToOpenCarDoor(CVehicle* veh, uint32 component);
|
2019-08-12 22:30:31 +00:00
|
|
|
static void Initialise(void);
|
|
|
|
static void SetAnimOffsetForEnterOrExitVehicle(void);
|
|
|
|
static void LoadFightData(void);
|
2019-07-03 16:34:42 +00:00
|
|
|
|
|
|
|
// Callbacks
|
2019-06-24 22:42:23 +00:00
|
|
|
static void PedGetupCB(CAnimBlendAssociation *assoc, void *arg);
|
|
|
|
static void PedStaggerCB(CAnimBlendAssociation *assoc, void *arg);
|
|
|
|
static void PedEvadeCB(CAnimBlendAssociation *assoc, void *arg);
|
|
|
|
static void FinishDieAnimCB(CAnimBlendAssociation *assoc, void *arg);
|
|
|
|
static void FinishedWaitCB(CAnimBlendAssociation *assoc, void *arg);
|
|
|
|
static void FinishLaunchCB(CAnimBlendAssociation *assoc, void *arg);
|
|
|
|
static void FinishHitHeadCB(CAnimBlendAssociation *assoc, void *arg);
|
|
|
|
static void PedAnimGetInCB(CAnimBlendAssociation *assoc, void *arg);
|
|
|
|
static void PedAnimDoorOpenCB(CAnimBlendAssociation *assoc, void *arg);
|
|
|
|
static void PedAnimPullPedOutCB(CAnimBlendAssociation *assoc, void *arg);
|
|
|
|
static void PedAnimDoorCloseCB(CAnimBlendAssociation *assoc, void *arg);
|
2019-09-06 22:27:07 +00:00
|
|
|
static void PedSetInCarCB(CAnimBlendAssociation *assoc, void *arg);
|
2019-06-24 22:42:23 +00:00
|
|
|
static void PedSetOutCarCB(CAnimBlendAssociation *assoc, void *arg);
|
|
|
|
static void PedAnimAlignCB(CAnimBlendAssociation *assoc, void *arg);
|
|
|
|
static void PedSetDraggedOutCarCB(CAnimBlendAssociation *assoc, void *arg);
|
|
|
|
static void PedAnimStepOutCarCB(CAnimBlendAssociation *assoc, void *arg);
|
|
|
|
static void PedSetInTrainCB(CAnimBlendAssociation *assoc, void *arg);
|
|
|
|
static void PedSetOutTrainCB(CAnimBlendAssociation *assoc, void *arg);
|
|
|
|
static void FinishedAttackCB(CAnimBlendAssociation *assoc, void *arg);
|
|
|
|
static void FinishFightMoveCB(CAnimBlendAssociation *assoc, void *arg);
|
|
|
|
static void PedAnimDoorCloseRollingCB(CAnimBlendAssociation *assoc, void *arg);
|
|
|
|
static void FinishJumpCB(CAnimBlendAssociation *assoc, void *arg);
|
|
|
|
static void PedLandCB(CAnimBlendAssociation *assoc, void *arg);
|
|
|
|
static void RestoreHeadingRateCB(CAnimBlendAssociation *assoc, void *arg);
|
|
|
|
static void PedSetQuickDraggedOutCarPositionCB(CAnimBlendAssociation *assoc, void *arg);
|
|
|
|
static void PedSetDraggedOutCarPositionCB(CAnimBlendAssociation *assoc, void *arg);
|
2019-06-15 15:53:25 +00:00
|
|
|
|
2019-07-03 16:34:42 +00:00
|
|
|
// functions that I see unnecessary to hook
|
|
|
|
bool IsPlayer(void);
|
|
|
|
bool UseGroundColModel(void);
|
|
|
|
bool CanSetPedState(void);
|
|
|
|
bool IsPedInControl(void);
|
|
|
|
bool CanPedDriveOff(void);
|
|
|
|
bool CanBeDeleted(void);
|
|
|
|
bool CanStrafeOrMouseControl(void);
|
|
|
|
bool CanPedReturnToState(void);
|
|
|
|
void SetMoveState(eMoveState);
|
|
|
|
bool IsTemporaryObjective(eObjective objective);
|
|
|
|
void SetObjectiveTimer(int);
|
|
|
|
bool SelectGunIfArmed(void);
|
|
|
|
bool IsPointerValid(void);
|
|
|
|
void SortPeds(CPed**, int, int);
|
|
|
|
void ForceStoredObjective(eObjective);
|
|
|
|
void SetStoredObjective(void);
|
|
|
|
void SetLeader(CEntity* leader);
|
|
|
|
void SetPedStats(ePedStats);
|
2019-07-05 22:44:49 +00:00
|
|
|
bool IsGangMember(void);
|
2019-08-01 22:04:30 +00:00
|
|
|
void Die(void);
|
2019-08-05 13:07:10 +00:00
|
|
|
void EnterTrain(void);
|
|
|
|
void ExitTrain(void);
|
|
|
|
void Fall(void);
|
2019-08-17 19:03:57 +00:00
|
|
|
bool IsPedShootable(void);
|
|
|
|
void Look(void);
|
2019-09-03 16:53:04 +00:00
|
|
|
void SetInTheAir(void);
|
|
|
|
void RestoreHeadPosition(void);
|
|
|
|
void PointGunAt(void);
|
2019-09-06 22:27:07 +00:00
|
|
|
bool ServiceTalkingWhenDead(void);
|
2019-09-12 00:43:18 +00:00
|
|
|
void SetPedPositionInTrain(void);
|
2019-09-26 21:01:50 +00:00
|
|
|
void SetShootTimer(uint32);
|
|
|
|
void SetSeekCar(CVehicle*, uint32);
|
|
|
|
void SetSeekBoatPosition(CVehicle*);
|
|
|
|
void SetExitTrain(CVehicle*);
|
2019-10-06 21:39:25 +00:00
|
|
|
void WanderRange(void);
|
|
|
|
void SetFollowRoute(int16, int16);
|
|
|
|
void SeekBoatPosition(void);
|
2019-11-04 23:04:26 +00:00
|
|
|
void UpdatePosition(void);
|
|
|
|
CObject *SpawnFlyingComponent(int, int8);
|
2019-11-19 22:15:45 +00:00
|
|
|
void SetCarJack_AllClear(CVehicle*, uint32, uint32);
|
2019-09-29 16:44:51 +00:00
|
|
|
#ifdef VC_PED_PORTS
|
|
|
|
bool CanPedJumpThis(CEntity*, CVector*);
|
|
|
|
#else
|
|
|
|
bool CanPedJumpThis(CEntity*);
|
|
|
|
#endif
|
2019-07-03 16:34:42 +00:00
|
|
|
|
2019-07-07 08:16:16 +00:00
|
|
|
bool HasWeapon(uint8 weaponType) { return m_weapons[weaponType].m_eWeaponType == weaponType; }
|
|
|
|
CWeapon &GetWeapon(uint8 weaponType) { return m_weapons[weaponType]; }
|
|
|
|
CWeapon *GetWeapon(void) { return &m_weapons[m_currentWeapon]; }
|
|
|
|
RwFrame *GetNodeFrame(int nodeId) { return m_pFrames[nodeId]->frame; }
|
2020-03-07 19:22:43 +00:00
|
|
|
|
2019-07-05 12:23:39 +00:00
|
|
|
PedState GetPedState(void) { return m_nPedState; }
|
|
|
|
void SetPedState(PedState state) { m_nPedState = state; }
|
2020-04-15 05:03:53 +00:00
|
|
|
bool Dead(void) { return m_nPedState == PED_DEAD; }
|
|
|
|
bool Dying(void) { return m_nPedState == PED_DIE; }
|
2019-09-13 19:04:55 +00:00
|
|
|
bool DyingOrDead(void) { return m_nPedState == PED_DIE || m_nPedState == PED_DEAD; }
|
2020-04-15 05:03:53 +00:00
|
|
|
bool OnGround(void) { return m_nPedState == PED_FALL || m_nPedState == PED_DIE || m_nPedState == PED_DEAD; }
|
|
|
|
|
|
|
|
bool Driving(void) { return m_nPedState == PED_DRIVING; }
|
2019-12-02 20:02:32 +00:00
|
|
|
bool InVehicle(void) { return bInVehicle && m_pMyVehicle; } // True when ped is sitting/standing in vehicle, not in enter/exit state.
|
2020-03-07 19:22:43 +00:00
|
|
|
bool EnteringCar(void) { return m_nPedState == PED_ENTER_CAR || m_nPedState == PED_CARJACK; }
|
|
|
|
|
2019-09-20 19:40:33 +00:00
|
|
|
void ReplaceWeaponWhenExitingVehicle(void);
|
2019-11-19 22:15:45 +00:00
|
|
|
void RemoveWeaponWhenEnteringVehicle(void);
|
2019-10-12 14:03:32 +00:00
|
|
|
bool IsNotInWreckedVehicle();
|
2020-01-23 20:21:50 +00:00
|
|
|
// My additions, because there were many, many instances of that.
|
|
|
|
inline void SetFindPathAndFlee(CEntity *fleeFrom, int time, bool walk = false)
|
|
|
|
{
|
|
|
|
SetFlee(fleeFrom, time);
|
|
|
|
bUsePedNodeSeek = true;
|
|
|
|
m_pNextPathNode = nil;
|
|
|
|
if (walk)
|
|
|
|
SetMoveState(PEDMOVE_WALK);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void SetFindPathAndFlee(CVector2D const &from, int time, bool walk = false)
|
|
|
|
{
|
|
|
|
SetFlee(from, time);
|
|
|
|
bUsePedNodeSeek = true;
|
|
|
|
m_pNextPathNode = nil;
|
|
|
|
if (walk)
|
|
|
|
SetMoveState(PEDMOVE_WALK);
|
|
|
|
}
|
2019-06-16 18:39:48 +00:00
|
|
|
|
2019-06-30 21:50:40 +00:00
|
|
|
// set by 0482:set_threat_reaction_range_multiplier opcode
|
2020-04-15 16:19:45 +00:00
|
|
|
static uint16 nThreatReactionRangeMultiplier;
|
2019-06-30 21:50:40 +00:00
|
|
|
|
2019-09-26 21:01:50 +00:00
|
|
|
// set by 0481:set_enter_car_range_multiplier opcode
|
2020-04-15 16:19:45 +00:00
|
|
|
static uint16 nEnterCarRangeMultiplier;
|
2019-09-26 21:01:50 +00:00
|
|
|
|
2020-04-15 16:19:45 +00:00
|
|
|
static bool bNastyLimbsCheat;
|
|
|
|
static bool bPedCheat2;
|
|
|
|
static bool bPedCheat3;
|
2019-09-03 16:53:04 +00:00
|
|
|
static CVector2D ms_vec2DFleePosition;
|
2019-08-05 13:07:10 +00:00
|
|
|
|
2019-11-25 02:25:10 +00:00
|
|
|
#ifdef TOGGLEABLE_BETA_FEATURES
|
2019-11-04 23:04:26 +00:00
|
|
|
static bool bPopHeadsOnHeadshot;
|
2019-11-25 02:25:10 +00:00
|
|
|
static bool bMakePedsRunToPhonesToReportCrimes;
|
|
|
|
#endif
|
2019-11-04 23:04:26 +00:00
|
|
|
|
2019-11-25 02:25:10 +00:00
|
|
|
#ifndef MASTER
|
2019-11-04 23:04:26 +00:00
|
|
|
// Mobile things
|
2019-08-16 16:25:02 +00:00
|
|
|
static void SwitchDebugDisplay(void);
|
|
|
|
void DebugRenderOnePedText(void);
|
2019-08-05 13:07:10 +00:00
|
|
|
#endif
|
2019-05-15 14:52:37 +00:00
|
|
|
};
|
2019-06-20 11:22:44 +00:00
|
|
|
|
2019-07-31 15:54:18 +00:00
|
|
|
class cPedParams
|
|
|
|
{
|
|
|
|
public:
|
2019-11-29 15:30:04 +00:00
|
|
|
bool m_bDistanceCalculated;
|
2019-07-31 15:54:18 +00:00
|
|
|
char gap_1[3];
|
|
|
|
float m_fDistance;
|
|
|
|
CPed *m_pPed;
|
|
|
|
};
|
|
|
|
|
2019-06-24 22:42:23 +00:00
|
|
|
void FinishFuckUCB(CAnimBlendAssociation *assoc, void *arg);
|
|
|
|
|
2019-05-15 14:52:37 +00:00
|
|
|
static_assert(offsetof(CPed, m_nPedState) == 0x224, "CPed: error");
|
|
|
|
static_assert(offsetof(CPed, m_pCurSurface) == 0x2FC, "CPed: error");
|
|
|
|
static_assert(offsetof(CPed, m_pMyVehicle) == 0x310, "CPed: error");
|
|
|
|
static_assert(offsetof(CPed, m_nPedType) == 0x32C, "CPed: error");
|
2019-05-19 19:28:10 +00:00
|
|
|
static_assert(offsetof(CPed, m_pCollidingEntity) == 0x34C, "CPed: error");
|
2019-05-29 16:06:33 +00:00
|
|
|
static_assert(offsetof(CPed, m_weapons) == 0x35C, "CPed: error");
|
|
|
|
static_assert(offsetof(CPed, m_currentWeapon) == 0x498, "CPed: error");
|
2019-06-15 15:53:25 +00:00
|
|
|
static_assert(offsetof(CPed, m_lookTimer) == 0x4CC, "CPed: error");
|
|
|
|
static_assert(offsetof(CPed, m_bodyPartBleeding) == 0x4F2, "CPed: error");
|
2019-07-03 16:34:42 +00:00
|
|
|
static_assert(offsetof(CPed, m_pedInObjective) == 0x16C, "CPed: error");
|
2019-06-16 18:39:48 +00:00
|
|
|
static_assert(offsetof(CPed, m_pEventEntity) == 0x19C, "CPed: error");
|
2019-06-02 15:13:56 +00:00
|
|
|
static_assert(sizeof(CPed) == 0x53C, "CPed: error");
|