Ça devrait crier moins
This commit is contained in:
parent
dec9da6395
commit
547d0fb3f8
@ -1564,8 +1564,9 @@ void Engine::Render(float elapsedTime) {
|
||||
}
|
||||
RemotePlayer* rt = static_cast<RemotePlayer*>(m_players[out.id]);
|
||||
rt->Feed(out);
|
||||
if (rt->AmIDead()) {
|
||||
if (rt->AmIDead() && !m_deadplayers.count(out.id)) {
|
||||
m_audio.Create3DAudioObj(m_scream, AUDIO_PATH "scream.wav", m_player.GetPOV(), m_player.GetVelocity(), false, m_sfxvolume);
|
||||
m_deadplayers.insert(out.id);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -249,6 +249,7 @@ private:
|
||||
std::deque<netprot::ChunkMod*> m_chunkmod_manifest;
|
||||
std::chrono::high_resolution_clock::time_point m_startTime;
|
||||
std::unordered_map<uint64_t, Player*> m_players;
|
||||
std::set<uint64_t> m_deadplayers;
|
||||
netprot::Buffer m_buf, m_bufout;
|
||||
netprot::ChunkMod* m_chunkmod = nullptr;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user