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

env_lightglow won't update transparency according to coordinates


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
glub
AlliedModders Donor
Join Date: Feb 2015
Old 12-04-2019 , 15:51   env_lightglow won't update transparency according to coordinates
Reply With Quote #1

I'm attempting to stick a glowing light (env_lightglow) on a player's head when they use night / motion / thermal vision.

What I am doing in my messy code is basically:
- spawn either an info_target or a NODRAW prop_dynamic
- parent it to the player's head
- spawn an env_ligthglow
- set the above spawned entity as the parent to the env_lightglow

The env_lightglow is properly attached.

However, the transparency of the env_lightglow doesn't update properly according to the player position!
Rather, it only updates according to the initial coordinates for the env_lightglow (at the time it is parented to the entity attached to the player's head), instead of the player's (updating) absorigin. ;(
It's like parenting doesn't continuously update its actual internal origin (even if I parent it directly to the player instead of an info_target).


Are these entities supposed to be immobile only?

Source code for the client-side entity: here, for the server-side: here

If I read correctly, this is what should be responsible for the updating of the glow sprite? I don't know much C++...

Does anyone have had experience dealing with these entities? I can't tell why the subsequent entities spawned are not rendered properly on the client side according to their parented entity.

I use a regular env_sprite as a fallback, but those don't have a "Visible only from front" flag, so they show through cloaked players.

Last edited by glub; 12-04-2019 at 21:23.
glub is offline
Reply



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:35.


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