Raised This Month: $7 Target: $400
 1% 

Solved Can't set colormap but other ent_states work


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Old 04-23-2021 , 23:03   Can't set colormap but other ent_states work
Reply With Quote #1

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.
__________________

Last edited by gabuch2; 04-24-2021 at 00:19.
gabuch2 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode