[QUOTE=MPan1;48875371]If only one entity was created, then since the entity is turnable, two clients trying to turn it at once would result in nothing happening, and when the trace was performed, the vector returned would be a really dodgy value[/QUOTE]
You can't have two things happen at the same time. One client would click your ui causing the entity to turn and the trace to be called in the same frame. Then another client will do the same thing some time after that. Even if 2 clients somehow do it in the same frame one will still have to be called before the other, and all your math will have been finished before the next gets processed.
Unless for some reason your waiting a few seconds between rotating the entity and doing the trace, in that case your asking for trouble
So it's possible for an entity to turn a bunch of times in just one frame?
[QUOTE=MPan1;48876012]So it's possible for an entity to turn a bunch of times in just one frame?[/QUOTE]
Is it possible for you guys move your problem solving out of this thread please?
Is it also possible that you can launch the game and test it yourself?
[QUOTE=MPan1;48876012]So it's possible for an entity to turn a bunch of times in just one frame?[/QUOTE]
Yes.
Also, sorry Robotboy
[QUOTE=slayer3032;48835769]Would it be possible to get the cheat flag removed from the gravgun convars since Gmod isn't HL2 singleplayer?
[code]
"physcannon_minforce" = "700"
game cheat replicated
"physcannon_maxforce" = "1500"
game cheat replicated
"physcannon_maxmass" = "1500" ( def. "250" )
game cheat replicated
"physcannon_tracelength" = "100" ( def. "250" )
game cheat replicated
"physcannon_chargetime" = "2"
game cheat replicated
"physcannon_pullforce" = "10000" ( def. "4000" )
game cheat replicated
"physcannon_cone" = "0.97"
game cheat replicated
"physcannon_ball_cone" = "0.997"
game cheat replicated
[/code]
We have these wonderful physgun convars which are quite useful but we can't modify the gravgun similarly.
[code]
"physgun_maxAngular" = "5000"
game
"physgun_maxAngularDamping" = "10000"
game
"physgun_maxSpeed" = "5000"
game
"physgun_maxSpeedDamping" = "10000"
game
"physgun_DampingFactor" = "0.8"
game
"physgun_teleportDistance" = "0"
game
"physgun_timeToArrive" = "0.05"
game
"physgun_timeToArriveRagdoll" = "0.1"
game
[/code]
[url]https://github.com/Facepunch/garrysmod-requests/issues/571[/url]
There's a bunch of really fun to play with commands which customize the built in HL2 weapons as well, I'm sure many have the cheats flag applied to them as well that could definitely be removed being that the server controls them.[/QUOTE]
I'm aware this isn't high priority at all but is there any way we could get it tossed into an upcoming update at some point?
[QUOTE=kila58;48874017]All of those methods are useless because you can just hook runstring and get their full path, name, and contents including any Luas that are ran using sendlua.[/QUOTE]
Only the two last ones can be fucked
The two first one can be made with a serverside module and just regenerate the lua cache for each player.
[QUOTE=ExtReMLapin;48876250]Only the two last ones can be fucked
The two first one can be made with a serverside module and just regenerate the lua cache for each player.[/QUOTE]
If you have Lua code that is executed, it can be read.
[QUOTE=Willox;48876264]If you have Lua code that is executed, it can be read.[/QUOTE]
Yeah i know, but he just want to make unique cache files for each clients, he didn't talk about protecting it.
(I don't even know why Kila58 talked about "useless function", he just wanted unique cache files)
And uh yeah, i was wrong on my last post, it's not the two last methods.
The net method was just if he was too lazy to make a binary module.
And yeah, btw you don't need any external extractor to decompress cache .
[lua]
local str = file.Read("garrysmod/cache/lua/whatever.lua", "BASE_PATH")
str = string.Right(str, string.len(str)-4)
str = util.Decompress(str)
print(str) file.Write("drts.txt", str)
[/lua]
Dun dun dun
[QUOTE=ExtReMLapin;48876339]Yeah i know, but he just want to make unique cache files for each clients, he didn't talk about protecting it.
(I don't even know why Kila58 talked about "useless function", he just wanted unique cache files)
And uh yeah, i was wrong on my last post, it's not the two last methods.
The net method was just if he was too lazy to make a binary module.[/QUOTE]
You'll probably find that "hook runstring" = "hook the runstring C method, which Lua files are also executed through"
I'm[QUOTE=ExtReMLapin;48876339]Yeah i know, but he just want to make unique cache files for each clients, he didn't talk about protecting it.
(I don't even know why Kila58 talked about "useless function", he just wanted unique cache files)
And uh yeah, i was wrong on my last post, it's not the two last methods.
The net method was just if he was too lazy to make a binary module.[/QUOTE]
I could only make an assumption since he never provided why he would want to do such a thing.
[QUOTE=Willox;48876359]You'll probably find that "hook runstring" = "hook the runstring C method, which Lua files are also executed through"[/QUOTE]
Oh, i didn't think about that.
Let's be honest, a lot of words were put into Noi's mouth. Noi should post an explanation as to why they want to achieve this.
[QUOTE=Robotboy655;48876073]Wrong thread for this[/QUOTE]
Sorry, just verifying it.
[QUOTE=Noi;48878626]I want to have different lua cache per user, put tracking IDs somewhere, i think.[/QUOTE]
Yea but what exactly are you trying to do? An in the end goal. I can assure you there is most likely a better method out there.
[QUOTE=kila58;48878800]Yea but what exactly are you trying to do? An in the end goal. I can assure you there is most likely a better method out there.[/QUOTE]
[QUOTE=Noi;48878626]I want to have different lua cache per user, put tracking IDs somewhere, i think.[/QUOTE]
I will have to start banning you if you don't stop.
This is a wrong thread for discussing anything not related to next update.
snip, using Initialize rather than InitPostEntity fixed the issue.
It most definitely works as GMod stranded has been using it for years.
it needs to be set when the server starts and before client joins, i use RunConsoleCommand to do it
[QUOTE=Looter;48881152]Is there any way we could fix sv_skyname not working in singleplayer? I have tried every hacky method I can think of to override or replace a maps skybox texture with painted in single player / listen servers but nothing is working, so the only real way to do this would be to make sv_skyname work post-join / update after its set to something new.[/QUOTE]
I used to do something like this
[lua]
local SourceSkyname = GetConVar("sv_skyname"):GetString() --We need the source of the maps original skybox texture so we can manipulate it.
print("Current Skybox: ", SourceSkyname)
local SourceSkyPre = {"lf","ft","rt","bk","dn","up",}
local SourceSkyMat = {
Material("skybox/"..SourceSkyname.."lf"),
Material("skybox/"..SourceSkyname.."ft"),
Material("skybox/"..SourceSkyname.."rt"),
Material("skybox/"..SourceSkyname.."bk"),
Material("skybox/"..SourceSkyname.."dn"),
Material("skybox/"..SourceSkyname.."up"),
}
function GM:ChangeSkybox(skyboxname)
for i = 1,6 do
local basetexture = Material("skybox/"..skyboxname..SourceSkyPre[i]):GetTexture("$basetexture")
local hdrbase = Material("skybox/"..skyboxname..SourceSkyPre[i]):GetTexture("$hdrbasetexture")
local hdrcompressedtexture = Material("skybox/"..skyboxname..SourceSkyPre[i]):GetTexture("$hdrcompressedtexture")
if basetexture ~= nil then
SourceSkyMat[i]:SetTexture("$basetexture", basetexture)
end
if hdrbase ~= nil then
SourceSkyMat[i]:SetTexture("$hdrbase", hdrbase)
end
if hdrcompressedtexture ~= nil then
SourceSkyMat[i]:SetTexture("$hdrcompressedtexture", hdrcompressedtexture)
end
end
end
hook.Add("OnEntityCreated", "COOP_SkyboxOverride", function(ent)
if ent == LocalPlayer() then
DbgPrint("Found LocalPlayer")
if GAMEMODE.SkyboxOverride then
DbgPrint("Changing Skybox")
GAMEMODE:ChangeSkybox(GAMEMODE.SkyboxOverride)
end
end
end)
[/lua]
This just doesn't work too well on skyboxes with hdr
Thanks for the help guys I figured it out, hook was being called too late. When I was doing hacky material overrides the main issue I hit was painted not having a basetexture and relying on a material proxy shader, which I wasn't able to reproduce properly with CreateMaterial.
[B]Edit:[/B] While I'm here though, any chance at SVG support in garrysmod? Would be awesome to be able to have images that look good at any resolution or scale.
[QUOTE=Looter;48881227]Thanks for the help guys I figured it out, hook was being called too late. When I was doing hacky material overrides the main issue I hit was painted not having a basetexture and relying on a material proxy shader, which I wasn't able to reproduce properly with CreateMaterial.
[B]Edit:[/B] While I'm here though, any chance at SVG support in garrysmod? Would be awesome to be able to have images that look good at any resolution or scale.[/QUOTE]
Well you can technically use an HTML frame. But indeed SVG support would be a nice thing.
Someone did a SVG wrapper in an old WAYWO thread.
[url]https://facepunch.com/showthread.php?t=1260809&p=42667287&viewfull=1#post42667287[/url]
[url]https://facepunch.com/showthread.php?t=1434585&p=46388206&viewfull=1#post46388206[/url]
Tbh the best way would be to use Scaleform GFx
[QUOTE=ExtReMLapin;48881922]Someone did a SVG wrapper in an old WAYO thread.
[url]https://facepunch.com/showthread.php?t=1260809&p=42667287&viewfull=1#post42667287[/url]
[url]https://facepunch.com/showthread.php?t=1434585&p=46388206&viewfull=1#post46388206[/url]
Tbh the best way would be to use Scaleform GFx[/QUOTE]
Scaleform is a nightmare to work with and requires extensive flash knowledge, and licensing.
I added IsValid to all physobj setmaterial things, and it still happens, long time since though
[img]http://rp.braxnet.org/scr/1444720488179.png[/img]
[QUOTE=Giraffen93;48891530]I added IsValid to all physobj setmaterial things, and it still happens, long time since though
[img]http://rp.braxnet.org/scr/1444720488179.png[/img][/QUOTE]
Post new dumps? Will you be able to run a dev branch srcds if I add some debug output to the malfunctioning function?
Fallback textures weren't only used for players?
[QUOTE=Robotboy655;48892413]Post new dumps? Will you be able to run a dev branch srcds if I add some debug output to the malfunctioning function?[/QUOTE]
[url]http://rp.braxnet.org/scr/1444768158138.zip[/url]
not really
[QUOTE=Giraffen93;48895151][url]http://rp.braxnet.org/scr/1444768158138.zip[/url]
not really[/QUOTE]
That is a generic vphysics.dll crash that I cannot analyze.
Can we get some bindings for the steam controller stuff? Namely GetControllerState and TriggerHapticPulse?
I really want to start messing around with the controller in Gmod once I it.
[QUOTE=Robotboy655;48895370]That is a generic vphysics.dll crash that I cannot analyze.[/QUOTE]
It'd be super swell if someone could pick up this project. Perhaps someone with indepth knowledge and access to the remainder of the games functionality and innerworkings...
[url]https://github.com/DrChat/Gmod-vphysics[/url]
You know, and literally solve almost everything ever.
Sorry, you need to Log In to post a reply to this thread.