Merge branch 'master' into SQC-15_paquets
This commit is contained in:
@@ -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
|
||||
|
@@ -46,6 +46,7 @@ private:
|
||||
|
||||
bool LoadTexture(Texture& texture, const std::string& filename, bool useMipmaps = true, bool stopOnError = true);
|
||||
|
||||
void InstantDamage();
|
||||
void SystemNotification(std::string systemLog);
|
||||
void KillNotification(Player killer, Player killed);
|
||||
void DisplayNotification(std::string message);
|
||||
@@ -86,7 +87,7 @@ private:
|
||||
|
||||
Bullet* m_bullets[MAX_BULLETS];
|
||||
|
||||
std::map<uint64_t, RemotePlayer*> m_players;
|
||||
std::map<uint64_t, Player*> m_players;
|
||||
|
||||
//Menu
|
||||
enum class GameState: uint8_t { MAIN_MENU, OPTIONS, QUIT, NEWG, PLAY };
|
||||
@@ -107,6 +108,8 @@ private:
|
||||
int m_renderCount = 0;
|
||||
int m_countdown = COUNTDOWN;
|
||||
|
||||
bool m_damage = false;
|
||||
|
||||
bool m_wireframe = false;
|
||||
bool m_isSkybox = true;
|
||||
bool m_block = false;
|
||||
|
Reference in New Issue
Block a user