]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix a crash and a warning with clones
authorMario <mario@smbclan.net>
Sat, 16 Jan 2016 11:32:23 +0000 (21:32 +1000)
committerMario <mario@smbclan.net>
Sat, 16 Jan 2016 11:32:23 +0000 (21:32 +1000)
qcsrc/common/effects/qc/globalsound.qc
qcsrc/server/cl_player.qc

index 02d8756aab00f5ed89bb8f68ec36b1e605c8b29d..061ec2c74bc228615786d4a2588e0a4a82856612 100644 (file)
                void _GlobalSound(entity this, entity gs, entity ps, string sample, int chan, int voicetype, bool fake)
                {
                        if (gs == NULL && ps == NULL && sample == "") return;
+                       if(this.classname == "body") return;
                        float r = random();
                        if (sample != "") sample = GlobalSound_sample(sample, r);
                        switch (voicetype)
index c6dfc11745792b7144e5f0b29fc2b41656553d02..f5f5ad905ddc59b68769ff8c37d03a8bbe7b1e8c 100644 (file)
@@ -106,6 +106,7 @@ void CopyBody(entity this, float keepvelocity)
        setsize(clone, this.mins, this.maxs);
        clone.prevorigin = this.origin;
        clone.reset = SUB_Remove;
+       clone._ps = this._ps;
 
        Drag_MoveDrag(this, clone);