From a5d9c66c420cfa2f3b8b358c25bf8ab31ca913ae Mon Sep 17 00:00:00 2001 From: Richard Helgeby Date: Thu, 16 Jan 2014 18:53:14 +0100 Subject: [PATCH] Added missing changes for commit 25d99bc1280c (748). --- src/zr/weapons/weaponalpha.inc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/zr/weapons/weaponalpha.inc b/src/zr/weapons/weaponalpha.inc index 6aea2b0..441c86f 100644 --- a/src/zr/weapons/weaponalpha.inc +++ b/src/zr/weapons/weaponalpha.inc @@ -81,6 +81,16 @@ WeaponAlphaOnClientDisconnect(client) */ WeaponAlphaOnItemPickupPost(client, weapon) { + if (Entity_HasChildren(weapon)) + { + // Don't apply alpha value if weapon has children. Render mode is + // recursively applied to child entities that may not have the render + // mode attribute - and cause errors like this: + // Native "SetEntProp" reported: Property "m_nRenderMode" not found + // (entity 666/info_particle_system) + return; + } + // Get client's current alpha. new alpha = ToolsGetEntityAlpha(client);