mirror of
https://github.com/nillerusr/source-engine.git
synced 2024-12-22 06:06:50 +00:00
vphysics: increased g_MeshSize value( fixes some crashes in ep2 ), update ivp submodule
This commit is contained in:
parent
1dc309d1ed
commit
a53fff833f
2
ivp
2
ivp
@ -1 +1 @@
|
||||
Subproject commit 878a544907704eee58555736615e11f7e0ff4109
|
||||
Subproject commit fb8f2ac922a7f8f758a552ddbe47f1933ffe42b0
|
@ -185,8 +185,7 @@ void CMeshInstance::Init( const virtualmeshlist_t &list )
|
||||
}
|
||||
}
|
||||
|
||||
// UNDONE: Tune / expose this constant 512K budget for terrain collision
|
||||
const int g_MeshSize = (2048 * 1024);
|
||||
const int g_MeshSize = (2048 * 1024 * 4); // nillerusr: 2 MiB should be enough, old value causes problems in ep2
|
||||
static CDataManager<CMeshInstance, virtualmeshlist_t, CMeshInstance *, CThreadFastMutex> g_MeshManager( g_MeshSize );
|
||||
static int numIndices = 0, numTriangles = 0, numBaseTriangles = 0, numSplits = 0;
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -449,6 +448,9 @@ CMeshInstance *CPhysCollideVirtualMesh::BuildLedges()
|
||||
m_hMemory = g_MeshManager.CreateResource( list );
|
||||
m_ledgeCount = list.triangleCount;
|
||||
CMeshInstance *pMesh = g_MeshManager.LockResource( m_hMemory );
|
||||
|
||||
Assert( g_MeshManager.AvailableSize() != 0 );
|
||||
|
||||
return pMesh;
|
||||
}
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user