]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix two bugs regarding ok_model dir
authorRudolf Polzer <divverent@alientrap.org>
Tue, 6 Mar 2012 18:24:40 +0000 (19:24 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 6 Mar 2012 18:24:40 +0000 (19:24 +0100)
qcsrc/client/csqcmodel_hooks.qc

index 2cda005ce8ea51c1602db4ca7dfa9722751f4232..c2908766b34273356f67284f2217b89a709c6553 100644 (file)
@@ -319,7 +319,7 @@ void CSQCModel_AutoTagIndex_Apply(void)
                                                        dprint("h_ model lacks weapon attachment, but v_ model is attached to it\n");
                                                }
                                        }
-                                       else
+                                       else if(self.tag_entity.isplayermodel)
                                        {
                                                self.tag_index = gettagindex(self.tag_entity, "weapon");
                                                if(!self.tag_index)
@@ -517,7 +517,7 @@ void CSQCModel_Hook_PreUpdate(float isnew, float isplayer, float islocalplayer)
 void CSQCModel_Hook_PostUpdate(float isnew, float isplayer, float islocalplayer)
 {
        // is it a player model? (shared state)
-       self.isplayermodel = (substring(self.model, 0, 14) == "models/player/");
+       self.isplayermodel = (substring(self.model, 0, 14) == "models/player/" || substring(self.model, 0, 17) == "models/ok_player/");
 
        // save values set by server
        if(self.isplayermodel)