2019-05-15 16:52:37 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Physical.h"
|
2019-05-29 18:06:33 +02:00
|
|
|
#include "Weapon.h"
|
2019-06-18 14:55:39 +02:00
|
|
|
#include "PedStats.h"
|
2019-06-20 13:22:44 +02:00
|
|
|
#include "PedType.h"
|
|
|
|
#include "PedIK.h"
|
2019-06-16 20:39:48 +02:00
|
|
|
#include "AnimManager.h"
|
|
|
|
#include "AnimBlendClumpData.h"
|
2019-06-20 13:22:44 +02:00
|
|
|
#include "AnimBlendAssociation.h"
|
|
|
|
#include "WeaponInfo.h"
|
2019-06-30 12:59:55 +02:00
|
|
|
#include "Fire.h"
|
2019-06-16 23:12:14 +02:00
|
|
|
|
|
|
|
struct CPathNode;
|
2019-05-29 18:06:33 +02:00
|
|
|
|
2019-07-06 00:44:49 +02:00
|
|
|
enum eWaitState : uint32 {
|
|
|
|
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 18:34:42 +02:00
|
|
|
OBJECTIVE_NONE,
|
|
|
|
OBJECTIVE_IDLE,
|
|
|
|
OBJECTIVE_FLEE_TILL_SAFE,
|
|
|
|
OBJECTIVE_GUARD_SPOT,
|
|
|
|
OBJECTIVE_GUARD_AREA,
|
|
|
|
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,
|
|
|
|
OBJECTIVE_FOLLOW_CAR_IN_CAR,
|
|
|
|
OBJECTIVE_FIRE_AT_OBJ_FROM_VEHICLE,
|
|
|
|
OBJECTIVE_DESTROY_OBJ,
|
|
|
|
OBJECTIVE_DESTROY_CAR,
|
|
|
|
OBJECTIVE_GOTO_AREA_ANY_MEANS,
|
|
|
|
OBJECTIVE_GOTO_AREA_ON_FOOT,
|
|
|
|
OBJECTIVE_RUN_TO_AREA,
|
|
|
|
OBJECTIVE_23,
|
|
|
|
OBJECTIVE_24,
|
|
|
|
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,
|
|
|
|
OBJECTIVE_35
|
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
2019-07-05 14:23:39 +02:00
|
|
|
RANDOM_CHAR = 1,
|
|
|
|
MISSION_CHAR,
|
2019-07-03 18:34:42 +02:00
|
|
|
};
|
|
|
|
|
2019-06-24 16:57:54 +02:00
|
|
|
enum PedLineUpPhase {
|
|
|
|
LINE_UP_TO_CAR_START,
|
|
|
|
LINE_UP_TO_CAR_END,
|
|
|
|
LINE_UP_TO_CAR_2
|
|
|
|
};
|
|
|
|
|
2019-06-20 13:22:44 +02:00
|
|
|
enum PedOnGroundState {
|
|
|
|
NO_PED,
|
|
|
|
PED_BELOW_PLAYER,
|
|
|
|
PED_ON_THE_FLOOR,
|
|
|
|
PED_DEAD_ON_THE_FLOOR
|
|
|
|
};
|
|
|
|
|
2019-05-28 08:39:36 +02:00
|
|
|
enum PedState
|
2019-05-15 16:52:37 +02:00
|
|
|
{
|
2019-05-30 14:50:54 +02:00
|
|
|
PED_NONE,
|
2019-05-28 08:39:36 +02: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 14:50:54 +02:00
|
|
|
|
|
|
|
PED_UNKNOWN, // HANG_OUT in Fire_Head's idb
|
|
|
|
|
|
|
|
PED_STATES_NO_AI,
|
2019-05-28 08:39:36 +02:00
|
|
|
PED_JUMP,
|
|
|
|
PED_FALL,
|
|
|
|
PED_GETUP,
|
|
|
|
PED_STAGGER,
|
|
|
|
PED_DIVE_AWAY,
|
2019-05-30 14:50:54 +02:00
|
|
|
|
2019-05-28 08:39:36 +02:00
|
|
|
PED_STATES_NO_ST,
|
|
|
|
PED_ENTER_TRAIN,
|
|
|
|
PED_EXIT_TRAIN,
|
|
|
|
PED_ARREST_PLAYER,
|
|
|
|
PED_DRIVING,
|
|
|
|
PED_PASSENGER,
|
|
|
|
PED_TAXI_PASSENGER,
|
|
|
|
PED_OPEN_DOOR,
|
2019-07-05 14:23:39 +02:00
|
|
|
PED_DIE,
|
|
|
|
PED_DEAD,
|
2019-05-28 08:39:36 +02:00
|
|
|
PED_CARJACK,
|
|
|
|
PED_DRAG_FROM_CAR,
|
|
|
|
PED_ENTER_CAR,
|
|
|
|
PED_STEAL_CAR,
|
|
|
|
PED_EXIT_CAR,
|
|
|
|
PED_HANDS_UP,
|
2019-07-05 14:23:39 +02:00
|
|
|
PED_ARRESTED,
|
2019-05-15 16:52:37 +02:00
|
|
|
};
|
|
|
|
|
2019-07-03 18:34:42 +02:00
|
|
|
enum eMoveState {
|
2019-05-29 18:06:33 +02:00
|
|
|
PEDMOVE_NONE,
|
|
|
|
PEDMOVE_STILL,
|
|
|
|
PEDMOVE_WALK,
|
|
|
|
PEDMOVE_RUN,
|
|
|
|
PEDMOVE_SPRINT,
|
|
|
|
};
|
|
|
|
|
2019-05-15 16:52:37 +02:00
|
|
|
class CVehicle;
|
|
|
|
|
|
|
|
class CPed : public CPhysical
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// 0x128
|
2019-05-19 21:28:10 +02:00
|
|
|
CStoredCollPoly m_collPoly;
|
|
|
|
float m_fCollisionSpeed;
|
2019-07-05 14:23:39 +02:00
|
|
|
|
|
|
|
// cf. https://github.com/DK22Pac/plugin-sdk/blob/master/plugin_sa/game_sa/CPed.h from R*
|
2019-06-28 18:19:00 +02:00
|
|
|
uint8 bIsStanding : 1;
|
2019-05-19 21:28:10 +02:00
|
|
|
uint8 m_ped_flagA2 : 1;
|
2019-06-18 14:34:27 +02:00
|
|
|
uint8 m_ped_flagA4 : 1; // stores (CTimer::GetTimeInMilliseconds() < m_lastHitTime)
|
2019-06-24 16:57:54 +02:00
|
|
|
uint8 bIsPointingGunAt : 1;
|
2019-06-19 14:20:50 +02:00
|
|
|
uint8 bIsLooking : 1;
|
2019-06-20 13:22:44 +02:00
|
|
|
uint8 m_ped_flagA20 : 1; // "look" method? - probably missing in SA
|
2019-06-19 14:20:50 +02:00
|
|
|
uint8 bIsRestoringLook : 1;
|
|
|
|
uint8 bIsAimingGun : 1;
|
2019-06-30 23:50:40 +02:00
|
|
|
|
2019-06-19 14:20:50 +02:00
|
|
|
uint8 bIsRestoringGun : 1;
|
|
|
|
uint8 bCanPointGunAtTarget : 1;
|
2019-07-06 00:44:49 +02:00
|
|
|
uint8 bIsTalking : 1;
|
|
|
|
uint8 bIsInTheAir : 1;
|
|
|
|
uint8 bIsLanding : 1;
|
2019-05-19 21:28:10 +02:00
|
|
|
uint8 m_ped_flagB20 : 1;
|
|
|
|
uint8 m_ped_flagB40 : 1;
|
|
|
|
uint8 m_ped_flagB80 : 1;
|
2019-06-30 23:50:40 +02:00
|
|
|
|
2019-05-19 21:28:10 +02:00
|
|
|
uint8 m_ped_flagC1 : 1;
|
2019-07-06 00:44:49 +02:00
|
|
|
uint8 bRespondsToThreats : 1;
|
2019-07-05 14:23:39 +02:00
|
|
|
uint8 m_ped_flagC4 : 1; // false when in bus, bRenderPedInCar?
|
2019-05-19 21:28:10 +02:00
|
|
|
uint8 m_ped_flagC8 : 1;
|
|
|
|
uint8 m_ped_flagC10 : 1;
|
2019-06-17 11:48:42 +02:00
|
|
|
uint8 m_ped_flagC20 : 1; // just left some body part?
|
2019-05-19 21:28:10 +02:00
|
|
|
uint8 m_ped_flagC40 : 1;
|
|
|
|
uint8 m_ped_flagC80 : 1;
|
2019-06-30 23:50:40 +02:00
|
|
|
|
2019-05-19 21:28:10 +02:00
|
|
|
uint8 m_ped_flagD1 : 1;
|
|
|
|
uint8 m_ped_flagD2 : 1;
|
|
|
|
uint8 m_ped_flagD4 : 1;
|
|
|
|
uint8 m_ped_flagD8 : 1;
|
|
|
|
uint8 m_ped_flagD10 : 1;
|
|
|
|
uint8 m_ped_flagD20 : 1;
|
2019-07-03 18:34:42 +02:00
|
|
|
uint8 m_ped_flagD40 : 1; // reset when objective changes
|
2019-05-19 21:28:10 +02:00
|
|
|
uint8 m_ped_flagD80 : 1;
|
2019-06-30 23:50:40 +02:00
|
|
|
|
2019-05-19 21:28:10 +02:00
|
|
|
uint8 m_ped_flagE1 : 1;
|
|
|
|
uint8 m_ped_flagE2 : 1;
|
2019-07-06 00:44:49 +02:00
|
|
|
uint8 bNotAllowedToDuck : 1;
|
|
|
|
uint8 bCrouchWhenShooting : 1;
|
|
|
|
uint8 bIsDucking : 1; // set if you don't want ped to attack
|
2019-05-19 21:28:10 +02:00
|
|
|
uint8 m_ped_flagE20 : 1;
|
2019-06-28 18:19:00 +02:00
|
|
|
uint8 bDoBloodyFootprints : 1;
|
2019-05-19 21:28:10 +02:00
|
|
|
uint8 m_ped_flagE80 : 1;
|
2019-06-30 23:50:40 +02:00
|
|
|
|
2019-05-19 21:28:10 +02:00
|
|
|
uint8 m_ped_flagF1 : 1;
|
|
|
|
uint8 m_ped_flagF2 : 1;
|
|
|
|
uint8 m_ped_flagF4 : 1;
|
|
|
|
uint8 m_ped_flagF8 : 1;
|
|
|
|
uint8 m_ped_flagF10 : 1;
|
|
|
|
uint8 m_ped_flagF20 : 1;
|
|
|
|
uint8 m_ped_flagF40 : 1;
|
|
|
|
uint8 m_ped_flagF80 : 1;
|
2019-06-30 23:50:40 +02:00
|
|
|
|
2019-05-19 21:28:10 +02:00
|
|
|
uint8 m_ped_flagG1 : 1;
|
|
|
|
uint8 m_ped_flagG2 : 1;
|
|
|
|
uint8 m_ped_flagG4 : 1;
|
|
|
|
uint8 m_ped_flagG8 : 1;
|
|
|
|
uint8 m_ped_flagG10 : 1;
|
|
|
|
uint8 m_ped_flagG20 : 1;
|
|
|
|
uint8 m_ped_flagG40 : 1;
|
|
|
|
uint8 m_ped_flagG80 : 1;
|
2019-06-30 23:50:40 +02:00
|
|
|
|
2019-05-19 21:28:10 +02:00
|
|
|
uint8 m_ped_flagH1 : 1;
|
|
|
|
uint8 m_ped_flagH2 : 1;
|
|
|
|
uint8 m_ped_flagH4 : 1;
|
|
|
|
uint8 m_ped_flagH8 : 1;
|
|
|
|
uint8 m_ped_flagH10 : 1;
|
|
|
|
uint8 m_ped_flagH20 : 1;
|
|
|
|
uint8 m_ped_flagH40 : 1;
|
|
|
|
uint8 m_ped_flagH80 : 1;
|
2019-06-30 23:50:40 +02:00
|
|
|
|
2019-05-19 21:28:10 +02:00
|
|
|
uint8 m_ped_flagI1 : 1;
|
|
|
|
uint8 m_ped_flagI2 : 1;
|
|
|
|
uint8 m_ped_flagI4 : 1;
|
2019-06-22 20:16:29 +02:00
|
|
|
uint8 bRecordedForReplay : 1;
|
2019-05-19 21:28:10 +02:00
|
|
|
uint8 m_ped_flagI10 : 1;
|
|
|
|
uint8 m_ped_flagI20 : 1;
|
|
|
|
uint8 m_ped_flagI40 : 1;
|
|
|
|
uint8 m_ped_flagI80 : 1;
|
2019-07-05 14:23:39 +02:00
|
|
|
|
2019-06-30 12:59:55 +02:00
|
|
|
uint8 stuff10[3];
|
2019-07-05 14:23:39 +02:00
|
|
|
uint8 CharCreatedBy;
|
2019-06-30 23:50:40 +02:00
|
|
|
uint8 field_161;
|
|
|
|
uint8 pad_162[2];
|
2019-07-03 18:34:42 +02:00
|
|
|
eObjective m_objective;
|
|
|
|
eObjective m_prevObjective;
|
|
|
|
CPed *m_pedInObjective;
|
|
|
|
CVehicle *m_carInObjective;
|
2019-06-30 23:50:40 +02:00
|
|
|
uint32 field_174;
|
|
|
|
uint32 field_178;
|
|
|
|
uint32 field_17C;
|
2019-07-03 18:34:42 +02:00
|
|
|
CPed *m_leader;
|
2019-06-30 23:50:40 +02:00
|
|
|
uint32 m_pedFormation;
|
|
|
|
uint32 m_fearFlags;
|
|
|
|
CEntity *m_threatEntity;
|
|
|
|
CVector2D m_eventOrThread;
|
|
|
|
uint32 m_eventType;
|
|
|
|
CEntity* m_pEventEntity;
|
2019-06-15 17:53:25 +02:00
|
|
|
float m_fAngleToEvent;
|
2019-06-14 16:14:22 +02:00
|
|
|
AnimBlendFrameData *m_pFrames[PED_NODE_MAX];
|
2019-06-24 16:57:54 +02:00
|
|
|
AssocGroupId m_animGroup;
|
|
|
|
CAnimBlendAssociation *m_pVehicleAnim;
|
2019-06-14 14:33:08 +02:00
|
|
|
CVector2D m_vecAnimMoveDelta;
|
|
|
|
CVector m_vecOffsetSeek;
|
|
|
|
CPedIK m_pedIK;
|
2019-06-30 23:50:40 +02:00
|
|
|
float m_actionX;
|
|
|
|
float m_actionY;
|
2019-06-16 20:39:48 +02:00
|
|
|
uint32 m_nPedStateTimer;
|
2019-06-20 13:22:44 +02:00
|
|
|
PedState m_nPedState;
|
2019-06-24 16:57:54 +02:00
|
|
|
PedState m_nLastPedState;
|
2019-07-03 18:34:42 +02:00
|
|
|
eMoveState m_nMoveState;
|
2019-06-15 01:34:19 +02:00
|
|
|
int32 m_nStoredActionState;
|
|
|
|
int32 m_nPrevActionState;
|
2019-07-06 00:44:49 +02:00
|
|
|
eWaitState m_nWaitState;
|
2019-06-30 23:50:40 +02:00
|
|
|
uint32 m_nWaitTimer;
|
|
|
|
void *m_pPathNodesStates[8];
|
|
|
|
CVector2D m_stPathNodeStates[10];
|
2019-06-15 01:34:19 +02:00
|
|
|
uint16 m_nPathNodes;
|
|
|
|
uint8 m_nCurPathNode;
|
|
|
|
int8 m_nPathState;
|
|
|
|
private:
|
|
|
|
int8 _pad2B5[3];
|
|
|
|
public:
|
|
|
|
CPathNode *m_pNextPathNode;
|
|
|
|
CPathNode *m_pLastPathNode;
|
2019-06-17 00:16:38 +02:00
|
|
|
float m_fHealth;
|
|
|
|
float m_fArmour;
|
2019-06-30 23:50:40 +02:00
|
|
|
int16 m_routeLastPoint;
|
|
|
|
uint16 m_routePoints;
|
2019-07-06 00:44:49 +02:00
|
|
|
int16 m_routePos;
|
|
|
|
int16 m_routeType;
|
|
|
|
int16 m_routeCurDir;
|
2019-06-30 23:50:40 +02:00
|
|
|
uint16 field_2D2;
|
2019-07-03 18:34:42 +02:00
|
|
|
CVector2D m_moved;
|
2019-06-17 11:48:42 +02:00
|
|
|
float m_fRotationCur;
|
|
|
|
float m_fRotationDest;
|
2019-07-01 18:26:46 +02:00
|
|
|
float m_headingRate;
|
2019-07-08 17:07:34 +02:00
|
|
|
uint16 m_vehEnterType;
|
2019-06-24 16:57:54 +02:00
|
|
|
uint16 m_walkAroundType;
|
2019-05-15 16:52:37 +02:00
|
|
|
CEntity *m_pCurrentPhysSurface;
|
|
|
|
CVector m_vecOffsetFromPhysSurface;
|
|
|
|
CEntity *m_pCurSurface;
|
2019-06-30 23:50:40 +02:00
|
|
|
CVector m_vecSeekVehicle;
|
2019-06-27 14:01:55 +02:00
|
|
|
CEntity *m_pSeekTarget;
|
2019-05-15 16:52:37 +02:00
|
|
|
CVehicle *m_pMyVehicle;
|
2019-06-17 00:16:38 +02:00
|
|
|
bool bInVehicle;
|
2019-06-30 23:50:40 +02:00
|
|
|
uint8 pad_315[3];
|
|
|
|
uint32 field_318;
|
|
|
|
uint8 field_31C;
|
|
|
|
uint8 field_31D;
|
|
|
|
int16 m_phoneId;
|
|
|
|
uint32 m_lookingForPhone;
|
|
|
|
uint32 m_phoneTalkTimer;
|
|
|
|
void *m_lastAccident;
|
2019-05-15 16:52:37 +02:00
|
|
|
int32 m_nPedType;
|
2019-06-19 18:35:51 +02:00
|
|
|
CPedStats *m_pedStats;
|
2019-06-30 23:50:40 +02:00
|
|
|
float m_fleeFromPosX;
|
|
|
|
float m_fleeFromPosY;
|
|
|
|
CEntity *m_fleeFrom;
|
|
|
|
uint32 m_fleeTimer;
|
|
|
|
uint32 field_344;
|
|
|
|
uint32 m_lastThreatTimer;
|
2019-05-19 21:28:10 +02:00
|
|
|
CEntity *m_pCollidingEntity;
|
2019-06-30 23:50:40 +02:00
|
|
|
uint8 m_stateUnused;
|
|
|
|
uint8 pad_351[3];
|
|
|
|
uint32 m_timerUnused;
|
|
|
|
CEntity *m_targetUnused;
|
2019-07-04 22:31:21 +02:00
|
|
|
CWeapon m_weapons[WEAPONTYPE_TOTAL_INVENTORY_WEAPONS];
|
2019-06-24 16:57:54 +02:00
|
|
|
eWeaponType m_storedWeapon;
|
2019-06-21 20:16:51 +02:00
|
|
|
uint8 m_currentWeapon; // eWeaponType
|
|
|
|
uint8 m_maxWeaponTypeAllowed; // eWeaponType
|
2019-06-30 23:50:40 +02:00
|
|
|
uint8 m_wepSkills;
|
|
|
|
uint8 m_wepAccuracy;
|
|
|
|
CEntity *m_pPointGunAt;
|
2019-06-14 14:33:08 +02:00
|
|
|
CVector m_vecHitLastPos;
|
2019-06-30 23:50:40 +02:00
|
|
|
uint32 m_lastHitState;
|
|
|
|
uint8 m_fightFlags1;
|
|
|
|
uint8 m_fightFlags2;
|
|
|
|
uint8 pad_4B2[2];
|
2019-06-30 12:59:55 +02:00
|
|
|
CFire* m_pFire;
|
2019-06-19 14:06:13 +02:00
|
|
|
CEntity *m_pLookTarget;
|
2019-06-14 14:33:08 +02:00
|
|
|
float m_fLookDirection;
|
|
|
|
int32 m_wepModelID;
|
2019-06-15 17:53:25 +02:00
|
|
|
uint32 m_leaveCarTimer;
|
|
|
|
uint32 m_getUpTimer;
|
|
|
|
uint32 m_lookTimer;
|
2019-06-18 14:34:27 +02:00
|
|
|
uint32 m_standardTimer;
|
|
|
|
uint32 m_attackTimer;
|
|
|
|
uint32 m_lastHitTime;
|
2019-06-21 20:16:51 +02:00
|
|
|
uint32 m_hitRecoverTimer;
|
2019-07-03 18:34:42 +02:00
|
|
|
uint32 m_objectiveTimer;
|
2019-06-21 20:16:51 +02:00
|
|
|
uint32 m_duckTimer;
|
2019-06-30 23:50:40 +02:00
|
|
|
uint32 field_4E8;
|
2019-06-28 18:19:00 +02:00
|
|
|
int32 m_bloodyFootprintCount;
|
|
|
|
uint8 stuff9[2];
|
2019-06-30 23:50:40 +02:00
|
|
|
int8 m_bodyPartBleeding; // PedNode
|
2019-06-16 20:39:48 +02:00
|
|
|
uint8 m_field_4F3;
|
|
|
|
CPed *m_nearPeds[10];
|
2019-06-20 13:22:44 +02:00
|
|
|
uint16 m_numNearPeds;
|
2019-06-30 23:50:40 +02:00
|
|
|
int8 m_lastWepDam;
|
|
|
|
uint8 pad_51F;
|
|
|
|
uint8 field_520;
|
|
|
|
uint8 pad_521[3];
|
|
|
|
uint32 m_talkTimer;
|
|
|
|
uint16 m_talkTypeLast;
|
|
|
|
uint16 m_talkType;
|
|
|
|
CVector m_vecSeekPosEx;
|
|
|
|
float m_seekExAngle;
|
2019-05-15 16:52:37 +02:00
|
|
|
|
2019-06-02 17:13:56 +02:00
|
|
|
static void *operator new(size_t);
|
2019-06-30 12:59:55 +02:00
|
|
|
static void *operator new(size_t, int);
|
2019-06-02 17:13:56 +02:00
|
|
|
static void operator delete(void*, size_t);
|
2019-06-30 15:20:11 +02:00
|
|
|
static void operator delete(void*, int);
|
2019-05-19 21:28:10 +02:00
|
|
|
|
2019-06-30 23:50:40 +02:00
|
|
|
CPed(uint32 pedType);
|
2019-07-08 08:46:42 +02: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 23:50:40 +02:00
|
|
|
|
2019-07-08 08:46:42 +02:00
|
|
|
virtual void SetMoveAnim(void);
|
2019-06-30 12:59:55 +02:00
|
|
|
|
2019-06-14 14:33:08 +02:00
|
|
|
void AddWeaponModel(int id);
|
2019-06-20 13:22:44 +02:00
|
|
|
void AimGun(void);
|
2019-05-19 21:28:10 +02:00
|
|
|
void KillPedWithCar(CVehicle *veh, float impulse);
|
2019-06-16 23:12:14 +02:00
|
|
|
void Say(uint16 audio);
|
2019-06-27 14:01:55 +02:00
|
|
|
void SetLookFlag(CEntity *target, bool unknown);
|
2019-06-19 14:06:13 +02:00
|
|
|
void SetLookFlag(float direction, bool unknown);
|
2019-06-16 20:39:48 +02:00
|
|
|
void SetLookTimer(int time);
|
2019-06-15 17:53:25 +02:00
|
|
|
void SetDie(AnimationId anim, float arg1, float arg2);
|
|
|
|
void ApplyHeadShot(eWeaponType weaponType, CVector pos, bool evenOnPlayer);
|
2019-06-16 23:12:14 +02:00
|
|
|
void RemoveBodyPart(PedNode nodeId, int8 unknown);
|
|
|
|
void SpawnFlyingComponent(int, int8 unknown);
|
2019-06-19 14:06:13 +02:00
|
|
|
bool OurPedCanSeeThisOne(CEntity *target);
|
2019-06-17 11:48:42 +02:00
|
|
|
void Avoid(void);
|
2019-06-20 13:22:44 +02:00
|
|
|
void Attack(void);
|
|
|
|
void ClearAimFlag(void);
|
|
|
|
void ClearLookFlag(void);
|
|
|
|
void RestorePreviousState(void);
|
|
|
|
void ClearAttack(void);
|
|
|
|
bool IsPedHeadAbovePos(float zOffset);
|
2019-06-21 20:16:51 +02:00
|
|
|
void RemoveWeaponModel(int modelId);
|
2019-07-01 18:26:46 +02:00
|
|
|
void SetCurrentWeapon(uint32 weaponType);
|
2019-06-21 20:16:51 +02:00
|
|
|
void Duck(void);
|
|
|
|
void ClearDuck(void);
|
|
|
|
void ClearPointGunAt(void);
|
2019-06-24 16:57:54 +02:00
|
|
|
void BeingDraggedFromCar(void);
|
|
|
|
void RestartNonPartialAnims(void);
|
|
|
|
void LineUpPedWithCar(PedLineUpPhase phase);
|
|
|
|
void SetPedPositionInCar(void);
|
2019-06-28 18:19:00 +02:00
|
|
|
void PlayFootSteps(void);
|
2019-06-30 12:59:55 +02:00
|
|
|
void QuitEnteringCar(void);
|
2019-06-30 23:50:40 +02:00
|
|
|
void BuildPedLists(void);
|
2019-07-01 21:46:44 +02:00
|
|
|
uint32 GiveWeapon(eWeaponType weaponType, uint32 ammo);
|
2019-07-03 18:34:42 +02:00
|
|
|
void CalculateNewOrientation(void);
|
|
|
|
float WorkOutHeadingForMovingFirstPerson(float);
|
|
|
|
void CalculateNewVelocity(void);
|
|
|
|
bool CanPedJumpThis(int32);
|
|
|
|
bool CanSeeEntity(CEntity*, float);
|
|
|
|
void RestorePreviousObjective(void);
|
2019-07-06 00:44:49 +02:00
|
|
|
void SetIdle(void);
|
2019-07-03 18:34:42 +02:00
|
|
|
void SetObjective(eObjective, void*);
|
2019-07-06 00:44:49 +02:00
|
|
|
void SetObjective(eObjective);
|
|
|
|
void SetObjective(eObjective, int16, int16);
|
|
|
|
void ClearChat(void);
|
|
|
|
void InformMyGangOfAttack(CEntity*);
|
|
|
|
void SetFollowRoute(int16, int16);
|
|
|
|
void ReactToAttack(CEntity*);
|
|
|
|
void SetDuck(uint32);
|
|
|
|
void RegisterThreatWithGangPeds(CEntity*);
|
|
|
|
bool TurnBody(void);
|
|
|
|
void Chat(void);
|
2019-07-08 08:46:42 +02:00
|
|
|
void MakeChangesForNewWeapon(int8);
|
2019-07-07 09:21:44 +02:00
|
|
|
|
2019-07-03 18:34:42 +02:00
|
|
|
|
|
|
|
// Static methods
|
2019-06-24 16:57:54 +02:00
|
|
|
static void GetLocalPositionToOpenCarDoor(CVector *output, CVehicle *veh, uint32 enterType, float offset);
|
|
|
|
static void GetPositionToOpenCarDoor(CVector *output, CVehicle *veh, uint32 enterType, float seatPosMult);
|
|
|
|
static void GetPositionToOpenCarDoor(CVector* output, CVehicle* veh, uint32 enterType);
|
2019-07-03 18:34:42 +02:00
|
|
|
|
|
|
|
// Callbacks
|
2019-06-15 17:53:25 +02:00
|
|
|
static RwObject *SetPedAtomicVisibilityCB(RwObject *object, void *data);
|
|
|
|
static RwFrame *RecurseFrameChildrenVisibilityCB(RwFrame *frame, void *data);
|
2019-06-25 00:42:23 +02: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);
|
|
|
|
static void SetInCarCB(CAnimBlendAssociation *assoc, void *arg);
|
|
|
|
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 17:53:25 +02:00
|
|
|
|
2019-07-03 18:34:42 +02: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-06 00:44:49 +02:00
|
|
|
bool IsGangMember(void);
|
2019-07-03 18:34:42 +02:00
|
|
|
|
2019-07-07 10:16:16 +02: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; }
|
2019-07-05 14:23:39 +02:00
|
|
|
PedState GetPedState(void) { return m_nPedState; }
|
|
|
|
void SetPedState(PedState state) { m_nPedState = state; }
|
2019-06-16 20:39:48 +02:00
|
|
|
|
2019-06-30 23:50:40 +02:00
|
|
|
// set by 0482:set_threat_reaction_range_multiplier opcode
|
|
|
|
static uint16 &distanceMultToCountPedNear;
|
|
|
|
|
2019-06-24 16:57:54 +02:00
|
|
|
static CVector &offsetToOpenRegularCarDoor;
|
|
|
|
static CVector &offsetToOpenLowCarDoor;
|
|
|
|
static CVector &offsetToOpenVanDoor;
|
2019-06-17 00:16:38 +02:00
|
|
|
static bool &bNastyLimbsCheat;
|
|
|
|
static bool &bPedCheat2;
|
|
|
|
static bool &bPedCheat3;
|
2019-05-15 16:52:37 +02:00
|
|
|
};
|
2019-06-20 13:22:44 +02:00
|
|
|
|
2019-06-25 00:42:23 +02:00
|
|
|
void FinishFuckUCB(CAnimBlendAssociation *assoc, void *arg);
|
|
|
|
|
2019-05-15 16:52:37 +02: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 21:28:10 +02:00
|
|
|
static_assert(offsetof(CPed, m_pCollidingEntity) == 0x34C, "CPed: error");
|
2019-05-29 18:06:33 +02:00
|
|
|
static_assert(offsetof(CPed, m_weapons) == 0x35C, "CPed: error");
|
|
|
|
static_assert(offsetof(CPed, m_currentWeapon) == 0x498, "CPed: error");
|
2019-06-15 17:53:25 +02:00
|
|
|
static_assert(offsetof(CPed, m_lookTimer) == 0x4CC, "CPed: error");
|
|
|
|
static_assert(offsetof(CPed, m_bodyPartBleeding) == 0x4F2, "CPed: error");
|
2019-07-03 18:34:42 +02:00
|
|
|
static_assert(offsetof(CPed, m_pedInObjective) == 0x16C, "CPed: error");
|
2019-06-16 20:39:48 +02:00
|
|
|
static_assert(offsetof(CPed, m_pEventEntity) == 0x19C, "CPed: error");
|
2019-06-02 17:13:56 +02:00
|
|
|
static_assert(sizeof(CPed) == 0x53C, "CPed: error");
|