]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Get the extension properly
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 8 Sep 2010 17:04:24 +0000 (20:04 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 8 Sep 2010 17:04:24 +0000 (20:04 +0300)
data/qcsrc/server/cl_client.qc

index 021cf9eaf8534c7bb8480ee145176e51242c6724..1905968ddc467ed8447371268ab15443291589c5 100644 (file)
@@ -426,12 +426,12 @@ string setmodel_state()
        // set the proper belly model depending on how full we are\r
        string newmodel_name, newmodel_extension, applymodel;\r
 \r
-       tokenizebyseparator(self.playermodel, ".");\r
-       newmodel_name = argv(0);\r
-       newmodel_extension = argv(1);\r
+       // 4 is the extension length\r
+       newmodel_name = substring(self.playermodel, 0, strlen(self.playermodel) - 4);\r
+       newmodel_extension = substring(self.playermodel, strlen(self.playermodel) - 4, 4);\r
 \r
        if(self.stomach_load)\r
-               applymodel = strcat(newmodel_name, "_state", ftos(floor(self.stomach_load)), ".", newmodel_extension);\r
+               applymodel = strcat(newmodel_name, "_state", ftos(floor(self.stomach_load)), newmodel_extension);\r
        else\r
                applymodel = self.playermodel;\r
 \r