]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
ent_cs: fix strunzone crash
authorTimePath <andrew.hardaker1995@gmail.com>
Tue, 17 Nov 2015 07:22:00 +0000 (18:22 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Tue, 17 Nov 2015 07:22:00 +0000 (18:22 +1100)
qcsrc/common/ent_cs.qc

index e016dd32da39a1008dc8cdeefa8198c8e665f6d4..3132ec323173ed68d9a390f80a84a899ea60e318 100644 (file)
                        this.has_origin = true;
                        this.origin = e.origin;
                        // `cl_forceplayermodels 1` sounds will be wrong until the player has been in the PVS, but so be it
-                       this.model = e.model;
+                       if (this.model != e.model)
+                       {
+                               if (this.model) strunzone(this.model);
+                               this.model = strzone(e.model);
+                       }
                }
        }