From: TimePath Date: Sun, 8 Nov 2015 08:21:15 +0000 (+1100) Subject: GlobalSound: fix `cl_forceplayermodels 1` using default voices when observing X-Git-Tag: xonotic-v0.8.2~1653^2~9 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=462c2c8effb89afbf12619719222d896ff261dae;p=xonotic%2Fxonotic-data.pk3dir.git GlobalSound: fix `cl_forceplayermodels 1` using default voices when observing --- diff --git a/qcsrc/common/effects/qc/globalsound.qc b/qcsrc/common/effects/qc/globalsound.qc index 0e9242268..301b0215b 100644 --- a/qcsrc/common/effects/qc/globalsound.qc +++ b/qcsrc/common/effects/qc/globalsound.qc @@ -92,7 +92,12 @@ ps = PlayerSounds_from(ReadByte()); float r = ReadByte() / 255; int who = ReadByte(); - entity e = findfloat(world, entnum, autocvar_cl_forceplayermodels ? player_currententnum : who); + entity e = findfloat(world, entnum, who); + if (autocvar_cl_forceplayermodels) + { + entity me = findfloat(world, entnum, player_currententnum); + if (me.model != "null") e = me; + } UpdatePlayerSounds(e); string s = e.(ps.m_playersoundfld); string sample = GlobalSound_sample(s, r);