From 15a8d82176e4a13224f013d8355602ee3b0bcbf5 Mon Sep 17 00:00:00 2001 From: hamx01 Date: Sat, 14 Dec 2024 20:47:02 +0100 Subject: [PATCH] fix serduszek --- sources/Plansza.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/Plansza.cpp b/sources/Plansza.cpp index 55738f2..5413583 100644 --- a/sources/Plansza.cpp +++ b/sources/Plansza.cpp @@ -720,7 +720,7 @@ void Plansza::spawn_meteor() { } void Plansza::spawn_hearts() { - if (heartSpawnClock.getElapsedTime().asSeconds() > float(RandomNumberGenerator::getRandomNumber(5,30))) { // randomowy spawn meteorytów od 5 do 30 sekundy + if (heartSpawnClock.getElapsedTime().asSeconds() > rand() % 26 + 5) { // randomowy spawn meteorytów od 5 do 30 sekundy if (hearts.size() < 5) { // jeśli jest mniej niż 5 meteorów na planszy hearts.emplace_back(RandomNumberGenerator::getRandomNumber(50, 499), -100, heartTexture); }