Reorganize CPed functions into their original cpp files

This commit is contained in:
Sergeanur 2020-11-19 21:12:20 +02:00
parent a0a8bb8d92
commit 9e45feb4fa
15 changed files with 14349 additions and 14340 deletions

View file

@ -848,6 +848,37 @@ CRenderer::RequestObjectsInFrustum(void)
}
}
bool
CPed::SetupLighting(void)
{
ActivateDirectional();
SetAmbientColoursForPedsCarsAndObjects();
#ifndef MASTER
// Originally this was being called through iteration of Sectors, but putting it here is better.
if (GetDebugDisplay() != 0 && !IsPlayer())
DebugRenderOnePedText();
#endif
if (bRenderScorched) {
WorldReplaceNormalLightsWithScorched(Scene.world, 0.1f);
} else {
// Note that this lightMult is only affected by LIGHT_DARKEN. If there's no LIGHT_DARKEN, it will be 1.0.
float lightMult = CPointLights::GenerateLightsAffectingObject(&GetPosition());
if (!bHasBlip && lightMult != 1.0f) {
SetAmbientAndDirectionalColours(lightMult);
return true;
}
}
return false;
}
void
CPed::RemoveLighting(bool reset)
{
CRenderer::RemoveVehiclePedLights(this, reset);
}
float
CalcNewDelta(RwV2d *a, RwV2d *b)
{