Car entering cancel test

This commit is contained in:
erorcun 2020-12-21 02:06:00 +03:00
parent 43b4c8dd33
commit 6b33765891

View File

@ -2677,36 +2677,15 @@ CPed::ProcessControl(void)
}
}
switch (m_nPedState) {
case PED_IDLE:
Idle();
break;
case PED_LOOK_ENTITY:
case PED_LOOK_HEADING:
Look();
break;
case PED_WANDER_RANGE:
WanderRange();
CheckAroundForPossibleCollisions();
break;
case PED_WANDER_PATH:
WanderPath();
break;
case PED_ENTER_CAR:
case PED_CARJACK:
{
#ifdef CANCELLABLE_CAR_ENTER
if (!IsPlayer() || !m_pVehicleAnim)
break;
static bool cancelJack = false;
if (IsPlayer()) {
if (EnteringCar() && m_pVehicleAnim) {
CPad *pad = CPad::GetPad(0);
if (pad->ArePlayerControlsDisabled())
break;
if (!pad->ArePlayerControlsDisabled()) {
int vehAnim = m_pVehicleAnim->animId;
static bool cancelJack = false;
int16 padWalkX = pad->GetPedWalkLeftRight();
int16 padWalkY = pad->GetPedWalkUpDown();
if (Abs(padWalkX) > 0.0f || Abs(padWalkY) > 0.0f) {
@ -2734,9 +2713,30 @@ CPed::ProcessControl(void)
cancelJack = false;
bCancelEnteringCar = true;
}
#endif
break;
}
} else
cancelJack = false;
}
#endif
switch (m_nPedState) {
case PED_IDLE:
Idle();
break;
case PED_LOOK_ENTITY:
case PED_LOOK_HEADING:
Look();
break;
case PED_WANDER_RANGE:
WanderRange();
CheckAroundForPossibleCollisions();
break;
case PED_WANDER_PATH:
WanderPath();
break;
case PED_ENTER_CAR:
case PED_CARJACK:
break;
case PED_FLEE_POS:
ms_vec2DFleePosition.x = m_fleeFromPosX;
ms_vec2DFleePosition.y = m_fleeFromPosY;