summaryrefslogtreecommitdiffstats
path: root/src/render
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-05-17 14:08:18 +0200
committeraap <aap@papnet.eu>2019-05-17 14:08:18 +0200
commit5b8f20b08e6a40e2b07df73e90c5e84e259140fe (patch)
treed8c5977bb4fda8c2521fad3810e4436f1bdf2127 /src/render
parentrenames and a fix (diff)
downloadre3-5b8f20b08e6a40e2b07df73e90c5e84e259140fe.tar
re3-5b8f20b08e6a40e2b07df73e90c5e84e259140fe.tar.gz
re3-5b8f20b08e6a40e2b07df73e90c5e84e259140fe.tar.bz2
re3-5b8f20b08e6a40e2b07df73e90c5e84e259140fe.tar.lz
re3-5b8f20b08e6a40e2b07df73e90c5e84e259140fe.tar.xz
re3-5b8f20b08e6a40e2b07df73e90c5e84e259140fe.tar.zst
re3-5b8f20b08e6a40e2b07df73e90c5e84e259140fe.zip
Diffstat (limited to 'src/render')
-rw-r--r--src/render/Renderer.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index fd949cee..5dc5959a 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -195,7 +195,7 @@ CRenderer::RenderEverythingBarRoads(void)
if(e->IsVehicle() ||
e->IsPed() && CVisibilityPlugins::GetClumpAlpha((RpClump*)e->m_rwObject) != 255){
- if(e->IsVehicle() && ((CVehicle*)e)->m_vehType == VEHICLE_TYPE_BOAT){
+ if(e->IsVehicle() && ((CVehicle*)e)->IsBoat()){
dist = ms_vecCameraPosition - e->GetPosition();
if(!CVisibilityPlugins::InsertEntityIntoSortedList(e, dist.Magnitude())){
printf("Ran out of space in alpha entity list");
@@ -221,7 +221,7 @@ CRenderer::RenderVehiclesButNotBoats(void)
node != &gSortedVehiclesAndPeds.head;
node = node->prev){
CVehicle *v = (CVehicle*)node->item.ent;
- if(v->IsVehicle() && v->m_vehType == VEHICLE_TYPE_BOAT) // BUG: missing in III
+ if(v->IsVehicle() && v->IsBoat()) // BUG: IsVehicle missing in III
continue;
RenderOneNonRoad(v);
}
@@ -236,9 +236,7 @@ CRenderer::RenderBoats(void)
node != &gSortedVehiclesAndPeds.head;
node = node->prev){
CVehicle *v = (CVehicle*)node->item.ent;
- if(!v->IsVehicle()) // BUG: missing in III
- continue;
- if(v->m_vehType == VEHICLE_TYPE_BOAT)
+ if(v->IsVehicle() && v->IsBoat()) // BUG: IsVehicle missing in III
RenderOneNonRoad(v);
}
}