summaryrefslogtreecommitdiffstats
path: root/src/peds/Ped.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/peds/Ped.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/peds/Ped.h b/src/peds/Ped.h
index a3d4997d..d27853d6 100644
--- a/src/peds/Ped.h
+++ b/src/peds/Ped.h
@@ -43,7 +43,7 @@ enum eFormation
FORMATION_FRONT
};
-enum FightState : int8 {
+enum FightState {
FIGHTSTATE_MOVE_FINISHED = -2,
FIGHTSTATE_JUST_ATTACKED,
FIGHTSTATE_NO_MOVE,
@@ -153,7 +153,7 @@ enum eWaitState {
WAITSTATE_FINISH_FLEE
};
-enum eObjective : uint32 {
+enum eObjective {
OBJECTIVE_NONE,
OBJECTIVE_WAIT_ON_FOOT,
OBJECTIVE_FLEE_ON_FOOT_TILL_SAFE,
@@ -212,7 +212,7 @@ enum PedOnGroundState {
PED_DEAD_ON_THE_FLOOR
};
-enum PointBlankNecessity : uint8 {
+enum PointBlankNecessity {
NO_POINT_BLANK_PED,
POINT_BLANK_FOR_WANTED_PED,
POINT_BLANK_FOR_SOMEONE_ELSE
@@ -484,7 +484,7 @@ public:
CVector m_vecHitLastPos;
uint32 m_curFightMove;
uint8 m_fightButtonPressure;
- FightState m_fightState;
+ int8 m_fightState;
bool m_takeAStepAfterAttack;
CFire *m_pFire;
CEntity *m_pLookTarget;
@@ -598,7 +598,7 @@ public:
#endif
bool CheckForExplosions(CVector2D &area);
CPed *CheckForGunShots(void);
- PointBlankNecessity CheckForPointBlankPeds(CPed*);
+ uint8 CheckForPointBlankPeds(CPed*);
bool CheckIfInTheAir(void);
void ClearAll(void);
void SetPointGunAt(CEntity*);
@@ -863,6 +863,13 @@ public:
SetMoveState(PEDMOVE_WALK);
}
+ inline void SetWeaponLockOnTarget(CEntity *target)
+ {
+ m_pPointGunAt = (CPed *)target;
+ if(target)
+ ((CEntity *)target)->RegisterReference(&m_pPointGunAt);
+ }
+
// Using this to abstract nodes of skinned and non-skinned meshes
CVector GetNodePosition(int32 node)
{
@@ -891,13 +898,13 @@ public:
RpHAnimHierarchy *hier = GetAnimHierarchyFromSkinClump(GetClump());
int32 idx = RpHAnimIDGetIndex(hier, m_pFrames[node]->nodeID);
RwMatrix *mats = RpHAnimHierarchyGetMatrixArray(hier);
- RwV3dTransformPoints((RwV3d*)&pos, (RwV3d*)&pos, 1, &mats[idx]);
+ RwV3dTransformPoints(&pos, &pos, 1, &mats[idx]);
}else
#endif
{
RwFrame *frame;
for (frame = m_pFrames[node]->frame; frame; frame = RwFrameGetParent(frame))
- RwV3dTransformPoints((RwV3d*)&pos, (RwV3d*)&pos, 1, RwFrameGetMatrix(frame));
+ RwV3dTransformPoints(&pos, &pos, 1, RwFrameGetMatrix(frame));
}
}