Skip to content

Conversation

@TokenStyle
Copy link
Contributor

@TokenStyle TokenStyle commented Jul 14, 2024

About the PR

Refactored defibrillator's code and made it predictive according to issue #28051
I've set cvar net.fakelagmin 0.4 to 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

  • I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

Defibrillator refactor and made it predictive, add defibs code in Content.Shared, Content.Client.

Changelog

no 🆑 no fun

@TokenStyle TokenStyle requested a review from Jezithyr as a code owner July 14, 2024 19:58
@github-actions github-actions bot added the S: Needs Review Status: Requires additional reviews before being fully accepted. Not to be replaced by S: Approved. label Jul 14, 2024
@TokenStyle TokenStyle requested a review from deltanedas July 15, 2024 17:44
Copy link
Contributor

@deltanedas deltanedas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@github-actions github-actions bot added the S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted label Jul 19, 2024
@github-actions
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted label Jul 20, 2024
@TokenStyle
Copy link
Contributor Author

fixed merge conflict, passed tests

Copy link
Member

@ShadowCommander ShadowCommander left a 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.

@metalgearsloth metalgearsloth added S: Awaiting Changes Status: Changes are required before another review can happen and removed S: Needs Review Status: Requires additional reviews before being fully accepted. Not to be replaced by S: Approved. labels Jul 21, 2024
@TokenStyle
Copy link
Contributor Author

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.

fixed. I moved ElectrocutionSystem to server side, cuz method TryDoElectrocution have to be called only in server side, and there's nice comment to remind // only done serverside

@github-actions github-actions bot added S: Needs Review Status: Requires additional reviews before being fully accepted. Not to be replaced by S: Approved. and removed S: Awaiting Changes Status: Changes are required before another review can happen labels Jul 26, 2024
@TokenStyle TokenStyle requested a review from deltanedas August 8, 2024 10:21
Copy link
Contributor

@metalgearsloth metalgearsloth left a 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?

@eoineoineoin eoineoineoin added T: Refactor Type: Refactor of notable amount of codebase D2: Medium Difficulty: A good amount of codebase knowledge required. A: Medical Area: Medical department, including Chemistry labels Nov 18, 2024
@github-actions
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@K-Dynamic
Copy link
Contributor

Month has been passed

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

@github-actions github-actions bot added size/M Denotes a PR that changes 100-999 lines. and removed S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted labels Jul 25, 2025
@TokenStyle
Copy link
Contributor Author

defib.predictive3.2025-07-25.mp4

Upstreamed and made video

@FairlySadPanda
Copy link
Contributor

Tested, works fine when integrated with latest master.

@PJBot PJBot added S: Awaiting Changes Status: Changes are required before another review can happen and removed S: Needs Review Status: Requires additional reviews before being fully accepted. Not to be replaced by S: Approved. labels Sep 18, 2025
@slarticodefast slarticodefast self-assigned this Sep 18, 2025
@VerinSenpai
Copy link
Contributor

Did somebody say prediction 👺

@VerinSenpai VerinSenpai added the T: Prediction Type: Moving code to Content.Shared and making it predicted. label Sep 18, 2025
@VerinSenpai
Copy link
Contributor

Sorry I just wanted to use the new tag, you can ignore me.

@TokenStyle
Copy link
Contributor Author

well, everything is works and tested locally, ci tests are passed

Copy link
Member

@slarticodefast slarticodefast left a 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);
Copy link
Member

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.

@github-actions github-actions bot added the S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted label Oct 19, 2025
@github-actions
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A: Medical Area: Medical department, including Chemistry D2: Medium Difficulty: A good amount of codebase knowledge required. Merge Conflict P3: Standard Priority: Default priority for repository items. S: Awaiting Changes Status: Changes are required before another review can happen S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted size/M Denotes a PR that changes 100-999 lines. T: Prediction Type: Moving code to Content.Shared and making it predicted. T: Refactor Type: Refactor of notable amount of codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.