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

Flashlight in HLSDK


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 06-28-2014 , 13:41   Flashlight in HLSDK
Reply With Quote #1

Hello AlliedModders!
Maybe this is the wrong forum to post this into, but I couldn't find better place for this question(maybe in Off-Topic forum?).

Anyway, I can't seem to find how is flashlight handled in game. I guess it is purely done client-side, but I am still not sure.
I don't really think it is Dynamic Light (TE_DLIGHT tempentity) because when you create an DLight near the wall, it also lights other side of the wall, while that is not possible with the flashlight. I also tried with ELight, but it only lights entities up.
So after searching server-side stuff in HLSDK(dlls folder and few others) I began to search on client-side files(cl_dll). There is flashlight.cpp, but it is only for flashlight as a HUD element(in the upper right corner of the screen). So, is there a code in HLSDK that shows how flashlight works? I need it to create a flashlight but with a little bit more features, and with DLight you could update its position only once every 0.1 seconds, but real flashlight updates in real time, which makes me think it is handled client-side.
Thanks in advance.

Last edited by klippy; 06-28-2014 at 13:42.
klippy is offline
 



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 08:55.


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