From 11a3bc37cdbaf5920b9d847df21aaf145bf8d7e7 Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Wed, 23 Nov 2022 01:26:58 +1000 Subject: [PATCH] Check PVS before sending casings ...to players who don't own them and aren't spectating their owner --- qcsrc/common/effects/qc/casings.qc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qcsrc/common/effects/qc/casings.qc b/qcsrc/common/effects/qc/casings.qc index 08864459d..4f91acf91 100644 --- a/qcsrc/common/effects/qc/casings.qc +++ b/qcsrc/common/effects/qc/casings.qc @@ -32,6 +32,8 @@ void SpawnCasing(vector vel, float randomvel, vector ang, vector avel, float ran casingtype |= 0x40; // client will apply autocvar_cl_gunoffset in first person } + else if (1 & ~checkpvs(it.origin + it.view_ofs, casingowner)) // 1 or 3 means visible + continue; msg_entity = it; // sound_allowed checks this if (!sound_allowed(MSG_ONE, it)) -- 2.39.2