mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-12-27 02:01:48 +01:00
comments
This commit is contained in:
parent
6a7bd0e330
commit
cda3752838
@ -22,19 +22,18 @@
|
|||||||
|
|
||||||
#define DISTANCE_TO_SWITCH_DISTANCE_GOTO 20.0f
|
#define DISTANCE_TO_SWITCH_DISTANCE_GOTO 20.0f
|
||||||
|
|
||||||
//--MIAMI: done
|
//--MIAMI: file done
|
||||||
|
|
||||||
float CCarAI::FindSwitchDistanceClose(CVehicle* pVehicle)
|
float CCarAI::FindSwitchDistanceClose(CVehicle* pVehicle)
|
||||||
{
|
{
|
||||||
return pVehicle->AutoPilot.m_nSwitchDistance;
|
return pVehicle->AutoPilot.m_nSwitchDistance;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--MIAMI: done
|
|
||||||
float CCarAI::FindSwitchDistanceFarNormalVehicle(CVehicle* pVehicle)
|
float CCarAI::FindSwitchDistanceFarNormalVehicle(CVehicle* pVehicle)
|
||||||
{
|
{
|
||||||
return FindSwitchDistanceClose(pVehicle) + 5.0f;
|
return FindSwitchDistanceClose(pVehicle) + 5.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--MIAMI: done
|
|
||||||
float CCarAI::FindSwitchDistanceFar(CVehicle* pVehicle)
|
float CCarAI::FindSwitchDistanceFar(CVehicle* pVehicle)
|
||||||
{
|
{
|
||||||
if (pVehicle->bIsLawEnforcer)
|
if (pVehicle->bIsLawEnforcer)
|
||||||
@ -42,7 +41,6 @@ float CCarAI::FindSwitchDistanceFar(CVehicle* pVehicle)
|
|||||||
return FindSwitchDistanceFarNormalVehicle(pVehicle);
|
return FindSwitchDistanceFarNormalVehicle(pVehicle);
|
||||||
}
|
}
|
||||||
|
|
||||||
//--MIAMI: done
|
|
||||||
void CCarAI::BackToCruisingIfNoWantedLevel(CVehicle* pVehicle)
|
void CCarAI::BackToCruisingIfNoWantedLevel(CVehicle* pVehicle)
|
||||||
{
|
{
|
||||||
if (FindPlayerPed()->m_pWanted->m_bIgnoredByEveryone || pVehicle->bIsLawEnforcer &&
|
if (FindPlayerPed()->m_pWanted->m_bIgnoredByEveryone || pVehicle->bIsLawEnforcer &&
|
||||||
@ -56,7 +54,6 @@ void CCarAI::BackToCruisingIfNoWantedLevel(CVehicle* pVehicle)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--MIAMI: done
|
|
||||||
void CCarAI::UpdateCarAI(CVehicle* pVehicle)
|
void CCarAI::UpdateCarAI(CVehicle* pVehicle)
|
||||||
{
|
{
|
||||||
if (pVehicle->bIsLawEnforcer){
|
if (pVehicle->bIsLawEnforcer){
|
||||||
@ -507,13 +504,11 @@ void CCarAI::UpdateCarAI(CVehicle* pVehicle)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--MIAMI: done
|
|
||||||
void CCarAI::CarHasReasonToStop(CVehicle* pVehicle)
|
void CCarAI::CarHasReasonToStop(CVehicle* pVehicle)
|
||||||
{
|
{
|
||||||
pVehicle->AutoPilot.m_nAntiReverseTimer = CTimer::GetTimeInMilliseconds();
|
pVehicle->AutoPilot.m_nAntiReverseTimer = CTimer::GetTimeInMilliseconds();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--MIAMI: done
|
|
||||||
float CCarAI::GetCarToGoToCoors(CVehicle* pVehicle, CVector* pTarget)
|
float CCarAI::GetCarToGoToCoors(CVehicle* pVehicle, CVector* pTarget)
|
||||||
{
|
{
|
||||||
if (pVehicle->AutoPilot.m_nCarMission != MISSION_GOTOCOORDS && pVehicle->AutoPilot.m_nCarMission != MISSION_GOTOCOORDS_STRAIGHT){
|
if (pVehicle->AutoPilot.m_nCarMission != MISSION_GOTOCOORDS && pVehicle->AutoPilot.m_nCarMission != MISSION_GOTOCOORDS_STRAIGHT){
|
||||||
@ -531,7 +526,6 @@ float CCarAI::GetCarToGoToCoors(CVehicle* pVehicle, CVector* pTarget)
|
|||||||
return (pVehicle->GetPosition() - *pTarget).Magnitude2D();
|
return (pVehicle->GetPosition() - *pTarget).Magnitude2D();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--MIAMI: done
|
|
||||||
float CCarAI::GetCarToParkAtCoors(CVehicle* pVehicle, CVector* pTarget)
|
float CCarAI::GetCarToParkAtCoors(CVehicle* pVehicle, CVector* pTarget)
|
||||||
{
|
{
|
||||||
GetCarToGoToCoors(pVehicle, pTarget);
|
GetCarToGoToCoors(pVehicle, pTarget);
|
||||||
@ -540,7 +534,6 @@ float CCarAI::GetCarToParkAtCoors(CVehicle* pVehicle, CVector* pTarget)
|
|||||||
return (pVehicle->GetPosition() - *pTarget).Magnitude2D();
|
return (pVehicle->GetPosition() - *pTarget).Magnitude2D();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--MIAMI: TODO: MI_VICECHEE
|
|
||||||
void CCarAI::AddPoliceCarOccupants(CVehicle* pVehicle)
|
void CCarAI::AddPoliceCarOccupants(CVehicle* pVehicle)
|
||||||
{
|
{
|
||||||
if (pVehicle->bOccupantsHaveBeenGenerated)
|
if (pVehicle->bOccupantsHaveBeenGenerated)
|
||||||
@ -577,21 +570,18 @@ void CCarAI::AddPoliceCarOccupants(CVehicle* pVehicle)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--MIAMI: done
|
|
||||||
void CCarAI::AddAmbulanceOccupants(CVehicle* pVehicle)
|
void CCarAI::AddAmbulanceOccupants(CVehicle* pVehicle)
|
||||||
{
|
{
|
||||||
pVehicle->SetUpDriver();
|
pVehicle->SetUpDriver();
|
||||||
pVehicle->SetupPassenger(1);
|
pVehicle->SetupPassenger(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//--MIAMI: done
|
|
||||||
void CCarAI::AddFiretruckOccupants(CVehicle* pVehicle)
|
void CCarAI::AddFiretruckOccupants(CVehicle* pVehicle)
|
||||||
{
|
{
|
||||||
pVehicle->SetUpDriver();
|
pVehicle->SetUpDriver();
|
||||||
pVehicle->SetupPassenger(0);
|
pVehicle->SetupPassenger(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
//--MIAMI: done
|
|
||||||
void CCarAI::TellOccupantsToLeaveCar(CVehicle* pVehicle)
|
void CCarAI::TellOccupantsToLeaveCar(CVehicle* pVehicle)
|
||||||
{
|
{
|
||||||
if (pVehicle->pDriver){
|
if (pVehicle->pDriver){
|
||||||
@ -609,7 +599,6 @@ void CCarAI::TellOccupantsToLeaveCar(CVehicle* pVehicle)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--MIAMI: done
|
|
||||||
void CCarAI::TellOccupantsToFleeCar(CVehicle* pVehicle)
|
void CCarAI::TellOccupantsToFleeCar(CVehicle* pVehicle)
|
||||||
{
|
{
|
||||||
if (pVehicle->pDriver && !pVehicle->pDriver->IsPlayer()) {
|
if (pVehicle->pDriver && !pVehicle->pDriver->IsPlayer()) {
|
||||||
@ -627,7 +616,6 @@ void CCarAI::TellOccupantsToFleeCar(CVehicle* pVehicle)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--MIAMI: done
|
|
||||||
void CCarAI::TellCarToRamOtherCar(CVehicle* pVehicle, CVehicle* pTarget)
|
void CCarAI::TellCarToRamOtherCar(CVehicle* pVehicle, CVehicle* pTarget)
|
||||||
{
|
{
|
||||||
pVehicle->AutoPilot.m_pTargetCar = pTarget;
|
pVehicle->AutoPilot.m_pTargetCar = pTarget;
|
||||||
@ -637,7 +625,6 @@ void CCarAI::TellCarToRamOtherCar(CVehicle* pVehicle, CVehicle* pTarget)
|
|||||||
pVehicle->AutoPilot.m_nCruiseSpeed = Max(6, pVehicle->AutoPilot.m_nCruiseSpeed);
|
pVehicle->AutoPilot.m_nCruiseSpeed = Max(6, pVehicle->AutoPilot.m_nCruiseSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
//--MIAMI: done
|
|
||||||
void CCarAI::TellCarToBlockOtherCar(CVehicle* pVehicle, CVehicle* pTarget)
|
void CCarAI::TellCarToBlockOtherCar(CVehicle* pVehicle, CVehicle* pTarget)
|
||||||
{
|
{
|
||||||
pVehicle->AutoPilot.m_pTargetCar = pTarget;
|
pVehicle->AutoPilot.m_pTargetCar = pTarget;
|
||||||
@ -647,7 +634,6 @@ void CCarAI::TellCarToBlockOtherCar(CVehicle* pVehicle, CVehicle* pTarget)
|
|||||||
pVehicle->AutoPilot.m_nCruiseSpeed = Max(6, pVehicle->AutoPilot.m_nCruiseSpeed);
|
pVehicle->AutoPilot.m_nCruiseSpeed = Max(6, pVehicle->AutoPilot.m_nCruiseSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
//--MIAMI: done
|
|
||||||
eCarMission CCarAI::FindPoliceCarMissionForWantedLevel()
|
eCarMission CCarAI::FindPoliceCarMissionForWantedLevel()
|
||||||
{
|
{
|
||||||
switch (CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted->m_nWantedLevel){
|
switch (CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted->m_nWantedLevel){
|
||||||
@ -662,7 +648,6 @@ eCarMission CCarAI::FindPoliceCarMissionForWantedLevel()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--MIAMI: done
|
|
||||||
eCarMission CCarAI::FindPoliceBoatMissionForWantedLevel()
|
eCarMission CCarAI::FindPoliceBoatMissionForWantedLevel()
|
||||||
{
|
{
|
||||||
switch (CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted->m_nWantedLevel) {
|
switch (CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted->m_nWantedLevel) {
|
||||||
@ -677,7 +662,6 @@ eCarMission CCarAI::FindPoliceBoatMissionForWantedLevel()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--MIAMI: done
|
|
||||||
int32 CCarAI::FindPoliceCarSpeedForWantedLevel(CVehicle* pVehicle)
|
int32 CCarAI::FindPoliceCarSpeedForWantedLevel(CVehicle* pVehicle)
|
||||||
{
|
{
|
||||||
switch (CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted->m_nWantedLevel) {
|
switch (CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted->m_nWantedLevel) {
|
||||||
@ -692,7 +676,6 @@ int32 CCarAI::FindPoliceCarSpeedForWantedLevel(CVehicle* pVehicle)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--MIAMI: done
|
|
||||||
void CCarAI::MellowOutChaseSpeed(CVehicle* pVehicle)
|
void CCarAI::MellowOutChaseSpeed(CVehicle* pVehicle)
|
||||||
{
|
{
|
||||||
if (CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted->m_nWantedLevel == 1){
|
if (CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted->m_nWantedLevel == 1){
|
||||||
@ -737,7 +720,6 @@ void CCarAI::MellowOutChaseSpeed(CVehicle* pVehicle)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--MIAMI: done
|
|
||||||
void CCarAI::MellowOutChaseSpeedBoat(CVehicle* pVehicle)
|
void CCarAI::MellowOutChaseSpeedBoat(CVehicle* pVehicle)
|
||||||
{
|
{
|
||||||
switch (CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted->m_nWantedLevel) {
|
switch (CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted->m_nWantedLevel) {
|
||||||
@ -751,7 +733,6 @@ void CCarAI::MellowOutChaseSpeedBoat(CVehicle* pVehicle)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--MIAMI: done
|
|
||||||
void CCarAI::MakeWayForCarWithSiren(CVehicle *pVehicle)
|
void CCarAI::MakeWayForCarWithSiren(CVehicle *pVehicle)
|
||||||
{
|
{
|
||||||
float flatSpeed = pVehicle->GetMoveSpeed().Magnitude2D();
|
float flatSpeed = pVehicle->GetMoveSpeed().Magnitude2D();
|
||||||
|
@ -105,6 +105,8 @@ int32 CCarCtrl::LoadedCarsArray[TOTAL_CUSTOM_CLASSES][MAX_CAR_MODELS_IN_ARRAY];
|
|||||||
CVehicle* apCarsToKeep[MAX_CARS_TO_KEEP];
|
CVehicle* apCarsToKeep[MAX_CARS_TO_KEEP];
|
||||||
uint32 aCarsToKeepTime[MAX_CARS_TO_KEEP];
|
uint32 aCarsToKeepTime[MAX_CARS_TO_KEEP];
|
||||||
|
|
||||||
|
//--MIAMI: done except heli/plane functions
|
||||||
|
|
||||||
void
|
void
|
||||||
CCarCtrl::GenerateRandomCars()
|
CCarCtrl::GenerateRandomCars()
|
||||||
{
|
{
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
#include "Curves.h"
|
#include "Curves.h"
|
||||||
|
|
||||||
|
//--MIAMI: file done
|
||||||
|
|
||||||
float CCurves::CalcSpeedScaleFactor(CVector* pPoint1, CVector* pPoint2, float dir1X, float dir1Y, float dir2X, float dir2Y)
|
float CCurves::CalcSpeedScaleFactor(CVector* pPoint1, CVector* pPoint2, float dir1X, float dir1Y, float dir2X, float dir2Y)
|
||||||
{
|
{
|
||||||
CVector2D dir1(dir1X, dir1Y);
|
CVector2D dir1(dir1X, dir1Y);
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
#define TIME_BETWEEN_SETPIECE_SPAWNS 20000
|
#define TIME_BETWEEN_SETPIECE_SPAWNS 20000
|
||||||
|
|
||||||
// MIAMI: file done
|
//--MIAMI: file done
|
||||||
|
|
||||||
bool CSetPieces::bDebug;
|
bool CSetPieces::bDebug;
|
||||||
uint32 CSetPieces::NumSetPieces;
|
uint32 CSetPieces::NumSetPieces;
|
||||||
|
Loading…
Reference in New Issue
Block a user