This commit is contained in:
aap
2020-05-24 15:14:27 +02:00
parent 8705562559
commit 7bf8337854
33 changed files with 1448 additions and 438 deletions

View File

@ -913,7 +913,7 @@ CCarCtrl::RemoveDistantCars()
PossiblyRemoveVehicle(pVehicle);
if (pVehicle->bCreateRoadBlockPeds){
if ((pVehicle->GetPosition() - FindPlayerCentreOfWorld(CWorld::PlayerInFocus)).Magnitude2D() < DISTANCE_TO_SPAWN_ROADBLOCK_PEDS) {
CRoadBlocks::GenerateRoadBlockCopsForCar(pVehicle, pVehicle->m_nRoadblockType, pVehicle->m_nRoadblockNode);
CRoadBlocks::GenerateRoadBlockCopsForCar(pVehicle, pVehicle->m_nRoadblockType);
pVehicle->bCreateRoadBlockPeds = false;
}
}

View File

@ -47,7 +47,7 @@ CRoadBlocks::Init(void)
}
void
CRoadBlocks::GenerateRoadBlockCopsForCar(CVehicle* pVehicle, int32 roadBlockType, int16 roadBlockNode)
CRoadBlocks::GenerateRoadBlockCopsForCar(CVehicle* pVehicle, int32 roadBlockType)
{
static const CVector vecRoadBlockOffets[6] = { {-1.5, 1.8f, 0.0f}, {-1.5f, -1.8f, 0.0f}, {1.5f, 1.8f, 0.0f},
{1.5f, -1.8f, 0.0f}, {-1.5f, 0.0f, 0.0f}, {1.5, 0.0, 0.0} };
@ -90,7 +90,7 @@ CRoadBlocks::GenerateRoadBlockCopsForCar(CVehicle* pVehicle, int32 roadBlockType
pCopPed->SetIdle();
pCopPed->bKindaStayInSamePlace = true;
pCopPed->bNotAllowedToDuck = false;
pCopPed->m_nRoadblockNode = roadBlockNode;
// pCopPed->m_nRoadblockNode = roadBlockNode;
pCopPed->bCrouchWhenShooting = roadBlockType != 2;
if (pEntityToAttack) {
pCopPed->m_pPointGunAt = pEntityToAttack;

View File

@ -15,6 +15,6 @@ public:
static bool InOrOut[NUMROADBLOCKS];
static void Init(void);
static void GenerateRoadBlockCopsForCar(CVehicle* pVehicle, int32 roadBlockType, int16 roadBlockNode);
static void GenerateRoadBlockCopsForCar(CVehicle* pVehicle, int32 roadBlockType);
static void GenerateRoadBlocks(void);
};

View File

@ -10943,10 +10943,10 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command)
ScriptParams[1] = 0;
else if (ScriptParams[1] == 3)
ScriptParams[1] = 1;
pVehicle->BurstTyre(ScriptParams[1]); // TODO(MIAMI): second param is true
pVehicle->BurstTyre(ScriptParams[1], true);
}
else {
pVehicle->BurstTyre(ScriptParams[1]); // TODO(MIAMI): second param is true
pVehicle->BurstTyre(ScriptParams[1], true);
}
return 0;
}

View File

@ -108,6 +108,7 @@ CTrafficLights::DisplayActualLight(CEntity *ent)
CBrightLights::RegisterOne(pos1, ent->GetUp(), ent->GetRight(), CVector(0.0f, 0.0f, 0.0f), id + BRIGHTLIGHT_TRAFFIC_GREEN);
CBrightLights::RegisterOne(pos2, ent->GetUp(), -ent->GetRight(), CVector(0.0f, 0.0f, 0.0f), id + BRIGHTLIGHT_TRAFFIC_GREEN);
/*
static const float top = -0.127f;
static const float bot = -0.539f;
static const float mid = bot + (top-bot)/3.0f;
@ -131,6 +132,7 @@ CTrafficLights::DisplayActualLight(CEntity *ent)
1.0f, 0.5f, 0.0f, 0.5f, 1.0f, 1.0f, 0.0f, 1.0f,
SHINYTEXT_WALK, 255, 255, 255, 60.0f);
}
*/
}
void