Added missing changes for commit 25d99bc1280c (748).

This commit is contained in:
Richard Helgeby 2014-01-16 18:53:14 +01:00
parent b92cd30fa1
commit a5d9c66c42

View File

@ -81,6 +81,16 @@ WeaponAlphaOnClientDisconnect(client)
*/ */
WeaponAlphaOnItemPickupPost(client, weapon) 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. // Get client's current alpha.
new alpha = ToolsGetEntityAlpha(client); new alpha = ToolsGetEntityAlpha(client);