• Next Update v3 - Latest update is live
    973 replies, posted
We can still be edgies [img]https://dl.dropboxusercontent.com/s/tjeehyckrb3so07/2015-10-07_19-27-46.jpg?dl=0[/img]
RobotBoy, any idea about the clientside entity trace thing I annoyed you with a couple of times now? I tested a lot of theories about it on page 6 of this thread and on this page I also summarized the results (nothing works). Sorry to keep bugging you, but you're replied to most other posts AND updated the game again with a few new changes.
[QUOTE=MPan1;48856053]RobotBoy, any idea about the clientside entity trace thing I annoyed you with a couple of times now? I tested a lot of theories about it on page 6 of this thread and on this page I also summarized the results (nothing works). Sorry to keep bugging you, but you're replied to most other posts AND updated the game again with a few new changes.[/QUOTE] No.
You need to say that more often.
[QUOTE=Ott;48856277]You need to say that more often.[/QUOTE] No.
[QUOTE=Robotboy655;48856248]No.[/QUOTE] There goes another one of my projects. Care to elaborate? Can't be done or can't be bothered? I'm going to have to use the network library now to create a bunch of possible exploits involving ents.Create and traces just before the prop created smashes everything near it away.
[QUOTE=MPan1;48856674]There goes another one of my projects. Care to elaborate? Can't be done or can't be bothered? I'm going to have to use the network library now to create a bunch of possible exploits involving ents.Create and traces just before the prop created smashes everything near it away.[/QUOTE] It's sole purpose is to display models in GUI, not to make models in world space.
[QUOTE=Robotboy655;48856711]It's sole purpose is to display models in GUI, not to make models in world space.[/QUOTE] Uh what about clientside models that are displayed in world space? I don't think he means just for dmodelpanel
[QUOTE=AJ10017;48857034]Uh what about clientside models that are displayed in world space? I don't think he means just for dmodelpanel[/QUOTE] I am talking what the entity was made for, not what's its used for. [editline]8th October 2015[/editline] I am talking about the entity, not the function.
[QUOTE=MPan1;48856053]RobotBoy, any idea about the clientside entity trace thing I annoyed you with a couple of times now? I tested a lot of theories about it on page 6 of this thread and on this page I also summarized the results (nothing works). Sorry to keep bugging you, but you're replied to most other posts AND updated the game again with a few new changes.[/QUOTE] Sounds like you need a workaround, what are you trying to do exactly? What sort of trace?
[QUOTE=>>oubliette<<;48857437]Sounds like you need a workaround, what are you trying to do exactly? What sort of trace?[/QUOTE] I'm trying to have a DModelPanel with an Earth model on it, and when you press on any part of the DModelPanel, a trace will be performed from the cursor position to see if you clicked any part of the Earth, and if you did, I need to get the hitpos relative to the Earth model. I need to do this because this is for an entity (which has the earth model). If you shoot the entity close to the vector you defined in the DModelPanel, the damage gets scaled by how close you shoot to it.
[QUOTE=MPan1;48863463]I'm trying to have a DModelPanel with an Earth model on it, and when you press on any part of the DModelPanel, a trace will be performed from the cursor position to see if you clicked any part of the Earth, and if you did, I need to get the hitpos relative to the Earth model. I need to do this because this is for an entity (which has the earth model). If you shoot the entity close to the vector you defined in the DModelPanel, the damage gets scaled by how close you shoot to it.[/QUOTE] The only workaround I can think of that doesn't involve actual traces would be to get the triangles of the model and perform a ray - plane intersection test against every triangle. Probably too inefficient for real time but might be ok to run on mouse click.
[QUOTE=wh1t3rabbit;48863733]The only workaround I can think of that doesn't involve actual traces would be to get the triangles of the model and perform a ray - plane intersection test against every triangle. Probably too inefficient for real time but might be ok to run on mouse click.[/QUOTE] en.wikipedia.org/wiki/Line–sphere_intersection
[QUOTE=wh1t3rabbit;48863733]Perform a ray - plane intersection test against every triangle.[/QUOTE] Do you honestly think I know anything about maths? [editline]9th October 2015[/editline] Also, how the hell am I meant to get 'every triangle'? Isn't there a way to just assume it's a complete circle?
[QUOTE=MPan1;48863773]Do you honestly think I know anything about maths? [editline]9th October 2015[/editline] Also, how the hell am I meant to get 'every triangle'? Isn't there a way to just assume it's a complete circle?[/QUOTE] [url]https://en.wikipedia.org/wiki/Line–sphere_intersection[/url]
[QUOTE=MPan1;48863773]Do you honestly think I know anything about maths? [editline]9th October 2015[/editline] Also, how the hell am I meant to get 'every triangle'? Isn't there a way to just assume it's a complete circle?[/QUOTE] I realise now the only triangle getting function on the wiki is for phys objects so that wouldn't be helpful anyway. If you can assume it is a smooth sphere then go with Ott's link, I was thinking you had an earth with mountains and stuff and needed an accurate trace.
[QUOTE=Noi;48863271]olleh[/QUOTE] As far as I can tell, SWAP buffers are used to write or read stuff from the disk. I am not 100% sure, I keep seeing DEFINE_SWAP*() for many structs.
[QUOTE=Noi;48864749]Isn't it about rendering? Like, swapping front and back buffer or something.[/QUOTE] Not necessarily. I don't know which one is displayed in the vprof, but a lot of it little-big endian swaps. [editline]9th October 2015[/editline] "Swap Buffers" in vprof appears to be indeed rendering related, material system.
[QUOTE=MPan1;48863463]I'm trying to have a DModelPanel with an Earth model on it, and when you press on any part of the DModelPanel, a trace will be performed from the cursor position to see if you clicked any part of the Earth, and if you did, I need to get the hitpos relative to the Earth model. I need to do this because this is for an entity (which has the earth model). If you shoot the entity close to the vector you defined in the DModelPanel, the damage gets scaled by how close you shoot to it.[/QUOTE] Why not create a serverside entity and place it invisibly outside of the map somewhere with no physics, then manipulate it's position and angles on the client so you can perform traces that actually hit it?
[QUOTE=>>oubliette<<;48865339]Why not create a serverside entity and place it invisibly outside of the map somewhere with no physics, then manipulate it's position and angles on the client so you can perform traces that actually hit it?[/QUOTE] Because I'd have to create that entity SERVERSIDE, which is what I'm trying to avoid (since clients could probably spam entity spawning), and if it had no physics, I think the trace wouldn't hit it. Also, someone DM'd me some confusing code that should do some sphere-vector-trace thing based on maths only, which hopefully I can figure out if I fiddle with it enough.
[QUOTE=MPan1;48869359]Because I'd have to create that entity SERVERSIDE, which is what I'm trying to avoid (since clients could probably spam entity spawning), and if it had no physics, I think the trace wouldn't hit it. Also, someone DM'd me some confusing code that should do some sphere-vector-trace thing based on maths only, which hopefully I can figure out if I fiddle with it enough.[/QUOTE] The DEBRIS_TRIGGER collision group will only collide with the world and still hit traces.
[QUOTE=code_gs;48869740]The DEBRIS_TRIGGER collision group will only collide with the world and still hit traces.[/QUOTE] Then I still have to do some dodgy networking for a simple panel (and if it's outside the bounds of the map, won't it just be pushed back in or something?) Think how complicated it might get if two clients try to use the panel at the same time (two ents with different rotations) and they get different trace results!
[QUOTE=Noi;48869909]Is there a way to make lua cache unique for each client? Whether by binary module or not, doesn't matter.[/QUOTE] Unique as in?
[QUOTE=kila58;48871495]Unique as in?[/QUOTE] I think that's what he wants : All the players have the same [U]compressed[/U] lua files but with a unique key hidden in the compressed file (The unique key will not be decompressed). Or maybe : Each player have the same [U]encrypted[/U] lua files but each one with a different key. The best way would be to overwrite the default cache system, with a binary module, it would be easier to do on linux because of the debug infos. -or- Just ignore the default lua cache system and just send the lua files using the net lib when the player join.
[QUOTE=MPan1;48869359]Because I'd have to create that entity SERVERSIDE, which is what I'm trying to avoid (since clients could probably spam entity spawning), and if it had no physics, I think the trace wouldn't hit it. Also, someone DM'd me some confusing code that should do some sphere-vector-trace thing based on maths only, which hopefully I can figure out if I fiddle with it enough.[/QUOTE] Doesn't need to be dodgy, server creates one entity that's never deleted. The clients only need to know about it, before the trace is made they can set the position and angles on the CLIENT. The client isn't telling the server to do anything dodgy.
[QUOTE=ExtReMLapin;48872355]I think that's what he wants : All the players have the same [U]compressed[/U] lua files but with a unique key hidden in the compressed file (The unique key will not be decompressed). Or maybe : Each player have the same [U]encrypted[/U] lua files but each one with a different key. The best way would be to overwrite the default cache system, with a binary module, it would be easier to do on linux because of the debug infos. -or- Just ignore the default lua cache system and just send the lua files using the net lib when the player join.[/QUOTE] 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.
The things I would do to have multi core rendering return to this game.
[QUOTE=>>oubliette<<;48872385]Doesn't need to be dodgy, server creates one entity that's never deleted. The clients only need to know about it, before the trace is made they can set the position and angles on the CLIENT. The client isn't telling the server to do anything dodgy.[/QUOTE] 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=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] Rotate the trace origin around the entity instead of the entity itself. Also if it is a perfect sphere, it makes no difference anyway.
[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] I don't think you understand, you set pos/ang JUST before the trace is made and the client will think the entity is where you said it was until the server says otherwise. Setting the pos/ang is ONLY done on the client, note them being shared: [url=http://wiki.garrysmod.com/page/Entity/SetAngles]Entity.SetAngles[/url] & [url=http://wiki.garrysmod.com/page/Entity/SetPos]Entity.SetPos[/url]
Sorry, you need to Log In to post a reply to this thread.