-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add basic sync for PvP #2107
Add basic sync for PvP #2107
Conversation
df9fb08
to
eb16f7b
Compare
is there really one who likes pvp in Subnautica? if one wants pvp, why not go ahead to play pvp games? there are tons of such games. i don't think core players of Subnautica are interested in pvp. |
Most multiplayer games have ways for players to damage each other. Even if it's not the main focus of the game, it gives players more options to have fun with their friends. Having a last man standing battle within a large base or picking people up and repelling them far away with the propulsion cannon is the kind of thing people (like myself) like to do with our friends. I don't think the argument of "if you want to do PvP, play a PvP game" is a good reason to stop this. Besides, you can just turn PvP off in the configs if you don't want it. |
Waiting for #2106 to be merged, then this will get some tests and will be ready to be merged |
NitroxServer/Communication/Packets/Processors/PvPAttackProcessor.cs
Outdated
Show resolved
Hide resolved
{ | ||
public override void Process(PvPAttack packet) | ||
{ | ||
if (Player.main && Player.main.liveMixin) |
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.
Would log not finding this as an error bc the damage is disappearing without the player sending a health update back to the server.
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.
If local player isn't instantiated, or its live mixin isn't found, then it can only mean that the game is in an early loading state/in an game closing unloading state in which case it's not necessary to log the failure
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.
CW review
NitroxServer/Communication/Packets/Processors/PvPAttackProcessor.cs
Outdated
Show resolved
Hide resolved
Works for me so after code changes are done I'll approve. |
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.
👍
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.
Tests still work so LGTM
Would it be a good idea to maybe add a |
I believe a server config is not meant to be modified at play time and this kind of option should be thought about before starting a server. But I'd like to hear about others' opinions |
Isn't the gamemode config setting modified during play time with the |
I could see an argument for both a command and not. I don't think if it's hard to add an option for it then we shouldn't but if it's going to be hard then maybe just a server setting in the config for now will do |
Will add a "pvp on/off" command |
Maybe: add sync for propulsion and repulsion cannonTo be tested (and merged) upon #2106 (won't work without it)