TTT2
TTT2 copied to clipboard
Feature Request: Deactivate the drowning sound for the "no drowning damage" item
If someone buys the "no drowning damage" item, then the drowning sound should be disabled for this person. Otherwise, everyone will hear the sound, and this is not ideal. For example, if someone tries to hide under the water.
We have to check if this is possible
Looking at the Source sdk 2013 github, it seems there might be a boolean function we can tap into. https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/server/player.cpp#L1948C59-L1948C59
nice catch, I'll look into it
Maybe this is also needed for the other "no damage" items (fire, prop, hazard, ...)? But in my opinion it's definitely needed for the "no drowning damage" item, if it's possible.
I experimented with this, and what I found is that:
I put code like this inside SetupMove, or Tick in both client and server, and it seems to not have an effect:
function GM:SetupMove(ply, mv, cmd)
if IsValid(ply) and ply:HasEquipmentItem("item_ttt_nodrowningdmg") then
ply:SetSaveValue("m_AirFinished", CurTime() + 10)
end
end
But as of today, I don't hear the drowning noise from my own character due to the implementation.