diff options
author | eray orçunus <erayorcunus@gmail.com> | 2020-06-03 15:16:31 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2020-06-03 16:01:11 +0200 |
commit | 5dc410a999f02f1e90c991c9de617bb2b1dc6bbc (patch) | |
tree | 4ad32e600c365326d721db8d3d6359e7b4d7f00d /src/peds/Population.cpp | |
parent | get rid of III code (diff) | |
download | re3-5dc410a999f02f1e90c991c9de617bb2b1dc6bbc.tar re3-5dc410a999f02f1e90c991c9de617bb2b1dc6bbc.tar.gz re3-5dc410a999f02f1e90c991c9de617bb2b1dc6bbc.tar.bz2 re3-5dc410a999f02f1e90c991c9de617bb2b1dc6bbc.tar.lz re3-5dc410a999f02f1e90c991c9de617bb2b1dc6bbc.tar.xz re3-5dc410a999f02f1e90c991c9de617bb2b1dc6bbc.tar.zst re3-5dc410a999f02f1e90c991c9de617bb2b1dc6bbc.zip |
Diffstat (limited to '')
-rw-r--r-- | src/peds/Population.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp index 40ceb6c3..ca530494 100644 --- a/src/peds/Population.cpp +++ b/src/peds/Population.cpp @@ -22,6 +22,7 @@ #include "DummyObject.h" #include "Script.h" #include "Shadows.h" +#include "SurfaceTable.h" #define MIN_CREATION_DIST 40.0f // not for start of the game (look at the GeneratePedsAtStartOfGame) #define CREATION_RANGE 10.0f // added over the MIN_CREATION_DIST. @@ -1101,3 +1102,15 @@ CPopulation::AddDeadPedInFrontOfCar(const CVector& pos, CVehicle* pCulprit) CVisibilityPlugins::SetClumpAlpha(pPed->GetClump(), 0); return pPed; } + +bool +CPopulation::IsSkateable(CVector const& pos) +{ + CColPoint foundCol; + CEntity* foundEnt = nil; + CWorld::ProcessVerticalLine(pos + CVector(0.f, 0.f, 2.f), pos.z - 2.0f, foundCol, foundEnt, true, false, false, false, false, false, nil); + if (!foundEnt) + return false; + + return foundCol.surfaceB == SURFACE_TARMAC || foundCol.surfaceB == SURFACE_PAVEMENT; +}
\ No newline at end of file |