CPopulation 2

This commit is contained in:
eray orçunus
2020-02-18 02:56:13 +03:00
parent 16ea0527dd
commit 090aef7de7
6 changed files with 367 additions and 11 deletions

View File

@@ -41,6 +41,14 @@ CPedPlacement::IsPositionClearOfCars(CVector* pos)
return CWorld::TestSphereAgainstWorld(*pos, 0.25f, nil, true, true, false, false, false, false);
}
bool
CPedPlacement::IsPositionClearForPed(CVector* pos)
{
int16 count;
CWorld::FindObjectsKindaColliding(*pos, 0.75f, true, &count, 2, nil, false, true, true, false, false);
return count == 0;
}
STARTPATCHES
InjectHook(0x4EE340, &CPedPlacement::FindZCoorForPed, PATCH_JUMP);
InjectHook(0x4EE310, &CPedPlacement::IsPositionClearOfCars, PATCH_JUMP);