I have the following code
Code:
public addtofullpack(ent_state,e,edict_t_ent,edict_t_host,hostflags,player,pSet)
{
if(player)
{
switch(g_iTeam[edict_t_ent])
{
case 1:
{
set_es(ent_state, ES_ColorMap, color_blue);
}
case 2:
{
set_es(ent_state, ES_ColorMap, color_red);
}
}
}
return FMRES_IGNORED;
}
But it's not working as the colormap of each player is not applied.
However if I try to manipulate other values, they do indeed work
Code:
public addtofullpack(ent_state,e,edict_t_ent,edict_t_host,hostflags,player,pSet)
{
if(player)
{
set_es(ent_state, ES_RenderMode, kRenderTransAlpha) //works
set_es(ent_state, ES_RenderAmt, 85); //works
set_es(ent_state, ES_ColorMap, color_blue); //doesn't work
}
return FMRES_IGNORED;
}
Code:
const color_blue = (150 & 0xFF) << 8 | (150 & 0xFF);
What am I doing wrong?
EDIT: Upon further investigation, it seems colormap is completely ignored on players, and the engine will use the setinfo values instead.
__________________