degats dans bullet

This commit is contained in:
Jonathan Trottier
2023-10-30 14:36:44 -04:00
parent ada9330588
commit 6e75bec25c
5 changed files with 42 additions and 11 deletions

View File

@@ -391,7 +391,7 @@ void Engine::UnloadResource() {}
void Engine::InstantDamage()
{
m_player.InflictDamage(m_player, 0.10f);
m_player.InflictDamage(0.10f);
m_damage = false;
}
@@ -991,7 +991,10 @@ void Engine::Render(float elapsedTime) {
DrawHud(elapsedTime, bloc);
DisplayPovGun();
ProcessNotificationQueue();
if (m_damage)
{
InstantDamage();
}
static bool fell = false;
if (m_player.GetPosition().y < 1.7f && !fell) {
m_audio.Create3DAudioObj(m_scream, AUDIO_PATH "scream.wav", m_player.GetPOV(), m_player.GetVelocity(), false,1.f);