Color modulation with light_environment/skybox
Actually this is might be useful for someone. You can modulate players color, weapon, viewmodel. But, one thing you need to know, the model should be with specific flag to make this work even in dark areas, where light is not exists. Without model editing, this will only work where the skybox illuminates the surface of the map. So, you can decompile model and add into .qc file line with: $flags 1024 Example of .qc file after editing:
Spoiler
This flag forces lights the model directly from light_environment, no matter where it is in the map. Also this flag makes model always with maximum light level (lambert).
Spoiler
|
Re: Color modulation with light_environment/skybox
You can just set directly cvar's values without handling entities. Replicate this code:
Code:
You can assume j = 4 and v = 255, handle cvar's pointers separately and use floatpower. |
Re: Color modulation with light_environment/skybox
Thanks, I didn't know how to make it work in dark areas :)
I was experimenting with this feature in the past when porting Vampire-Slayer to HL but unfortunately I couldn't get to set this to individual players (e.g. only one type of vampires have nightvision). Any ideas? https://i.imgur.com/41Mvrhb.jpg The only solution I could thing off is to hook SVC_NEWMOVEVARS https://wiki.alliedmods.net/Half-Lif...VC_NEWMOVEVARS which is the message that contains the sky color values, but that probably requires Orpheu, not sure if there's a simpler solution, maybe using ReAPI move vars or AddToFullPack? |
All times are GMT -4. The time now is 15:13. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.