mirror of
https://github.com/GTAmodding/re3.git
synced 2024-12-25 07: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)
|
||||
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
|
||||
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) {
|
||||
|
@ -2643,7 +2619,33 @@ CPed::ProcessControl(void)
|
|||
cancelJack = false;
|
||||
bCancelEnteringCar = true;
|
||||
}
|
||||
}
|
||||
} 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:
|
||||
// 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;
|
||||
}
|
||||
case PED_FLEE_POS:
|
||||
|
|
Loading…
Reference in a new issue