From 2a6a1ae8dd05e0516e60c0f61f3e7f778a1ef83a Mon Sep 17 00:00:00 2001 From: Mircea Kitsune Date: Tue, 4 May 2010 15:09:43 +0300 Subject: [PATCH] Use substring instead. Move code in correct location. --- qcsrc/server/cl_player.qc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index 72c3a67b7..4713c988d 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -166,8 +166,12 @@ void CopyBody(float keepvelocity) float player_getspecies() { local float glob, i, j, fh, len, s, sk; - local string fn, l; - local float tokens, snd; + local string fn, l, file; + local float tokens; + + file = substring(self.model, 0, -5); // remove the extension at the end + UpdatePlayerSounds(strcat(file, ftos(sk))); + dprint(strcat(" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", file, ftos(sk))); s = -1; @@ -184,10 +188,6 @@ float player_getspecies() continue; fgets(fh); fgets(fh); sk = stof(fgets(fh)); - - snd = tokenizebyseparator(self.model, "."); // don't use the .zym at the end - UpdatePlayerSounds(strcat(argv(0), ftos(sk))); - if(sk == (j ? 0 : self.skinindex)) // 2nd pass skips the skin test if(fgets(fh) == self.model) { -- 2.39.2