Skip to content

Conversation

@tornac1234
Copy link
Collaborator

  • Keypad sync fix
  • Fix falling through the Aurora when spawning inside

I might want to add a things or two before release which I'll put in here

@tornac1234 tornac1234 added this to the 1.8 milestone Jan 1, 2025
Copy link
Member

@dartasen dartasen left a comment

Choose a reason for hiding this comment

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

Shouldn't this be separate PR's ?

public static IEnumerator WaitForWorldLoad()
public static IEnumerator WaitForWorldLoad(WaitForSeconds initialWait = null)
{
Entities entities = NitroxServiceLocator.LocateService<Entities>();
Copy link
Member

Choose a reason for hiding this comment

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

You should be using dependency injection, this will generate a warning from our analyzers

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It won't work in this static context

Copy link
Member

Choose a reason for hiding this comment

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

Terrain is already being required inside Mutiplayer mb, so static can be removed

public static void WaitForEntities()
{
// In case the player is spawned in the air, we need to hold them up while all the entities load around them
if (Player.main && !Player.main.IsUnderwater() && !Player.main.groundMotor.grounded)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note to fix: this should not trigger when inside a subroot/escape pod

@AtlantaDEV-ui
Copy link

// KeypadMetadata.cs
[DataContract]
public class KeypadMetadata
{
// Constructor for serialization. Has to be "protected" for json serialization.
protected KeypadMetadata() { }

[DataMember(Order = 2)]
public string PathFromRoot { get; }

// Additional properties and methods as needed

}

// Terrain.cs
public class Terrain : MonoBehaviour
{
private Entities _entities;

// Constructor or initialization method to inject dependencies
public Terrain(Entities entities)
{
    _entities = entities;
}

public void WaitForEntities()
{
    // In case the player is spawned in the air, we need to hold them up while all the entities load around them
    if (Player.main && !Player.main.IsUnderwater() && !Player.main.groundMotor.grounded)
    {
        // Check if the player is inside a subroot or escape pod
        if (!IsInsideSubrootOrEscapePod(Player.main))
        {
            // Logic to hold the player up
        }
    }
}

private bool IsInsideSubrootOrEscapePod(Player player)
{
    // Implement logic to determine if the player is inside a subroot or escape pod
    return false; // Placeholder return value
}

}

Make sure to replace the placeholder logic in IsInsideSubrootOrEscapePod with the actual implementation that checks the player's position relative to the subroot or escape pod.

@dartasen dartasen modified the milestones: 1.8, 1.9, Meta May 27, 2025
@tornac1234 tornac1234 modified the milestones: Meta, 1.9 Jun 27, 2025
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.

4 participants