Skip to content

Commit

Permalink
G1 support errors
Browse files Browse the repository at this point in the history
  • Loading branch information
postm1 committed Dec 1, 2024
1 parent a7098f3 commit ffe96e7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
2 changes: 2 additions & 0 deletions SpacerNET_Union/CreateVobs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,9 @@ namespace GOTHIC_ENGINE {
vobSound->SetSound(vobName);
vobSound->soundRadius = 1500;
vobSound->soundVolume = 100;
#if ENGINE == Engine_G2A
vobSound->m_zBias = 0;
#endif
vobSound->soundVolType = zCVobSound::zTSoundVolType::SV_SPHERE;
vobSound->showVisual = true;
vobSound->soundMode = zCVobSound::zTSoundMode::SM_RANDOM;
Expand Down
21 changes: 11 additions & 10 deletions SpacerNET_Union/Load3DS_Fast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace GOTHIC_ENGINE {
// Add your code here . . .


#if ENGINE == Engine_G2A

// This code allows to skip creating OBBOX tree for 3ds LOCATION file, it saves about ~30% of 3ds load time
// don't use for vobs! 3DS mesh location only!
bool dontCreateOBBOXOnLocationLoad = false;
Expand Down Expand Up @@ -41,6 +41,7 @@ namespace GOTHIC_ENGINE {
dontCreateOBBOXOnLocationLoad = false;
}

#if ENGINE == Engine_G2A

HOOK ivk_zCMesh_CalcBBox3D AS(&zCMesh::CalcBBox3D, &zCMesh::CalcBBox3D_Union);
void zCMesh::CalcBBox3D_Union(const zBOOL fastApprox)
Expand Down Expand Up @@ -81,21 +82,21 @@ namespace GOTHIC_ENGINE {
UnshareFeatures();
if (bGreat || dontCreateOBBOXOnLocationLoad)
{
m_bbAxisAligned.Init();
for (int i = 0; i < m_nSizeVertex; i++)
m_bbAxisAligned.AddPoint(m_ppVertex[i]->m_vPosition);
bbox3D.Init();
for (int i = 0; i < numVert; i++)
bbox3D.AddPoint(vertList[i]->position);
}
else
{
m_bbOriented.BuildOBBTree(this, 3);
m_bbAxisAligned = m_bbOriented.GetBBox3D();
obbox3D.BuildOBBTree(this, 3);
bbox3D = obbox3D.GetBBox3D();
}
if (m_nSizeVertex && m_nSizePolygon)
if (numVert && numPoly)
return;
m_bbAxisAligned.vMin = -0.1f;
m_bbAxisAligned.vMax = 0.1f;

};
zREAL D = 0.1F;
bbox3D.mins = -zVEC3(D, D, D);
bbox3D.maxs = zVEC3(D, D, D);
};

#endif
Expand Down

0 comments on commit ffe96e7

Please sign in to comment.