Raised This Month: $12 Target: $400
 3% 

How to use entity state inside AddToFullPack?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 02-16-2021 , 11:53   How to use entity state inside AddToFullPack?
Reply With Quote #1

I am trying to set an entity visible to certain players. Upon creation of the entity, I set its rendermode to kRenderTransTexture and amount to 0, making them invisible globally, and it works.
Now, in AddToFullPack, I am exchanging information with certain clients and want to set the render properties to visible for them only.
I am not allowed to access any property as it gives me an error "Pointer to incomplete class type is not allowed". What's the deal here? I don't want to make the entity visible globally, just for certain players.

Code:
int AddToFullPack(struct entity_state_s* state, int e, edict_t* ent, edict_t* host, int hostflags, int player, unsigned char* pSet) {

    // Check for specified entity
    // Check if player is valid and meets conditions to make entity visible for.

    // If requirements are met, change the entity's rendermode and amount...
    state->rendermode = kRenderTransTexture;
    state->renderamt = 255;

    // ^
    // Those two lines are giving me the error. What am I to do with state?

    return 1;
}

Last edited by redivcram; 02-17-2021 at 11:24.
redivcram is offline
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 02-17-2021 , 11:23   Re: How to use entity state inside AddToFullPack_Post?
Reply With Quote #2

Update: I've learned that _Post does not have anything to do with my question. Using the regular AddToFullPack does nothing either. Same results.
redivcram 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 17:44.


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