add bonus speed limit

This commit is contained in:
Askou
2021-06-17 16:10:06 +02:00
parent 2ff8230c35
commit 72d93e8919
+3 -1
View File
@@ -44,7 +44,9 @@ namespace BBM {
auto *playerBonus = player.tryGetComponent<PlayerBonusComponent>();
if (!controllable || !playerBonus)
return;
controllable->speed += 0.025f;
if (controllable->speed >= 0.4)
return;
controllable->speed = 0.025f;
const_cast<WAL::Entity &>(bonus).scheduleDeletion();
}