ran into an issue when porting the mission lasers (ht11lasers). So here is the situation:
Whenever I press the buttons in the laser control room, the laser doesnt change color or become visible after being
completely turned off. First I thought that trigger_bit & trigger_bit_counter had some problems, but
I found out later that it was all caused beacuse env_render had a new keyvalue in PS2 Half-Life called
netname, it basically works somewhat like a multi manager, it finds all other entities on the map with the same netname (not targetname!)
and then applies the new rendermode, renderfx, color, etc...
I tried to make it work but all of my attempts have failed so far, so I came here to ask for help.
Here is the code:
//
// PS2DECAY
//
if (!FStringNull(pev->netname))
{
edict_t* pentTarget = NULL;
//pentTarget = FIND_ENTITY_BY_STRING(pentTarget, "netname", STRING( pev->netname ));
pentTarget = FIND_ENTITY_BY_STRING(NULL, "netname", STRING(pev->netname));
while ( pentTarget )
{
//if (FNullEnt(pentTarget))
//break;
entvars_t *pevNetname = VARS( pentTarget );
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;
pentTarget = FIND_ENTITY_BY_STRING(pentTarget, "netname", STRING( pev->netname ));
}
}
This is all located at the bottom of CRenderFxManager :: Use ( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
Can someone please help me with this?