summaryrefslogtreecommitdiffstats
path: root/src/peds/Ped.h
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-05-17 19:36:48 +0200
committereray orçunus <erayorcunus@gmail.com>2020-05-17 20:01:52 +0200
commit84f8312b8666b2774eafbbb0e6d034ba598fd69c (patch)
treea901ba3684ab78346f415a6a4d3920312fb92c84 /src/peds/Ped.h
parentWeapon fixes (diff)
downloadre3-84f8312b8666b2774eafbbb0e6d034ba598fd69c.tar
re3-84f8312b8666b2774eafbbb0e6d034ba598fd69c.tar.gz
re3-84f8312b8666b2774eafbbb0e6d034ba598fd69c.tar.bz2
re3-84f8312b8666b2774eafbbb0e6d034ba598fd69c.tar.lz
re3-84f8312b8666b2774eafbbb0e6d034ba598fd69c.tar.xz
re3-84f8312b8666b2774eafbbb0e6d034ba598fd69c.tar.zst
re3-84f8312b8666b2774eafbbb0e6d034ba598fd69c.zip
Diffstat (limited to '')
-rw-r--r--src/peds/Ped.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/peds/Ped.h b/src/peds/Ped.h
index 32557cb6..42fec06c 100644
--- a/src/peds/Ped.h
+++ b/src/peds/Ped.h
@@ -523,7 +523,8 @@ public:
CVector2D *m_wanderRangeBounds; // array with 2 CVector2D (actually unused CRange2D class) - unused
CWeapon m_weapons[TOTAL_WEAPON_SLOTS];
eWeaponType m_storedWeapon;
- uint32 m_storedWeaponAmmo;
+ eWeaponType m_delayedWeapon;
+ uint32 m_delayedWeaponAmmo;
uint8 m_currentWeapon; // eWeaponType
uint8 m_maxWeaponTypeAllowed; // eWeaponType
uint8 m_wepSkills;
@@ -704,7 +705,7 @@ public:
void RemoveWeaponAnims(int, float);
void CreateDeadPedMoney(void);
void CreateDeadPedWeaponPickups(void);
-// void CreateDeadPedPickupCoors(float *x, float *y, float *z);
+ void CreateDeadPedPickupCoors(float *x, float *y, float *z);
void SetAttackTimer(uint32);
void SetBeingDraggedFromCar(CVehicle*, uint32, bool);
void SetRadioStation(void);
@@ -775,6 +776,7 @@ public:
void ClearFollowPath();
void GiveDelayedWeapon(eWeaponType weapon, uint32 ammo);
void RequestDelayedWeapon();
+ void AddInCarAnims(CVehicle* car, bool isDriver);
// Static methods
static CVector GetLocalPositionToOpenCarDoor(CVehicle *veh, uint32 component, float offset);
@@ -875,7 +877,7 @@ public:
bool Dead(void) { return m_nPedState == PED_DEAD; }
bool Dying(void) { return m_nPedState == PED_DIE; }
bool DyingOrDead(void) { return m_nPedState == PED_DIE || m_nPedState == PED_DEAD; }
- bool OnGround(void) { return m_nPedState == PED_FALL || m_nPedState == PED_DIE || m_nPedState == PED_DEAD; }
+ bool OnGround(void) { return m_nPedState == PED_FALL || m_nPedState == PED_DIE || m_nPedState == PED_DEAD || m_nWaitState == WAITSTATE_SUN_BATHE_IDLE; }
bool Driving(void) { return m_nPedState == PED_DRIVING; }
bool InVehicle(void) { return bInVehicle && m_pMyVehicle; } // True when ped is sitting/standing in vehicle, not in enter/exit state.
@@ -891,7 +893,7 @@ public:
void RemoveWeaponWhenEnteringVehicle(void);
bool IsNotInWreckedVehicle();
- // My addons. Maybe inlined in VC?
+ // My names. Inlined in VC
AnimationId GetFireAnimNotDucking(CWeaponInfo* weapon) {
// TODO(Miami): Revert that when weapons got ported
if (weapon->m_AnimToPlay == ASSOCGRP_STD)
@@ -928,6 +930,20 @@ public:
else
return ANIM_WEAPON_FIRE;
}
+
+ static AnimationId GetCrouchReloadAnim(CWeaponInfo* weapon) {
+ if (!!weapon->m_bReload)
+ return ANIM_WEAPON_CROUCHRELOAD;
+ else
+ return (AnimationId)0;
+ }
+
+ static AnimationId GetReloadAnim(CWeaponInfo* weapon) {
+ if (!!weapon->m_bReload)
+ return ANIM_WEAPON_RELOAD;
+ else
+ return (AnimationId)0;
+ }
// --
// My additions, because there were many, many instances of that.