mirror of
https://github.com/GTAmodding/re3.git
synced 2024-12-25 20:25:41 +00:00
Car entering cancel test
This commit is contained in:
parent
26aed6611e
commit
9b9545b92a
1 changed files with 42 additions and 40 deletions
|
@ -2583,39 +2583,15 @@ CPed::ProcessControl(void)
|
||||||
if (m_nWaitState != WAITSTATE_FALSE)
|
if (m_nWaitState != WAITSTATE_FALSE)
|
||||||
Wait();
|
Wait();
|
||||||
|
|
||||||
switch (m_nPedState) {
|
|
||||||
case PED_IDLE:
|
|
||||||
Idle();
|
|
||||||
break;
|
|
||||||
case PED_LOOK_ENTITY:
|
|
||||||
case PED_LOOK_HEADING:
|
|
||||||
Look();
|
|
||||||
break;
|
|
||||||
case PED_WANDER_RANGE:
|
|
||||||
// III has these in here(and they were unused):
|
|
||||||
/*
|
|
||||||
WanderRange();
|
|
||||||
CheckAroundForPossibleCollisions();
|
|
||||||
*/
|
|
||||||
break;
|
|
||||||
case PED_WANDER_PATH:
|
|
||||||
WanderPath();
|
|
||||||
break;
|
|
||||||
case PED_ENTER_CAR:
|
|
||||||
case PED_CARJACK:
|
|
||||||
{
|
|
||||||
#ifdef CANCELLABLE_CAR_ENTER
|
#ifdef CANCELLABLE_CAR_ENTER
|
||||||
if (!IsPlayer() || !m_pVehicleAnim)
|
static bool cancelJack = false;
|
||||||
break;
|
if (IsPlayer()) {
|
||||||
|
if (EnteringCar() && m_pVehicleAnim) {
|
||||||
CPad *pad = CPad::GetPad(0);
|
CPad *pad = CPad::GetPad(0);
|
||||||
|
|
||||||
if (pad->ArePlayerControlsDisabled())
|
if (!pad->ArePlayerControlsDisabled()) {
|
||||||
break;
|
|
||||||
|
|
||||||
int vehAnim = m_pVehicleAnim->animId;
|
int vehAnim = m_pVehicleAnim->animId;
|
||||||
|
|
||||||
static bool cancelJack = false;
|
|
||||||
int16 padWalkX = pad->GetPedWalkLeftRight();
|
int16 padWalkX = pad->GetPedWalkLeftRight();
|
||||||
int16 padWalkY = pad->GetPedWalkUpDown();
|
int16 padWalkY = pad->GetPedWalkUpDown();
|
||||||
if (Abs(padWalkX) > 0.0f || Abs(padWalkY) > 0.0f) {
|
if (Abs(padWalkX) > 0.0f || Abs(padWalkY) > 0.0f) {
|
||||||
|
@ -2643,7 +2619,33 @@ CPed::ProcessControl(void)
|
||||||
cancelJack = false;
|
cancelJack = false;
|
||||||
bCancelEnteringCar = true;
|
bCancelEnteringCar = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
cancelJack = false;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
switch (m_nPedState) {
|
||||||
|
case PED_IDLE:
|
||||||
|
Idle();
|
||||||
|
break;
|
||||||
|
case PED_LOOK_ENTITY:
|
||||||
|
case PED_LOOK_HEADING:
|
||||||
|
Look();
|
||||||
|
break;
|
||||||
|
case PED_WANDER_RANGE:
|
||||||
|
// III has these in here(and they were unused):
|
||||||
|
/*
|
||||||
|
WanderRange();
|
||||||
|
CheckAroundForPossibleCollisions();
|
||||||
|
*/
|
||||||
|
break;
|
||||||
|
case PED_WANDER_PATH:
|
||||||
|
WanderPath();
|
||||||
|
break;
|
||||||
|
case PED_ENTER_CAR:
|
||||||
|
case PED_CARJACK:
|
||||||
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PED_FLEE_POS:
|
case PED_FLEE_POS:
|
||||||
|
|
Loading…
Reference in a new issue