]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
forcemodels: don't force server's idea if isdemo()
authorRudolf Polzer <divverent@alientrap.org>
Sun, 10 Jun 2012 17:14:12 +0000 (19:14 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 10 Jun 2012 17:15:05 +0000 (19:15 +0200)
qcsrc/client/csqcmodel_hooks.qc

index 152ecbe82e998e398d35fcd0a8a1f0cbc37a811b..009e7e7e4cc46d96de0e5f1c9fd1e176014745c8 100644 (file)
@@ -133,12 +133,15 @@ void CSQCPlayer_ForceModel_Apply(float islocalplayer)
        {
                if(islocalplayer)
                {
-                       // trust server's idea of "own player model"
-                       forceplayermodels_modelisgoodmodel = self.forceplayermodels_isgoodmodel;
-                       forceplayermodels_model = self.forceplayermodels_savemodel;
-                       forceplayermodels_modelindex = self.forceplayermodels_savemodelindex;
-                       forceplayermodels_skin = self.forceplayermodels_saveskin;
-                       forceplayermodels_attempted = 1;
+                       if(!isdemo()) // this is mainly cheat protection; not needed for demos
+                       {
+                               // trust server's idea of "own player model"
+                               forceplayermodels_modelisgoodmodel = self.forceplayermodels_isgoodmodel;
+                               forceplayermodels_model = self.forceplayermodels_savemodel;
+                               forceplayermodels_modelindex = self.forceplayermodels_savemodelindex;
+                               forceplayermodels_skin = self.forceplayermodels_saveskin;
+                               forceplayermodels_attempted = 1;
+                       }
                }
        }