I need help with making an env_beam's beam update colors.
I've been trying to solve a weird problem for the past week.
When I find an env_beam with an env_render using the netname (custom stuff)
It finds it perfectly fine, changes the color, but when I try to do the same the second time
it doesn't do anything, tested it on custom maps, and stuff, haven't really been able to find
a solution to this.

Here is the code used for finding the target entities:

// CODE START
if (!FStringNull(pev->netname))
{
edict_t* pentTarget2 = NULL;
pentTarget2 = FIND_ENTITY_BY_STRING(NULL, "netname", STRING(pev->netname));
while ( pentTarget2 )
{
//pentTarget2 = FIND_ENTITY_BY_STRING(NULL, "netname", STRING(pev->netname));
if (FNullEnt(pentTarget2))
break;

entvars_t *pevNetname = VARS(pentTarget2);
if (!FBitSet(pev->spawnflags, SF_RENDER_MASKFX))
pevNetname->renderfx = pev->renderfx;
if (!FBitSet(pev->spawnflags, SF_RENDER_MASKAMT))
pevNetname->renderamt = pev->renderamt;
if (!FBitSet(pev->spawnflags, SF_RENDER_MASKMODE))
pevNetname->rendermode = pev->rendermode;
if (!FBitSet(pev->spawnflags, SF_RENDER_MASKCOLOR))
pevNetname->rendercolor = pev->rendercolor;

pentTarget2 = FIND_ENTITY_BY_STRING(pentTarget2, "netname", STRING(pev->netname));
}
}
// CODE END

Thanks for reading!

EDIT: Found a solution for the problem just after posting.
You need to individually set pev->rendercolor.x/y/z to make a beam's color change.
Changing the entire thing for some reason freezes the beam's rendercolor at the new value