alliedmodders / sourcemod

SourceMod - Source Engine Scripting and Administration
http://www.sourcemod.net/
986 stars 423 forks source link

GetSoundDuration #937

Closed qubka closed 5 years ago

qubka commented 5 years ago

hello, I am developing ambient system for my mod on CS:GO and I will really appreciate the fix of the GetSoundDuration, I can even write it by myself, if devs not have time, even i can pull fix of it, if devs are not mind

Headline commented 5 years ago

We’re open-source and gladly take pull requests. Not sure if it doesn’t work because the game doesn’t support it or not.

Checkout our CONTRIBUTING.md for more info about pull requests!

@psychonic ?

psychonic commented 5 years ago

SourceMod's implementation just calls the game's own IEngineSound::GetSoundDuration and passes the returned value as-is. Your issue is that CS:GO looks to not support that function on Linux, always returning 0. This is a game "bug", not necessarily an issue with SM.

There are some third party, game-independent extensions that can get you the same info and more.