Garry's Mod

Garry's Mod

Enhanced Camera
Framerate drop
When theres a playermodel with props on it, the framerate for me drops to 27, and my average is 100.
< >
Showing 1-3 of 3 comments
Paynamia 22 Jul, 2017 @ 2:49pm 
It's because of the submaterial system. IIRC, it's the GetSubMaterial() function that's directly responsible, but I can't quite remember. Either way, this version I modified currently only calls this function when something else happens, so it doesn't lag with certain models. It needs a better way of doing it, but it works for now.

https://github.com/SkyNinja/gmod-enhanced-camera
Niko #teamtojo 27 Aug, 2017 @ 1:39am 
Fantastic job, extreme lag spike is virtually nonexistent with your changes.
LOL DUDE 14 Jan, 2018 @ 12:10am 
Originally posted by Paynamia:
It's because of the submaterial system. IIRC, it's the GetSubMaterial() function that's directly responsible, but I can't quite remember. Either way, this version I modified currently only calls this function when something else happens, so it doesn't lag with certain models. It needs a better way of doing it, but it works for now.

https://github.com/SkyNinja/gmod-enhanced-camera
Oh, yeah, this works loads better! Thanks for the update to it!

Though, it still spams the console with errors if you try to use a playermodel that doesn't have a head bone at all (I.E. the classic Headcrab Zombie) and when you try to use a pill from ERROR's Killing Floor SNPC's or Patriarch SNPC. Any chance you could work out a patch to make it compatible with either/both of those?

Edit: Here's the error for the headless playermodels:
[ULib] addons/gmod-enhanced-camera-master/lua/autorun/client/enhanced_camera.lua:443: bad argument #1 to 'GetBonePosition' (number expected, got no value) 1. GetBonePosition - [C]:-1 2. Think - addons/gmod-enhanced-camera-master/lua/autorun/client/enhanced_camera.lua:443 3. fn - addons/gmod-enhanced-camera-master/lua/autorun/client/enhanced_camera.lua:448 4. unknown - lua/ulib/shared/hook.lua:109
And this is the error for the Killing Floor pills:
[ULib] addons/gmod-enhanced-camera-master/lua/autorun/client/enhanced_camera.lua:300: bad argument #1 to 'ManipulateBoneScale' (number expected, got nil) 1. ManipulateBoneScale - [C]:-1 2. OnPoseChange - addons/gmod-enhanced-camera-master/lua/autorun/client/enhanced_camera.lua:300 3. Think - addons/gmod-enhanced-camera-master/lua/autorun/client/enhanced_camera.lua:409 4. fn - addons/gmod-enhanced-camera-master/lua/autorun/client/enhanced_camera.lua:448 5. unknown - lua/ulib/shared/hook.lua:109
Last edited by LOL DUDE; 18 Jan, 2018 @ 2:29pm
< >
Showing 1-3 of 3 comments
Per page: 1530 50