mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-11-18 04:37:45 +00:00
fixed boat rendering
This commit is contained in:
parent
738bde1c15
commit
936a8e8351
|
@ -222,16 +222,16 @@ CRenderer::RenderEverythingBarRoads(void)
|
||||||
if(e->IsVehicle() ||
|
if(e->IsVehicle() ||
|
||||||
e->IsPed() && CVisibilityPlugins::GetClumpAlpha((RpClump*)e->m_rwObject) != 255){
|
e->IsPed() && CVisibilityPlugins::GetClumpAlpha((RpClump*)e->m_rwObject) != 255){
|
||||||
if(e->IsVehicle() && ((CVehicle*)e)->IsBoat()){
|
if(e->IsVehicle() && ((CVehicle*)e)->IsBoat()){
|
||||||
|
ei.ent = e;
|
||||||
|
dist = ms_vecCameraPosition - e->GetPosition();
|
||||||
|
ei.sort = dist.MagnitudeSqr();
|
||||||
|
gSortedVehiclesAndPeds.InsertSorted(ei);
|
||||||
|
}else{
|
||||||
dist = ms_vecCameraPosition - e->GetPosition();
|
dist = ms_vecCameraPosition - e->GetPosition();
|
||||||
if(!CVisibilityPlugins::InsertEntityIntoSortedList(e, dist.Magnitude())){
|
if(!CVisibilityPlugins::InsertEntityIntoSortedList(e, dist.Magnitude())){
|
||||||
printf("Ran out of space in alpha entity list");
|
printf("Ran out of space in alpha entity list");
|
||||||
RenderOneNonRoad(e);
|
RenderOneNonRoad(e);
|
||||||
}
|
}
|
||||||
}else{
|
|
||||||
ei.ent = e;
|
|
||||||
dist = ms_vecCameraPosition - e->GetPosition();
|
|
||||||
ei.sort = dist.MagnitudeSqr();
|
|
||||||
gSortedVehiclesAndPeds.InsertSorted(ei);
|
|
||||||
}
|
}
|
||||||
}else
|
}else
|
||||||
RenderOneNonRoad(e);
|
RenderOneNonRoad(e);
|
||||||
|
@ -241,15 +241,17 @@ CRenderer::RenderEverythingBarRoads(void)
|
||||||
void
|
void
|
||||||
CRenderer::RenderVehiclesButNotBoats(void)
|
CRenderer::RenderVehiclesButNotBoats(void)
|
||||||
{
|
{
|
||||||
|
// This function doesn't do anything
|
||||||
|
// because only boats are inserted into the list
|
||||||
CLink<EntityInfo> *node;
|
CLink<EntityInfo> *node;
|
||||||
|
|
||||||
for(node = gSortedVehiclesAndPeds.tail.prev;
|
for(node = gSortedVehiclesAndPeds.tail.prev;
|
||||||
node != &gSortedVehiclesAndPeds.head;
|
node != &gSortedVehiclesAndPeds.head;
|
||||||
node = node->prev){
|
node = node->prev){
|
||||||
|
// only boats in this list
|
||||||
CVehicle *v = (CVehicle*)node->item.ent;
|
CVehicle *v = (CVehicle*)node->item.ent;
|
||||||
if(v->IsVehicle() && v->IsBoat()) // BUG: IsVehicle missing in III
|
if(!v->IsBoat())
|
||||||
continue;
|
RenderOneNonRoad(v);
|
||||||
RenderOneNonRoad(v);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -261,8 +263,9 @@ CRenderer::RenderBoats(void)
|
||||||
for(node = gSortedVehiclesAndPeds.tail.prev;
|
for(node = gSortedVehiclesAndPeds.tail.prev;
|
||||||
node != &gSortedVehiclesAndPeds.head;
|
node != &gSortedVehiclesAndPeds.head;
|
||||||
node = node->prev){
|
node = node->prev){
|
||||||
|
// only boats in this list
|
||||||
CVehicle *v = (CVehicle*)node->item.ent;
|
CVehicle *v = (CVehicle*)node->item.ent;
|
||||||
if(v->IsVehicle() && v->IsBoat()) // BUG: IsVehicle missing in III
|
if(v->IsBoat())
|
||||||
RenderOneNonRoad(v);
|
RenderOneNonRoad(v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue