From 37eff22e31c4b7b9179d48ee131d0afa4778816c Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Thu, 20 Apr 2023 18:06:05 -0500 Subject: [PATCH] F removes powerups. --- Faceball2030/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Faceball2030/main.cpp b/Faceball2030/main.cpp index 9fcfd46..5c98765 100644 --- a/Faceball2030/main.cpp +++ b/Faceball2030/main.cpp @@ -2078,6 +2078,10 @@ bool FaceBall::OnUserUpdate(float fElapsedTime) vec3d vForward = Vector_Mul(vLookDir, std::min(player.GetRadius() - 0.00001f, moveSpd * fElapsedTime)); if (CheckPowerupCollision({ vForward.x,0,vForward.z }, { player.GetPos().x,player.GetPos().z }, player.GetRadius() * 1.25) != -1) { powerups[lastPowerupCollidedWith].opened = true; + if (GetKey(F).bPressed) { + powerups.erase(powerups.begin() + lastPowerupCollidedWith); + lastPowerupCollidedWith = -1; + } } } if (hp > 0) {