mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 16:20:01 +00:00
Attractor obj. fixes
This commit is contained in:
parent
ab071163e5
commit
1b59b2c9bc
|
@ -15403,17 +15403,17 @@ CPed::ProcessObjective(void)
|
||||||
CVector distance = m_nextRoutePointPos - GetPosition();
|
CVector distance = m_nextRoutePointPos - GetPosition();
|
||||||
distance.z = 0.0f;
|
distance.z = 0.0f;
|
||||||
if (m_objective == OBJECTIVE_GOTO_SHELTER_ON_FOOT) {
|
if (m_objective == OBJECTIVE_GOTO_SHELTER_ON_FOOT) {
|
||||||
if (m_nMoveState == PEDMOVE_SPRINT && distance.Magnitude() < SQR(2.0f)) {
|
if (m_nMoveState == PEDMOVE_RUN && distance.Magnitude() < SQR(2.0f)) {
|
||||||
SetMoveState(PEDMOVE_WALK);
|
SetMoveState(PEDMOVE_WALK);
|
||||||
bIsRunning = false;
|
bIsRunning = false;
|
||||||
}
|
}
|
||||||
else if (CWeather::Rain < 0.2f && m_attractor) {
|
if (CWeather::Rain < 0.2f && m_attractor) {
|
||||||
GetPedAttractorManager()->DeRegisterPed(this, m_attractor);
|
GetPedAttractorManager()->DeRegisterPed(this, m_attractor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (m_objective == OBJECTIVE_GOTO_ICE_CREAM_VAN_ON_FOOT) {
|
else if (m_objective == OBJECTIVE_GOTO_ICE_CREAM_VAN_ON_FOOT) {
|
||||||
if (m_nMoveState == PEDMOVE_SPRINT && distance.Magnitude() < SQR(4.0f)) {
|
if (m_nMoveState == PEDMOVE_RUN && distance.Magnitude() < SQR(4.0f)) {
|
||||||
SetMoveState(PEDMOVE_WALK);
|
SetMoveState(PEDMOVE_WALK);
|
||||||
bIsRunning = false;
|
bIsRunning = false;
|
||||||
}
|
}
|
||||||
|
@ -15439,8 +15439,10 @@ CPed::ProcessObjective(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sq(m_distanceToCountSeekDone) < distance.MagnitudeSqr()) {
|
if (sq(m_distanceToCountSeekDone) < distance.MagnitudeSqr()) {
|
||||||
if (CTimer::GetTimeInMilliseconds() > m_nPedStateTimer || GetPedState() != PED_SEEK_POS)
|
if (CTimer::GetTimeInMilliseconds() > m_nPedStateTimer || GetPedState() != PED_SEEK_POS) {
|
||||||
|
m_vecSeekPos = m_nextRoutePointPos;
|
||||||
SetSeek(m_vecSeekPos, m_distanceToCountSeekDone);
|
SetSeek(m_vecSeekPos, m_distanceToCountSeekDone);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!bReachedAttractorHeadingTarget) {
|
if (!bReachedAttractorHeadingTarget) {
|
||||||
|
@ -15510,6 +15512,10 @@ CPed::ProcessObjective(void)
|
||||||
SetObjective(OBJECTIVE_WAIT_ON_FOOT_AT_ICE_CREAM_VAN);
|
SetObjective(OBJECTIVE_WAIT_ON_FOOT_AT_ICE_CREAM_VAN);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
m_prevObjective = OBJECTIVE_NONE;
|
||||||
|
SetObjective(OBJECTIVE_WAIT_ON_FOOT);
|
||||||
|
m_objectiveTimer = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15693,11 +15699,11 @@ CPed::ProcessObjective(void)
|
||||||
}
|
}
|
||||||
if (!pVan->m_bSirenOrAlarm) {
|
if (!pVan->m_bSirenOrAlarm) {
|
||||||
GetPedAttractorManager()->DeRegisterPed(this, m_attractor);
|
GetPedAttractorManager()->DeRegisterPed(this, m_attractor);
|
||||||
return; // ???
|
return; // Why?
|
||||||
}
|
}
|
||||||
if (pVan->GetStatus() == STATUS_WRECKED) {
|
if (pVan->GetStatus() == STATUS_WRECKED) {
|
||||||
GetPedAttractorManager()->DeRegisterPed(this, m_attractor);
|
GetPedAttractorManager()->DeRegisterPed(this, m_attractor);
|
||||||
return; // ???
|
return; // Why?
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue