Garry's Mod

Garry's Mod

141 ratings
Dynamic Flashlight Fix
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Effects
Addon Tags: Fun, Realism
File Size
Posted
Updated
10.747 KB
4 Feb @ 12:42pm
5 Aug @ 5:07pm
3 Change Notes ( view )

Subscribe to download
Dynamic Flashlight Fix

In 2 collections by Arcius
功能插件
212 items
My Script Addon
14 items
Description
Original: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2558917151

Only tested on x86-64 branch

What Change
wall detect
allow use in vehicle
keep flashlight on when you respawn

New Client Convars
df_flashlight_offset: Flashlight position will backward some distance.
df_flashlight_offset_vehicle: Same as above, but use it in vehicle.

25.08.06 update:
df_flashlight_near: Objects less than this distance from the player, flashlight will not render on it (both light and shadow).
df_flashlight_near_self: Same as above, but only affect yourself.
df_flashlight_wall_detect_distance: If distance between you and wall less than this value, the flashlight will backward to this distance
df_flashlight_old_render: 0=use new one, 1=use old one. Old flashlight render has a small delay when player change view angle, use new one to fix it, and some feature are invalid when use old render
9 Comments
♬♫~Joe Blaze~♫♬ 1 Sep @ 6:35pm 
Allow use with sit anywhere addon?
Arcius  [author] 5 Aug @ 3:49pm 
type 'df_flashlight_old_render 1' in console, if you still want use old one:winter2019happyyul:
Arcius  [author] 5 Aug @ 3:47pm 
@slxmmd I make an update, idk why it get smaller, cant replicate it, i write a new function, so 'df_flashlight_offset' is still work but i recommend to use 'df_flashlight_wall_detect_distance'.
noprime 4 Aug @ 12:40pm 
the flashlight would get smaller when close to the wall
Arcius  [author] 8 Feb @ 2:10am 
make sure "df_flashlight_shadow_self" has been set to 0 and df_flashlight_offset > 10.
if still not work, check your other addon , this addon may not compatible with other flashlight addon
Trooper_025 7 Feb @ 9:20pm 
unfortunately, flashlight still disappears in wall (i am on x86-64 branch)
Arcius  [author] 7 Feb @ 8:26pm 
github can not be accessed in my region. anyway if you don't like this , i will delete it
Riggs 7 Feb @ 9:40am 
could've at least made a pr on github rather than to straight reupload my work without any given consent.
Jiyū to anzen 6 Feb @ 1:44am 
Fixed all the things I was annoyed with- thanks for this!