Merge branch 'master' into SQC-15_paquets

This commit is contained in:
MarcEricMartel
2023-11-01 06:27:02 -04:00
6 changed files with 59 additions and 6 deletions

View File

@@ -421,6 +421,12 @@ void Engine::LoadResource() {
void Engine::UnloadResource() {}
void Engine::InstantDamage()
{
m_player.InflictDamage(0.10f);
m_damage = false;
}
void Engine::SystemNotification(std::string systemLog) {
std::string message = "";
@@ -1032,7 +1038,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);
@@ -1128,6 +1137,8 @@ void Engine::KeyPressEvent(unsigned char key) {
break;
case 8: // I - Ignorer
break;
case 9: // J - InstantDamage
m_damage = true;
case 15: // P - Ignorer
break;
case 17: // R - Ignorer