Peds, eSound and PedState enum, fixes

This commit is contained in:
eray orçunus
2020-06-03 16:16:31 +03:00
parent c498af29aa
commit 5dc410a999
26 changed files with 1089 additions and 638 deletions

View File

@@ -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;
}