This commit is contained in:
eray orçunus 2020-02-13 23:34:36 +03:00
parent 79af843ae7
commit 89be27734b
3 changed files with 13 additions and 13 deletions

View file

@ -4534,7 +4534,7 @@ CPed::SetEvasiveDive(CPhysical *reason, uint8 onlyRandomJump)
} }
} else { } else {
if (IsPlayer()) { if (IsPlayer()) {
((CPlayerPed*)this)->m_bShouldEvade = 5; ((CPlayerPed*)this)->m_nEvadeAmount = 5;
((CPlayerPed*)this)->m_pEvadingFrom = reason; ((CPlayerPed*)this)->m_pEvadingFrom = reason;
reason->RegisterReference((CEntity**) &((CPlayerPed*)this)->m_pEvadingFrom); reason->RegisterReference((CEntity**) &((CPlayerPed*)this)->m_pEvadingFrom);
return; return;

View file

@ -36,7 +36,7 @@ CPlayerPed::CPlayerPed(void) : CPed(PEDTYPE_PLAYER1)
m_fMaxStamina = 150.0f; m_fMaxStamina = 150.0f;
m_fCurrentStamina = m_fMaxStamina; m_fCurrentStamina = m_fMaxStamina;
m_fStaminaProgress = 0.0f; m_fStaminaProgress = 0.0f;
m_bShouldEvade = false; m_nEvadeAmount = 0;
field_1367 = 0; field_1367 = 0;
m_nShotDelay = 0; m_nShotDelay = 0;
field_1376 = 0.0f; field_1376 = 0.0f;
@ -230,7 +230,7 @@ CPlayerPed::SetInitialState(void)
m_animGroup = ASSOCGRP_PLAYER; m_animGroup = ASSOCGRP_PLAYER;
m_fMoveSpeed = 0.0f; m_fMoveSpeed = 0.0f;
m_nSelectedWepSlot = WEAPONTYPE_UNARMED; m_nSelectedWepSlot = WEAPONTYPE_UNARMED;
m_bShouldEvade = false; m_nEvadeAmount = 0;
m_pEvadingFrom = nil; m_pEvadingFrom = nil;
bIsPedDieAnimPlaying = false; bIsPedDieAnimPlaying = false;
SetRealMoveAnim(); SetRealMoveAnim();
@ -661,9 +661,9 @@ CPlayerPed::PlayerControlFighter(CPad *padUsed)
} }
if (!CWeaponInfo::GetWeaponInfo(GetWeapon()->m_eWeaponType)->m_bHeavy && padUsed->JumpJustDown()) { if (!CWeaponInfo::GetWeaponInfo(GetWeapon()->m_eWeaponType)->m_bHeavy && padUsed->JumpJustDown()) {
if (m_bShouldEvade && m_pEvadingFrom) { if (m_nEvadeAmount != 0 && m_pEvadingFrom) {
SetEvasiveDive((CPhysical*)m_pEvadingFrom, 1); SetEvasiveDive((CPhysical*)m_pEvadingFrom, 1);
m_bShouldEvade = false; m_nEvadeAmount = 0;
m_pEvadingFrom = nil; m_pEvadingFrom = nil;
} else { } else {
SetJump(); SetJump();
@ -710,9 +710,9 @@ CPlayerPed::PlayerControl1stPersonRunAround(CPad *padUsed)
&& padUsed->JumpJustDown() && m_nPedState != PED_JUMP) { && padUsed->JumpJustDown() && m_nPedState != PED_JUMP) {
ClearAttack(); ClearAttack();
ClearWeaponTarget(); ClearWeaponTarget();
if (m_bShouldEvade && m_pEvadingFrom) { if (m_nEvadeAmount != 0 && m_pEvadingFrom) {
SetEvasiveDive((CPhysical*)m_pEvadingFrom, 1); SetEvasiveDive((CPhysical*)m_pEvadingFrom, 1);
m_bShouldEvade = false; m_nEvadeAmount = 0;
m_pEvadingFrom = nil; m_pEvadingFrom = nil;
} else { } else {
SetJump(); SetJump();
@ -1129,9 +1129,9 @@ CPlayerPed::PlayerControlZelda(CPad *padUsed)
&& padUsed->JumpJustDown() && m_nPedState != PED_JUMP) { && padUsed->JumpJustDown() && m_nPedState != PED_JUMP) {
ClearAttack(); ClearAttack();
ClearWeaponTarget(); ClearWeaponTarget();
if (m_bShouldEvade && m_pEvadingFrom) { if (m_nEvadeAmount != 0 && m_pEvadingFrom) {
SetEvasiveDive((CPhysical*)m_pEvadingFrom, 1); SetEvasiveDive((CPhysical*)m_pEvadingFrom, 1);
m_bShouldEvade = false; m_nEvadeAmount = 0;
m_pEvadingFrom = nil; m_pEvadingFrom = nil;
} else { } else {
SetJump(); SetJump();
@ -1142,10 +1142,10 @@ CPlayerPed::PlayerControlZelda(CPad *padUsed)
void void
CPlayerPed::ProcessControl(void) CPlayerPed::ProcessControl(void)
{ {
if (m_bShouldEvade) if (m_nEvadeAmount != 0)
m_bShouldEvade = false; //--m_bShouldEvade; --m_nEvadeAmount;
if (!m_bShouldEvade) if (m_nEvadeAmount == 0)
m_pEvadingFrom = nil; m_pEvadingFrom = nil;
if (m_pCurrentPhysSurface && m_pCurrentPhysSurface->IsVehicle() && ((CVehicle*)m_pCurrentPhysSurface)->IsBoat()) { if (m_pCurrentPhysSurface && m_pCurrentPhysSurface->IsVehicle() && ((CVehicle*)m_pCurrentPhysSurface)->IsBoat()) {

View file

@ -15,7 +15,7 @@ public:
float m_fStaminaProgress; float m_fStaminaProgress;
int8 m_nSelectedWepSlot; // eWeaponType int8 m_nSelectedWepSlot; // eWeaponType
bool m_bSpeedTimerFlag; bool m_bSpeedTimerFlag;
bool m_bShouldEvade; uint8 m_nEvadeAmount;
int8 field_1367; int8 field_1367;
uint32 m_nSpeedTimer; uint32 m_nSpeedTimer;
int32 m_nShotDelay; int32 m_nShotDelay;