F removes powerups.

linux_template
sigonasr2 2 years ago
parent 447881a044
commit 37eff22e31
  1. 4
      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) {

Loading…
Cancel
Save