all building in a paint-select row are now built

This commit is contained in:
devZoGok
2025-06-22 19:17:57 +03:00
parent 145e8b9c29
commit f2b386e5a2
2 changed files with 9 additions and 8 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ namespace battleship{
float hypothenuse = sqrt(width * width + length * length);
int numStructsInRow = int(lenRow / hypothenuse);
while(gameObjectFrames.size() > numStructsInRow)
while(gameObjectFrames.size() > numStructsInRow && gameObjectFrames.size() > 1)
removeGameObjectFrame(gameObjectFrames.size() - 1);
if(gameObjectFrames.size() < numStructsInRow){