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

[L4D & L4D2] Dynamic Light (1.10) [07-Feb-2022]


Post New Thread Reply   
 
Thread Tools Display Modes
KoMiKoZa
Senior Member
Join Date: Dec 2017
Location: Thy old times.
Old 06-20-2021 , 11:57   Re: [L4D & L4D2] Dynamic Light (1.8) [15-Feb-2021]
Reply With Quote #41

I'd like to add a small request for a cvar that would allow to choose between flashlight types, akin to the following cvar:
PHP Code:
// 0=Show the dynamic light to all players. 1=Hide the dynamic light so only other players can see it. 2=Only show to the owner.
l4d_dynamic_light_hide "0" 
So you could choose between the two options:

- Show Default Light (sprite) and Dynamic Light.
- Show Only Dynamic Light.
KoMiKoZa is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 06-20-2021 , 12:08   Re: [L4D & L4D2] Dynamic Light (1.8) [15-Feb-2021]
Reply With Quote #42

I don't think it's possible to remove the default sprite glare.
__________________
Silvers is offline
KrutoyKolbas
New Member
Join Date: Jan 2022
Location: Russia
Old 01-19-2022 , 20:36   Re: [L4D & L4D2] Dynamic Light (1.8) [15-Feb-2021]
Reply With Quote #43

Dynamic light gets behind the character when character is too close to an obstacle. Is this intended? I just think that it looks pretty weird.
KrutoyKolbas is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 01-26-2022 , 05:03   Re: [L4D & L4D2] Dynamic Light (1.8) [15-Feb-2021]
Reply With Quote #44

Quote:
Originally Posted by KrutoyKolbas View Post
Dynamic light gets behind the character when character is too close to an obstacle. Is this intended? I just think that it looks pretty weird.
I don't see this issue. Which object? Maybe you can explain which map and where to test. Do you have a video?
__________________
Silvers is offline
strikeraot
Senior Member
Join Date: Dec 2018
Location: Viet Nam
Old 01-26-2022 , 06:05   Re: [L4D & L4D2] Dynamic Light (1.8) [15-Feb-2021]
Reply With Quote #45

Quote:
Originally Posted by KrutoyKolbas View Post
Dynamic light gets behind the character when character is too close to an obstacle. Is this intended? I just think that it looks pretty weird.
try this:
Quote:
sm_cvar l4d_dynamic_light_hull "0"
strikeraot is offline
KrutoyKolbas
New Member
Join Date: Jan 2022
Location: Russia
Old 01-28-2022 , 15:48   Re: [L4D & L4D2] Dynamic Light (1.8) [15-Feb-2021]
Reply With Quote #46

PHP Code:
822:    if( fDist <= g_iCvarDist 50 )
823:                {
824:                    GetAngleVectors(vAngvAngNULL_VECTORNULL_VECTOR);
825:                    vPos[0] -= vAng[0] * 50;
826:                    vPos[1] -= vAng[1] * 50;
827:                    vPos[2] -= vAng[2] * 50;
828:                    TeleportEntity(entityvPosNULL_VECTORNULL_VECTOR);
829:                } 

PHP Code:
841:                if( fDist <= g_iCvarDist )
842:                {

860:                    vPos[0] -= vAng[0] * 50;
861:                    vPos[1] -= vAng[1] * 50;
862:                    vPos[2] -= vAng[2] * 50;
863:                    TeleportEntity(entityvPosNULL_VECTORNULL_VECTOR); 
Code doesn't check if the distance of trace ray is less than 50.
So when it is the case and the distance is less than 50 the light source sets to position that is behind the character and he gets illuminated by the light of his flashlight from behind.
KrutoyKolbas is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 01-28-2022 , 21:05   Re: [L4D & L4D2] Dynamic Light (1.8) [15-Feb-2021]
Reply With Quote #47

The lines should be changed to this I think:

PHP Code:
vPos[0] -= vAng[0] * (fDist 50 50 fDist);
vPos[1] -= vAng[1] * (fDist 50 50 fDist);
vPos[2] -= vAng[2] * (fDist 50 50 fDist);


vPos[0] -= vAng[0] * (fDist 50 50 fDist);
vPos[1] -= vAng[1] * (fDist 50 50 fDist);
vPos[2] -= vAng[2] * (fDist 50 50 fDist); 
So it teleports closer, also maybe needs -5 or something so its not right up against the wall.

Good spot, thanks. Although I still can't replicate the issue of being too close to something. Would like to know where I can test that.
__________________

Last edited by Silvers; 02-04-2022 at 12:42.
Silvers is offline
KrutoyKolbas
New Member
Join Date: Jan 2022
Location: Russia
Old 01-29-2022 , 02:26   Re: [L4D & L4D2] Dynamic Light (1.8) [15-Feb-2021]
Reply With Quote #48

Example of what i am talking about:
https://imgur.com/a/J9ovwWk
KrutoyKolbas is offline
WhatsAnName
Member
Join Date: Jun 2018
Old 02-04-2022 , 12:06   Re: [L4D & L4D2] Dynamic Light (1.8) [15-Feb-2021]
Reply With Quote #49

whenever i get pinned by a smoker or charger it switches the light mode off and on.
WhatsAnName is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 02-04-2022 , 12:42   Re: [L4D & L4D2] Dynamic Light (1.8) [15-Feb-2021]
Reply With Quote #50

Quote:
Originally Posted by KrutoyKolbas View Post
Example of what i am talking about:
https://imgur.com/a/J9ovwWk
Can you test the changes I suggested and recompile the plugin?

Quote:
Originally Posted by WhatsAnName View Post
whenever i get pinned by a smoker or charger it switches the light mode off and on.
The light turns off, I don't see it turning back on. It'll flicker when changing between dragging/carrying and hanging/pummeling. That would require adding a timer to delay switching back on etc. Don't think it's such a big deal.
__________________
Silvers 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 07:42.


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