diff --git a/D3D11Engine/GothicAPI.cpp b/D3D11Engine/GothicAPI.cpp index f397670d..84be539d 100644 --- a/D3D11Engine/GothicAPI.cpp +++ b/D3D11Engine/GothicAPI.cpp @@ -482,11 +482,11 @@ void GothicAPI::OnGeometryLoaded(zCPolygon * *polys, unsigned int numPolygons) { WorldConverter::ConvertWorldMesh(polys, numPolygons, &WorldSections, LoadedWorldInfo.get(), &WrappedWorldMesh); #else if (Toolbox::FileExists(worldStr)) { - WorldConverter::LoadWorldMeshFromFile(worldStr, &WorldSections, LoadedWorldInfo, &WrappedWorldMesh); + WorldConverter::LoadWorldMeshFromFile(worldStr, &WorldSections, LoadedWorldInfo.get(), &WrappedWorldMesh); LoadedWorldInfo->CustomWorldLoaded = true; } else { - WorldConverter::ConvertWorldMesh(polys, numPolygons, &WorldSections, LoadedWorldInfo, &WrappedWorldMesh); + WorldConverter::ConvertWorldMesh(polys, numPolygons, &WorldSections, LoadedWorldInfo.get(), &WrappedWorldMesh); } #endif LogInfo() << "Done extracting world!"; @@ -2446,8 +2446,8 @@ void GothicAPI::CollectVisibleVobs(std::vector & vobs, std::vectorVisualInfo && ((dist < vobIndoorDist && it->IsIndoorVob) || (dist < vobOutdoorSmallDist && it->VisualInfo->MeshSize < vobSmallSize) || (dist < vobOutdoorDist))) { #ifdef BUILD_GOTHIC_1_08k // TODO: This is sometimes nullptr, suggesting that the Vob is invalid. Why does this happen? - if (!(*it)->VobConstantBuffer) { - removeList.push_back((*it)); + if (!it->VobConstantBuffer) { + removeList.push_back(it); continue; } #endif diff --git a/D3D11Engine/zCModel.h b/D3D11Engine/zCModel.h index 4f193ad9..ac4f6cf8 100644 --- a/D3D11Engine/zCModel.h +++ b/D3D11Engine/zCModel.h @@ -280,7 +280,7 @@ class zCModel : public zCVisual DirectX::SimpleMath::Vector3 GetModelScale() { #ifdef BUILD_GOTHIC_1_08k - return D3DXVECTOR3(1, 1, 1); + return DirectX::SimpleMath::Vector3::One; #endif return *(DirectX::SimpleMath::Vector3 *)THISPTR_OFFSET(GothicMemoryLocations::zCModel::Offset_ModelScale);