1
0
Fork 0
mirror of https://github.com/halpz/re3.git synced 2024-12-27 18:25:28 +00:00

some more miami

This commit is contained in:
Nikolay Korolev 2020-05-05 20:22:13 +03:00
parent 6b4b708fa7
commit 918d6dbf56
3 changed files with 29 additions and 4 deletions

View file

@ -146,7 +146,7 @@ void CCarAI::UpdateCarAI(CVehicle* pVehicle)
case MISSION_BLOCKPLAYER_CLOSE: case MISSION_BLOCKPLAYER_CLOSE:
if (FindSwitchDistanceFar(pVehicle) >= (FindPlayerCoors() - pVehicle->GetPosition()).Magnitude2D() || if (FindSwitchDistanceFar(pVehicle) >= (FindPlayerCoors() - pVehicle->GetPosition()).Magnitude2D() ||
pVehicle->AutoPilot.m_bIgnorePathfinding) { pVehicle->AutoPilot.m_bIgnorePathfinding) {
if (FindPlayerVehicle() && FindPlayerVehicle()->GetMoveSpeed().Magnitude() < 0.05f) if (FindPlayerVehicle() && FindPlayerVehicle()->GetMoveSpeed().Magnitude() < 0.04f)
#ifdef FIX_BUGS #ifdef FIX_BUGS
pVehicle->m_nTimeBlocked += CTimer::GetTimeStepInMilliseconds(); pVehicle->m_nTimeBlocked += CTimer::GetTimeStepInMilliseconds();
#else #else
@ -155,7 +155,7 @@ void CCarAI::UpdateCarAI(CVehicle* pVehicle)
else else
pVehicle->m_nTimeBlocked = 0; pVehicle->m_nTimeBlocked = 0;
if (!FindPlayerVehicle() || FindPlayerVehicle()->IsUpsideDown() || if (!FindPlayerVehicle() || FindPlayerVehicle()->IsUpsideDown() ||
FindPlayerVehicle()->GetMoveSpeed().Magnitude() < 0.05f && pVehicle->m_nTimeBlocked > TIME_COPS_WAIT_TO_EXIT_AFTER_STOPPING) { FindPlayerVehicle()->GetMoveSpeed().Magnitude() < 0.04f && pVehicle->m_nTimeBlocked > TIME_COPS_WAIT_TO_EXIT_AFTER_STOPPING) {
if (pVehicle->bIsLawEnforcer && if (pVehicle->bIsLawEnforcer &&
(pVehicle->GetModelIndex() != MI_RHINO || pVehicle->m_randomSeed > 10000) && (pVehicle->GetModelIndex() != MI_RHINO || pVehicle->m_randomSeed > 10000) &&
(FindPlayerCoors() - pVehicle->GetPosition()).Magnitude2D() < 10.0f) { (FindPlayerCoors() - pVehicle->GetPosition()).Magnitude2D() < 10.0f) {

View file

@ -90,14 +90,16 @@ uint32 aCarsToKeepTime[MAX_CARS_TO_KEEP];
void void
CCarCtrl::GenerateRandomCars() CCarCtrl::GenerateRandomCars()
{ {
if (CCutsceneMgr::IsRunning()) if (CCutsceneMgr::IsRunning()) {
CountDownToCarsAtStart = 2;
return; return;
}
if (NumRandomCars < 30){ if (NumRandomCars < 30){
if (CountDownToCarsAtStart == 0){ if (CountDownToCarsAtStart == 0){
GenerateOneRandomCar(); GenerateOneRandomCar();
} }
else if (--CountDownToCarsAtStart == 0) { else if (--CountDownToCarsAtStart == 0) {
for (int i = 0; i < 50; i++) for (int i = 0; i < 100; i++)
GenerateOneRandomCar(); GenerateOneRandomCar();
CTheCarGenerators::GenerateEvenIfPlayerIsCloseCounter = 20; CTheCarGenerators::GenerateEvenIfPlayerIsCloseCounter = 20;
} }

View file

@ -8,6 +8,29 @@ enum eLevelName {
LEVEL_SUBURBAN LEVEL_SUBURBAN
}; };
enum eVisibilityArea
{
VIS_MAIN_MAP = 0,
VIS_HOTEL,
VIS_MANSION,
VIS_BANK,
VIS_MALL,
VIS_STRIP_CLUB,
VIS_LAWYERS,
VIS_COFFEE_SHOP,
VIS_CONCERT_HALL,
VIS_STUDIO,
VIS_RIFLE_RANGE,
VIS_BIKER_BAR,
VIS_POLICE_STATION,
VIS_EVERYWHERE,
VIS_DIRT,
VIS_BLOOD,
VIS_OVALRING,
VIS_MALIBU_CLUB,
VIS_PRINT_WORKS,
};
class CGame class CGame
{ {
public: public: