mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 12:40:00 +00:00
fixed vehicle and ped sorting for new renderer
This commit is contained in:
parent
244b91ee80
commit
0662de5323
|
@ -818,6 +818,8 @@ CRenderer::RenderVehiclesAndPeds(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
CEntity *e;
|
CEntity *e;
|
||||||
|
EntityInfo ei;
|
||||||
|
CLink<EntityInfo> *node;
|
||||||
|
|
||||||
RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)TRUE);
|
RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)TRUE);
|
||||||
//CVisibilityPlugins::InitAlphaEntityList(); // not safe yet
|
//CVisibilityPlugins::InitAlphaEntityList(); // not safe yet
|
||||||
|
@ -826,9 +828,21 @@ CRenderer::RenderVehiclesAndPeds(void)
|
||||||
for(i = 0; i < ms_nNoOfVisibleVehicles; i++){
|
for(i = 0; i < ms_nNoOfVisibleVehicles; i++){
|
||||||
e = ms_aVisibleVehiclePtrs[i];
|
e = ms_aVisibleVehiclePtrs[i];
|
||||||
if(e->IsVehicle() && PutIntoSortedVehicleList((CVehicle*)e))
|
if(e->IsVehicle() && PutIntoSortedVehicleList((CVehicle*)e))
|
||||||
continue;
|
continue; // boats handled elsewhere
|
||||||
RenderOneNonRoad(e);
|
if(e->IsPed())
|
||||||
|
RenderOneNonRoad(e);
|
||||||
|
else{
|
||||||
|
ei.ent = e;
|
||||||
|
ei.sort = (ms_vecCameraPosition - e->GetPosition()).MagnitudeSqr();
|
||||||
|
gSortedVehiclesAndPeds.InsertSorted(ei);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(node = gSortedVehiclesAndPeds.tail.prev;
|
||||||
|
node != &gSortedVehiclesAndPeds.head;
|
||||||
|
node = node->prev)
|
||||||
|
RenderOneNonRoad(node->item.ent);
|
||||||
|
|
||||||
// RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)FALSE);
|
// RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue