mirror of
https://github.com/halpz/re3.git
synced 2025-07-03 07:10:43 +00:00
Bettah car enter canceling, fix CFO crash, ped objs. renaming
This commit is contained in:
@ -509,14 +509,14 @@ void CCarAI::AddFiretruckOccupants(CVehicle* pVehicle)
|
||||
void CCarAI::TellOccupantsToLeaveCar(CVehicle* pVehicle)
|
||||
{
|
||||
if (pVehicle->pDriver){
|
||||
pVehicle->pDriver->SetObjective(OBJECTIVE_LEAVE_VEHICLE, pVehicle);
|
||||
pVehicle->pDriver->SetObjective(OBJECTIVE_LEAVE_CAR, pVehicle);
|
||||
if (pVehicle->GetModelIndex() == MI_AMBULAN)
|
||||
pVehicle->pDriver->Say(SOUND_PED_LEAVE_VEHICLE);
|
||||
}
|
||||
int timer = 100;
|
||||
for (int i = 0; i < pVehicle->m_nNumMaxPassengers; i++){
|
||||
if (pVehicle->pPassengers[i]) {
|
||||
pVehicle->pPassengers[i]->SetObjective(OBJECTIVE_LEAVE_VEHICLE, pVehicle);
|
||||
pVehicle->pPassengers[i]->SetObjective(OBJECTIVE_LEAVE_CAR, pVehicle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1175,7 +1175,7 @@ bool CGarage::IsStaticPlayerCarEntirelyInside()
|
||||
return false;
|
||||
if (FindPlayerPed()->GetPedState() != PED_DRIVING)
|
||||
return false;
|
||||
if (FindPlayerPed()->m_objective == OBJECTIVE_LEAVE_VEHICLE)
|
||||
if (FindPlayerPed()->m_objective == OBJECTIVE_LEAVE_CAR)
|
||||
return false;
|
||||
CVehicle* pVehicle = FindPlayerVehicle();
|
||||
if (pVehicle->GetPosition().x < m_fX1 || pVehicle->GetPosition().x > m_fX2 ||
|
||||
|
@ -39,7 +39,7 @@ CPed* crimeReporters[NUMPHONES] = {};
|
||||
bool
|
||||
isPhoneAvailable(int m_phoneId)
|
||||
{
|
||||
return crimeReporters[m_phoneId] == nil || !crimeReporters[m_phoneId]->IsPointerValid() || crimeReporters[m_phoneId]->m_objective > OBJECTIVE_IDLE ||
|
||||
return crimeReporters[m_phoneId] == nil || !crimeReporters[m_phoneId]->IsPointerValid() || crimeReporters[m_phoneId]->m_objective > OBJECTIVE_WAIT_ON_FOOT ||
|
||||
crimeReporters[m_phoneId]->m_nLastPedState != PED_SEEK_POS &&
|
||||
(crimeReporters[m_phoneId]->m_nPedState != PED_MAKE_CALL && crimeReporters[m_phoneId]->m_nPedState != PED_FACE_PHONE && crimeReporters[m_phoneId]->m_nPedState != PED_SEEK_POS);
|
||||
}
|
||||
|
@ -631,7 +631,7 @@ void CSceneEdit::ProcessCommand(void)
|
||||
SelectActor();
|
||||
if (m_bActorSelected) {
|
||||
if (pActors[m_nActor]->bInVehicle) {
|
||||
pActors[m_nActor]->SetObjective(OBJECTIVE_LEAVE_VEHICLE);
|
||||
pActors[m_nActor]->SetObjective(OBJECTIVE_LEAVE_CAR);
|
||||
Movie[m_nNumMovieCommands].m_nCommandId = MOVIE_GET_OUT_CAR;
|
||||
Movie[m_nNumMovieCommands++].m_nActorId = m_nActor;
|
||||
}
|
||||
@ -695,7 +695,7 @@ void CSceneEdit::ProcessCommand(void)
|
||||
case MOVIE_WAIT:
|
||||
SelectActor();
|
||||
if (m_bActorSelected) {
|
||||
pActors[m_nActor]->SetObjective(OBJECTIVE_IDLE);
|
||||
pActors[m_nActor]->SetObjective(OBJECTIVE_WAIT_ON_FOOT);
|
||||
Movie[m_nNumMovieCommands].m_nCommandId = MOVIE_WAIT;
|
||||
Movie[m_nNumMovieCommands++].m_nActorId = m_nActor;
|
||||
}
|
||||
@ -876,7 +876,7 @@ void CSceneEdit::PlayBack(void)
|
||||
case MOVIE_GET_OUT_CAR:
|
||||
m_nActor = Movie[m_nCurrentMovieCommand].m_nActorId;
|
||||
if (pActors[m_nActor]->bInVehicle)
|
||||
pActors[m_nActor]->SetObjective(OBJECTIVE_LEAVE_VEHICLE);
|
||||
pActors[m_nActor]->SetObjective(OBJECTIVE_LEAVE_CAR);
|
||||
else
|
||||
++m_nCurrentMovieCommand;
|
||||
break;
|
||||
@ -895,7 +895,7 @@ void CSceneEdit::PlayBack(void)
|
||||
break;
|
||||
case MOVIE_WAIT:
|
||||
m_nActor = Movie[m_nCurrentMovieCommand].m_nActorId;
|
||||
pActors[m_nActor]->SetObjective(OBJECTIVE_IDLE);
|
||||
pActors[m_nActor]->SetObjective(OBJECTIVE_WAIT_ON_FOOT);
|
||||
++m_nCurrentMovieCommand;
|
||||
break;
|
||||
case MOVIE_POSITION_CAMERA:
|
||||
|
@ -3326,7 +3326,7 @@ int8 CRunningScript::ProcessCommands100To199(int32 command)
|
||||
CPed* ped = CPools::GetPedPool()->GetAt(ScriptParams[0]);
|
||||
script_assert(ped);
|
||||
ped->bScriptObjectiveCompleted = false;
|
||||
ped->SetObjective(OBJECTIVE_IDLE);
|
||||
ped->SetObjective(OBJECTIVE_WAIT_ON_FOOT);
|
||||
return 0;
|
||||
}
|
||||
case COMMAND_GET_CHAR_COORDINATES:
|
||||
@ -5128,7 +5128,7 @@ int8 CRunningScript::ProcessCommands400To499(int32 command)
|
||||
CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]);
|
||||
script_assert(pPed);
|
||||
pPed->bScriptObjectiveCompleted = false;
|
||||
pPed->SetObjective(OBJECTIVE_IDLE);
|
||||
pPed->SetObjective(OBJECTIVE_WAIT_ON_FOOT);
|
||||
return 0;
|
||||
}
|
||||
case COMMAND_SET_CHAR_OBJ_FLEE_ON_FOOT_TILL_SAFE:
|
||||
@ -5620,7 +5620,7 @@ int8 CRunningScript::ProcessCommands400To499(int32 command)
|
||||
script_assert(pPed);
|
||||
CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[1]);
|
||||
pPed->bScriptObjectiveCompleted = false;
|
||||
pPed->SetObjective(OBJECTIVE_LEAVE_VEHICLE, pVehicle);
|
||||
pPed->SetObjective(OBJECTIVE_LEAVE_CAR, pVehicle);
|
||||
return 0;
|
||||
}
|
||||
case COMMAND_SET_CHAR_OBJ_ENTER_CAR_AS_PASSENGER:
|
||||
@ -7823,7 +7823,7 @@ int8 CRunningScript::ProcessCommands700To799(int32 command)
|
||||
script_assert(pPed);
|
||||
CPed* pTargetPed = CPools::GetPedPool()->GetAt(ScriptParams[1]);
|
||||
pPed->bScriptObjectiveCompleted = false;
|
||||
pPed->SetObjective(OBJECTIVE_FOLLOW_PED_IN_FORMATION, pTargetPed);
|
||||
pPed->SetObjective(OBJECTIVE_FOLLOW_CHAR_IN_FORMATION, pTargetPed);
|
||||
pPed->SetFormation((eFormation)ScriptParams[2]);
|
||||
return 0;
|
||||
}
|
||||
@ -10870,13 +10870,13 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command)
|
||||
script_assert(pVehicle);
|
||||
if (pVehicle->pDriver) {
|
||||
pVehicle->pDriver->bScriptObjectiveCompleted = false;
|
||||
pVehicle->pDriver->SetObjective(OBJECTIVE_LEAVE_VEHICLE, pVehicle);
|
||||
pVehicle->pDriver->SetObjective(OBJECTIVE_LEAVE_CAR, pVehicle);
|
||||
}
|
||||
for (int i = 0; i < ARRAY_SIZE(pVehicle->pPassengers); i++)
|
||||
{
|
||||
if (pVehicle->pPassengers[i]) {
|
||||
pVehicle->pPassengers[i]->bScriptObjectiveCompleted = false;
|
||||
pVehicle->pPassengers[i]->SetObjective(OBJECTIVE_LEAVE_VEHICLE, pVehicle);
|
||||
pVehicle->pPassengers[i]->SetObjective(OBJECTIVE_LEAVE_CAR, pVehicle);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
@ -13100,7 +13100,7 @@ void CTheScripts::CleanUpThisPed(CPed* pPed)
|
||||
}
|
||||
else {
|
||||
if (pPed->m_pMyVehicle->m_vehType == VEHICLE_TYPE_CAR) {
|
||||
pPed->SetObjective(OBJECTIVE_LEAVE_VEHICLE, pPed->m_pMyVehicle);
|
||||
pPed->SetObjective(OBJECTIVE_LEAVE_CAR, pPed->m_pMyVehicle);
|
||||
pPed->bWanderPathAfterExitingCar = true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user