From: bones_was_here Date: Tue, 22 Nov 2022 15:26:58 +0000 (+1000) Subject: Check PVS before sending casings X-Git-Tag: xonotic-v0.8.6~235^2~8 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=11a3bc37cdbaf5920b9d847df21aaf145bf8d7e7;p=xonotic%2Fxonotic-data.pk3dir.git Check PVS before sending casings ...to players who don't own them and aren't spectating their owner --- 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))