From: MirceaKitsune Date: Wed, 8 Sep 2010 17:04:24 +0000 (+0300) Subject: Get the extension properly X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=75508acda9e9f0f90206046de37ef1a94a4aeb54;p=voretournament%2Fvoretournament.git Get the extension properly --- diff --git a/data/qcsrc/server/cl_client.qc b/data/qcsrc/server/cl_client.qc index 021cf9ea..1905968d 100644 --- a/data/qcsrc/server/cl_client.qc +++ b/data/qcsrc/server/cl_client.qc @@ -426,12 +426,12 @@ string setmodel_state() // set the proper belly model depending on how full we are string newmodel_name, newmodel_extension, applymodel; - tokenizebyseparator(self.playermodel, "."); - newmodel_name = argv(0); - newmodel_extension = argv(1); + // 4 is the extension length + newmodel_name = substring(self.playermodel, 0, strlen(self.playermodel) - 4); + newmodel_extension = substring(self.playermodel, strlen(self.playermodel) - 4, 4); if(self.stomach_load) - applymodel = strcat(newmodel_name, "_state", ftos(floor(self.stomach_load)), ".", newmodel_extension); + applymodel = strcat(newmodel_name, "_state", ftos(floor(self.stomach_load)), newmodel_extension); else applymodel = self.playermodel;