Quote:
Originally Posted by snelvuur
i've also did a check if the soundfile is set, if not then skip the precache (assuming it works like this? how would i tell if it work? since there is no real check?)
|
replace
if (cvarSoundName) {
with
if (strlen(soundFileName) > 1) {
Quote:
Originally Posted by snelvuur
Also, i've added what you set with the hookconvarchange, only i dont fully understand that. I've tried to just change for instance "sm_top10_game" but it didn't change it on the fly. Dont think its 100% correct. Can you verify?
|
with
if (oldValue[0] == newValue[0]) {
you are comparing the 1st char of the 2 strings. you should use
StrEqual to compare the whole string.
And sm_top10_sound should not be treated in the same way, since it will produce errors in the client and it will fail to play the sound even after the map change