return TRUE;
}
-void UpdatePlayerSounds();
void setmodel_lod(entity e, string modelname)
{
string s;
self.modelindex_lod0_from_xonotic = ((s == "") || (substring(s, 0, 4) == "data"));
player_setupanimsformodel();
- UpdatePlayerSounds();
}
/*
{
local float glob, i, j, fh, len, s, sk;
local string fn, l;
+ local float tokens;
s = -1;
if(sk == (j ? 0 : self.skinindex)) // 2nd pass skips the skin test
if(fgets(fh) == self.model)
{
+ tokens = tokenizebyseparator(fn, ".");
+ UpdatePlayerSounds(argv(0));
+
l = fgets(fh);
len = tokenize_console(l);
if (len != 2)
}
.float modelindex_for_playersound;
-void UpdatePlayerSounds()
+void UpdatePlayerSounds(string filename)
{
if(self.modelindex == self.modelindex_for_playersound)
return;
self.modelindex_for_playersound = self.modelindex;
ClearPlayerSounds();
LoadPlayerSounds("sound/player/default.sounds", 1);
- LoadPlayerSounds(strcat(self.model, ".sounds"), 0);
+ if(filename != "")
+ LoadPlayerSounds(strcat(filename, ".sounds"), 0);
}
void FakeGlobalSound(string sample, float chan, float voicetype)
void PrecachePlayerSounds(string f);
void PrecacheGlobalSound(string samplestring);
-void UpdatePlayerSounds();
+void UpdatePlayerSounds(string filename);
void ClearPlayerSounds();
void PlayerSound(.string samplefield, float channel, float voicetype);
void GlobalSound(string samplestring, float channel, float voicetype);