Create a new node if the load index is outside the node count
Some checks failed
CodeQL / Analyze (push) Waiting to run
Build branch / build-all (push) Failing after 16s

This commit is contained in:
smallmodel 2025-01-17 21:49:17 +01:00 committed by GitHub
parent 6b02457190
commit 591be6c2fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2500,7 +2500,10 @@ PathNode *PathSearch::FindNearestSniperNode(Entity*pEnt, Vector& vPos, Entity *p
PathNode *PathSearch::GetSpawnNode(ClassDef *cls)
{
if (m_bNodesloaded) {
if (m_bNodesloaded
// Fixed in OPM
&& m_LoadIndex < nodecount
) {
return pathnodes[m_LoadIndex++];
} else {
// Otherwise create a new node