Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
[Amnesia Lantern Rework] lua/weapons/buu_lantern.lua:381: attempt to call method 'GetLantern_Holstered' (a nil value)
1. v - lua/weapons/buu_lantern.lua:381
2. unknown - lua/includes/modules/hook.lua:96
Currently you do
local ent = v:GetShootPos()
local pos = ent
pos = pos + v:GetForward() * 30
pos = pos + v:GetRight() * 5
pos = pos + v:GetUp() * -20
A better solution would be to do something like
local pos = v:GetBonePosition( v:LookupBone("ValveBiped.Bip01_R_Hand") )
(and from that position you can move it a bit if needed).
The Shooting pos does not move with the player correctly
Also i did performance test and already with 5 players this was the hook which took most calculation time. A *single* think hook is *one* think hook to much, since there is almost never a valid reason for a think hook, especially not in this case as you use it.
There is no downside in putting this clientside, but i just wanted to mention it for other users, i have edited it on my server files so we don't have that performance impact.
1) If the manipulation is done clientside only, it won't affect the player hitboxes.
2) A *single* think hook that loops through all players once is not going to cause a significant impact in performance, especially since it will only be called once per server tick.
3) Said loop also tries its best to filter out anyone who is not affected by the bone manipulations (which are a heavy operation), so it won't really be an issue even in a large server, unless literally everyone is using the lantern (and even then, players are likely to be GPU bound because dynamic lights in GMod are shitty shit shit).