From 3c6c641f9cffd1aa7f780d90e8aed9e4ac3de04e Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 16 Jan 2016 21:32:23 +1000 Subject: [PATCH] Fix a crash and a warning with clones --- qcsrc/common/effects/qc/globalsound.qc | 1 + qcsrc/server/cl_player.qc | 1 + 2 files changed, 2 insertions(+) diff --git a/qcsrc/common/effects/qc/globalsound.qc b/qcsrc/common/effects/qc/globalsound.qc index 02d8756aa..061ec2c74 100644 --- a/qcsrc/common/effects/qc/globalsound.qc +++ b/qcsrc/common/effects/qc/globalsound.qc @@ -299,6 +299,7 @@ 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) diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index c6dfc1174..f5f5ad905 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -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); -- 2.39.2