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

Death markers setting #2253

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open

Conversation

OhmV-IR
Copy link
Contributor

@OhmV-IR OhmV-IR commented Jan 12, 2025

The death markers setting places beacons where players die so they can retrieve items or equipment that was left behind.
I have tested the PR in-game using 2 players, swim out a bit from the lifepod and use the kill command or suffocate, beacon should only appear for the dying player. Then when that player goes within 20m of the beacon or disconnects from the server the beacon should disappear. The beacon can also be hidden from the HUD through the PDA. Ready for CW reviews.
Completes issue #2155

@Coding-Hen
Copy link
Collaborator

I haven't tested this yet but a general question of does this still try and spawn a beacon even if the person is on land, if this is desired then does it spawn and roll around potentially not being in the correct place

@OhmV-IR
Copy link
Contributor Author

OhmV-IR commented Jan 12, 2025

Yeah so when it spawns on land it actually falls through the land to the water below. To combat this, I set the gravitational constant in the beacon's WorldForces component to 0 so gravity has no effect on it and added above-water drag because floating point error gave the object a tiny velocity in a random direction causing it to drag. it works on land now. Tested in-water again too

@OhmV-IR OhmV-IR requested a review from Coding-Hen January 12, 2025 21:52
@OhmV-IR
Copy link
Contributor Author

OhmV-IR commented Jan 12, 2025

Instead of using beacons have just switched to using blank gameobjects and attaching the PingInstance component. tested IG again

NitroxClient/GameLogic/LocalPlayer.cs Show resolved Hide resolved
NitroxPatcher/Patches/Dynamic/Player_OnKill_Patch.cs Outdated Show resolved Hide resolved
NitroxServer/ConsoleCommands/SetDeathMarkersCommand.cs Outdated Show resolved Hide resolved

namespace NitroxServer.ConsoleCommands;

internal class SetDeathMarkersCommand : Command
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
internal class SetDeathMarkersCommand : Command
public class SetDeathMarkersCommand : Command

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Every other command is an internal class, is there a reason why the death markers command should be different?

Copy link
Member

Choose a reason for hiding this comment

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

I looked initially at the newer AuroraCommand but it seems like the rest/old stuff is internal. You can leave it internal for now. We will unify it after V1.8

NitroxServer/ConsoleCommands/SetDeathMarkersCommand.cs Outdated Show resolved Hide resolved
Nitrox.Assets.Subnautica/LanguageFiles/en.json Outdated Show resolved Hide resolved
NitroxClient/GameLogic/LocalPlayer.cs Show resolved Hide resolved
NitroxClient/MonoBehaviours/Gui/InGame/DeathBeacon.cs Outdated Show resolved Hide resolved
NitroxClient/MonoBehaviours/Gui/InGame/DeathBeacon.cs Outdated Show resolved Hide resolved
NitroxClient/MonoBehaviours/Gui/InGame/DeathBeacon.cs Outdated Show resolved Hide resolved

namespace NitroxServer.ConsoleCommands;

internal class SetDeathMarkersCommand : Command
Copy link
Member

Choose a reason for hiding this comment

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

I looked initially at the newer AuroraCommand but it seems like the rest/old stuff is internal. You can leave it internal for now. We will unify it after V1.8

NitroxClient/MonoBehaviours/Gui/InGame/DeathBeacon.cs Outdated Show resolved Hide resolved
NitroxClient/GameLogic/LocalPlayer.cs Outdated Show resolved Hide resolved
Comment on lines 29 to 30
}
private void CheckPlayerDistance()
Copy link
Member

Choose a reason for hiding this comment

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

This is still open

Copy link
Member

@Jannify Jannify left a comment

Choose a reason for hiding this comment

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

LGTM CW

Copy link
Collaborator

@Coding-Hen Coding-Hen left a comment

Choose a reason for hiding this comment

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

LGTM, it will be good to have a marker for ease of finding the body again

@Coding-Hen
Copy link
Collaborator

Might be good to squash down some of the commits where sensible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants