mirror of
https://github.com/halpz/re3.git
synced 2025-06-29 17:26:21 +00:00
Credits & fixes
This commit is contained in:
@ -1869,6 +1869,13 @@ CPathFind::TakeWidthIntoAccountForWandering(CPathNode* nextNode, uint16 random)
|
||||
return CVector(newX, newY, pos.z);
|
||||
}
|
||||
|
||||
void
|
||||
CPathFind::TakeWidthIntoAccountForCoors(CPathNode* node1, CPathNode* node2, uint16 random, float* x, float* y)
|
||||
{
|
||||
*x += (Min(node1->width, node2->width) * ((random % 16) - 7));
|
||||
*y += (Min(node1->width, node2->width) * (((random / 16) % 16) - 7));
|
||||
}
|
||||
|
||||
CPathNode*
|
||||
CPathFind::GetNode(int16 index)
|
||||
{
|
||||
|
@ -255,6 +255,7 @@ public:
|
||||
void Load(uint8 *buf, uint32 size);
|
||||
|
||||
static CVector TakeWidthIntoAccountForWandering(CPathNode*, uint16);
|
||||
static void TakeWidthIntoAccountForCoors(CPathNode*, CPathNode*, uint16, float*, float*);
|
||||
|
||||
CPathNode *GetNode(int16 index);
|
||||
int16 GetIndex(CPathNode *node);
|
||||
|
@ -92,10 +92,16 @@ CRoadBlocks::GenerateRoadBlockCopsForCar(CVehicle* pVehicle, int32 roadBlockType
|
||||
pCopPed->SetIdle();
|
||||
pCopPed->bKindaStayInSamePlace = true;
|
||||
pCopPed->bNotAllowedToDuck = false;
|
||||
pCopPed->bCrouchWhenShooting = roadBlockType != 2;
|
||||
pCopPed->m_nExtendedRangeTimer = CTimer::GetTimeInMilliseconds() + 10000;
|
||||
pCopPed->m_nRoadblockVeh = pVehicle;
|
||||
pCopPed->m_nRoadblockVeh->RegisterReference((CEntity**)&pCopPed->m_nRoadblockVeh);
|
||||
pCopPed->bCrouchWhenShooting = roadBlockType == 2 ? false : true;
|
||||
if (pEntityToAttack) {
|
||||
if (pCopPed->m_pPointGunAt)
|
||||
pCopPed->m_pPointGunAt->CleanUpOldReference(&pCopPed->m_pPointGunAt);
|
||||
pCopPed->m_pPointGunAt = pEntityToAttack;
|
||||
pEntityToAttack->RegisterReference(&pCopPed->m_pPointGunAt);
|
||||
if (pEntityToAttack)
|
||||
pEntityToAttack->RegisterReference(&pCopPed->m_pPointGunAt);
|
||||
pCopPed->SetAttack(pEntityToAttack);
|
||||
}
|
||||
pCopPed->m_pMyVehicle = pVehicle;
|
||||
|
Reference in New Issue
Block a user