Fix spawnpoints calculation

This commit is contained in:
Jupeyy 2020-11-08 03:42:35 +01:00
parent 848bbf543d
commit 6db4323daf

View file

@ -142,7 +142,7 @@ bool IGameController::OnEntity(int Index, vec2 Pos, int Layer, int Flags, int Nu
{ {
int Type = Index - ENTITY_SPAWN; int Type = Index - ENTITY_SPAWN;
m_aaSpawnPoints[Type][m_aNumSpawnPoints[Type]] = Pos; m_aaSpawnPoints[Type][m_aNumSpawnPoints[Type]] = Pos;
m_aNumSpawnPoints[Type] = minimum(m_aNumSpawnPoints[Type], (int)(sizeof(m_aaSpawnPoints[0]) / sizeof(m_aaSpawnPoints[0][0]) - 1)); m_aNumSpawnPoints[Type] = minimum(m_aNumSpawnPoints[Type] + 1, (int)(sizeof(m_aaSpawnPoints[0]) / sizeof(m_aaSpawnPoints[0][0])));
} }
else if(Index == ENTITY_DOOR) else if(Index == ENTITY_DOOR)