some CPed flags named from SA

This commit is contained in:
aap 2019-06-19 14:20:50 +02:00
parent 78e33785ec
commit f88f711ddd
2 changed files with 11 additions and 11 deletions

View File

@ -223,16 +223,16 @@ CPed::AimGun()
} }
CPed::Say(SOUND_PED_ATTACK); CPed::Say(SOUND_PED_ATTACK);
m_ped_flagB2 = m_pedIK.PointGunAtPosition(&vector); bCanPointGunAtTarget = m_pedIK.PointGunAtPosition(&vector);
if (m_pLookTarget != m_pSeekTarget) { if (m_pLookTarget != m_pSeekTarget) {
CPed::SetLookFlag(m_pSeekTarget, 1); CPed::SetLookFlag(m_pSeekTarget, 1);
} }
} else { } else {
if (CPed::IsPlayer()) { if (CPed::IsPlayer()) {
m_ped_flagB2 = m_pedIK.PointGunInDirection(m_fLookDirection, ((CPlayerPed*)this)->m_fFPSMoveHeading); bCanPointGunAtTarget = m_pedIK.PointGunInDirection(m_fLookDirection, ((CPlayerPed*)this)->m_fFPSMoveHeading);
} else { } else {
m_ped_flagB2 = m_pedIK.PointGunInDirection(m_fLookDirection, 0.0f); bCanPointGunAtTarget = m_pedIK.PointGunInDirection(m_fLookDirection, 0.0f);
} }
} }
} }
@ -338,7 +338,7 @@ CPed::SetLookFlag(CPed *target, bool unknown)
{ {
if (m_lookTimer < CTimer::GetTimeInMilliseconds()) { if (m_lookTimer < CTimer::GetTimeInMilliseconds()) {
bIsLooking = true; bIsLooking = true;
m_ped_flagA40 = false; bIsRestoringLook = false;
m_pLookTarget = target; m_pLookTarget = target;
m_pLookTarget->RegisterReference((CEntity**)&m_pLookTarget); m_pLookTarget->RegisterReference((CEntity**)&m_pLookTarget);
m_fLookDirection = 999999.0f; m_fLookDirection = 999999.0f;
@ -355,7 +355,7 @@ CPed::SetLookFlag(float direction, bool unknown)
{ {
if (m_lookTimer < CTimer::GetTimeInMilliseconds()) { if (m_lookTimer < CTimer::GetTimeInMilliseconds()) {
bIsLooking = true; bIsLooking = true;
m_ped_flagA40 = false; bIsRestoringLook = false;
m_pLookTarget = nil; m_pLookTarget = nil;
m_fLookDirection = direction; m_fLookDirection = direction;
m_lookTimer = 0; m_lookTimer = 0;

View File

@ -97,12 +97,12 @@ public:
uint8 m_ped_flagA2 : 1; uint8 m_ped_flagA2 : 1;
uint8 m_ped_flagA4 : 1; // stores (CTimer::GetTimeInMilliseconds() < m_lastHitTime) uint8 m_ped_flagA4 : 1; // stores (CTimer::GetTimeInMilliseconds() < m_lastHitTime)
uint8 m_ped_flagA8 : 1; uint8 m_ped_flagA8 : 1;
uint8 bIsLooking : 1; // set when A20 just changed? uint8 bIsLooking : 1;
uint8 m_ped_flagA20_look : 1; uint8 m_ped_flagA20_look : 1; // probably missing in SA
uint8 m_ped_flagA40 : 1; uint8 bIsRestoringLook : 1;
uint8 m_ped_flagA80 : 1; uint8 bIsAimingGun : 1;
uint8 m_ped_flagB1 : 1; uint8 bIsRestoringGun : 1;
uint8 m_ped_flagB2 : 1; uint8 bCanPointGunAtTarget : 1;
uint8 m_ped_flagB4 : 1; uint8 m_ped_flagB4 : 1;
uint8 m_ped_flagB8 : 1; uint8 m_ped_flagB8 : 1;
uint8 m_ped_flagB10 : 1; uint8 m_ped_flagB10 : 1;