summaryrefslogtreecommitdiffstats
path: root/src/peds/Population.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/peds/Population.cpp')
-rw-r--r--src/peds/Population.cpp13
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