Skip to content
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

Button Fixes and TargetID Integration #1580

Merged
merged 10 commits into from
Aug 17, 2024
Merged

Button Fixes and TargetID Integration #1580

merged 10 commits into from
Aug 17, 2024

Conversation

TimGoll
Copy link
Member

@TimGoll TimGoll commented Aug 17, 2024

Fixes #1557

Adds TargetID to leavers ...
image

... and buttons
image

Note: The fix of this issue was done by making the lever and buttons non-solid. This has to be done both on server and client. After that was done, the addition of targetID consists only of 20 lines of code.

Note 2: The button and lever entities are non-detectable on the client as they are only a base entity there. Therefore it has to be synced from the server.

@TimGoll TimGoll added type/bug Something isn't working type/enhancement Enhancement or simple change to existing functionality labels Aug 17, 2024
@TimGoll TimGoll added this to the v0.14.0b milestone Aug 17, 2024
@TimGoll TimGoll marked this pull request as ready for review August 17, 2024 15:56
gamemodes/terrortown/gamemode/shared/sh_entity.lua Outdated Show resolved Hide resolved
gamemodes/terrortown/gamemode/shared/sh_entity.lua Outdated Show resolved Hide resolved
@TimGoll TimGoll merged commit bf3590f into master Aug 17, 2024
4 checks passed
@TimGoll TimGoll deleted the button-fixes-targetid branch August 17, 2024 19:09
@TimGoll TimGoll mentioned this pull request Sep 13, 2024
TimGoll added a commit that referenced this pull request Sep 14, 2024
This pullrequest introduces a further fix to buttons that were
introduced by the move of use calls to the client. It fixes the same
issue the last PR (#1580) attempted to fix, but this time it improves
upon this. Two things are done in this PR:

- added `foundButton:SetSolid(SOLID_BSP)` to make sure all buttons on
the map can be actually hit by a trace. This also fixes the issue
introduced in the last PR, where some buttons now had a hitbox the
player could collide with
- rewrote the syncing to the client as it was a nightmare. Many entites
are NULL entities on the client if the player is too far away. This new
approach with NWInts fixes this because it makes use of the internal
GMod systems.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working type/enhancement Enhancement or simple change to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Any non solid entities cannot be interacted with
2 participants