-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve the controlability of the CAP traces #108
base: master
Are you sure you want to change the base?
Conversation
For what exact purposes this can be used? since its nowhere used in cap |
I an contently coding the extended version of laser tool and I want to support the stargate portals. However CAP runs the quick trace, that does not give options for fine tuning when running it. This PR aims to add fine tuning for the |
This feature you wish to add is "frivolous" and only useful for yourself. And while it is appreciated...this mod doesn't really need it. You could easily override functionality in your addon and didn't even need to make a pull request. I don't speak for any of the main developers here. I'm just giving my opinion. |
Yeah. Maybe, but you can tune your traces now instead of relying on the one general option. Maybe it is a bit slower, but it gives more control on the result. I will let the CAP devs decide. It will be good for me and anyone that uses CAP traces :P |
Can we see source of util.QuickTrace somewhere? just curious if its really faster or not than util.TraceLine.. Also as possible way - we can use both ways, lets say if arguments are not provided - use quicktrace still, otherwise use advanced one. Just thoughts... |
It seems to be the same thing. Creates trace data internally and calls https://github.com/Facepunch/garrysmod/blob/master/garrysmod/lua/includes/extensions/util.lua#L56 My idea is generally to stop executing two traces for every beam trace with the CAP one being the priority and taken over by the regular trace when the traced entity is not a CAP-able entity ( like event horizon for example ). This will improve the speed for the Laser STool and the CAP traces base functionality will not get affected. I meant faster |
oh ok, so i guess its fine to replace this, will check later (near weekend) |
Numeric for is better than https://www.lua.org/pil/4.3.4.html |
It will be nice to also have non-zero width traces. This will also not affect the current tracing of CAP ( which uses: |
Optimized: Localize trace.start for speed
@AlexALX Hi, so any progress on this? Tell me if I can help somehow. |
Optimized: Speed of trace pick-up routine
Added: Zero width results in running the old trace method Updated: Closest trace measured according to true start origin
0ba3078
to
18e7a80
Compare
Finally it seems it is in a good place. |
Added: `QuickIgnore` as class method Added: Ray-sphere intersection in vector-N form `HitSphere` Removed: Unused variable `old` in `HitWall`
Hello, @AlexALX @TheMerkyShadow I've provided you with linear algebra solution of detecting shield intersection here local mpos, ppos = self:HitSphere(....)
if(mpos or ppos) then -- There is a ray-sphere intersection ( for spherical shields )
-- Do something with the closest or furthest intersection points
end |
Hi, is this final version? |
Hello, Yes, it is. It stays here for quite a while now ;) |
Hi, any progress on this. Tell me if I need to help! |
In my country war started, so can't say anything right now. |
75ca426
to
7702a96
Compare
…rcle Fixed: Return a proper value just like `StarGate.Trace:HitWall`
6c02745
to
e73a3a5
Compare
Just preserved the coding convention and fixed some mistakes ;) |
damn, can't merge this without checking, since looks way much changes. will see bit later. |
[cap] addons/cap/lua/stargate/shared/tracelines.lua:247: attempt to index global 'data' (a nil value)
|
Fixed, @AlexALX ;) |
Fixed: Some comment typos and if-statement brackets to match convention Updated: Use squared distance instead of meridian distance when comparing
Hello, @AlexALX I think we are ready. Made some optimizations |
No description provided.