-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Defibrillator refactor and add defib prediction #30044
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
base: master
Are you sure you want to change the base?
Defibrillator refactor and add defib prediction #30044
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
fixed merge conflict, passed tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR.
I tested the functionality and it was not doing the Electrocution animation. This is because the server code is not calling the shared code for Zap.
move electrocution to server side, cuz only there it works
fixed. I moved |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are any of the fields even networked?
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Unfortunately you'll start mention people on Discord or on github to get attention, the PR backlog has only increased. Can you sort the merge conflicts and @ sloth |
defib.predictive3.2025-07-25.mp4Upstreamed and made video |
|
Tested, works fine when integrated with latest master. |
|
Did somebody say prediction 👺 |
|
Sorry I just wanted to use the new tag, you can ignore me. |
|
well, everything is works and tested locally, ci tests are passed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the long wait on this, I've been busy recently. While testing I found another issue.
| BreakOnMove = !component.AllowDoAfterMovement | ||
| }); | ||
| } | ||
| base.Zap(uid, target, user, component); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This causes mispredicts with TargetBeforeDefibrillatorZapsEvent being cancelled or changing the target, since that will be applied on the client but the server here proceeds ignoring it.
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
About the PR
Refactored defibrillator's code and made it predictive according to issue #28051
I've set
cvar net.fakelagmin 0.4to fake lags, defibs predictions works great.Why / Balance
More smooth experience using defibrillator overall.
Technical details
Changed defibs code, make prediction. And my thoughts:
A lot of possibilities to make predictive and refactor to
PowerCellSystem, gauges doAfter, and med overall, but it would take a lot of work and I'm too lazy to do it.Media
New video defib predictive defib predictive 2025-07-25
defib.predictive3.2025-07-25.mp4
Old defib predictive 2024-07-15
https://github.com/user-attachments/assets/44a49300-5ec5-49ff-86d5-dbaa15b8acff
Breaking changes
Defibrillator refactor and made it predictive, add defibs code in Content.Shared, Content.Client.
Changelog
no 🆑 no fun