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

Rework server-side entity spawning #2093

Merged
merged 6 commits into from
Jan 1, 2024

Conversation

tornac1234
Copy link
Collaborator

@tornac1234 tornac1234 commented Nov 23, 2023

  • Fix fragment spawning
  • Fix nested structure spawning (e.g a bottle of water spawns inside of a supply crate inside of a wreck)
  • Introduce an uniform UnityEngine.Random like generation for floats (see XORRandom)
  • Add a button to teleport to the selected object in the Scene debugger
  • Implement empty objects (like lights and things which we apparently ignored in the past but therefore didn't spawn)
  • Fix Crashes (the explosive fishes) postponed to a further PR which will also fix vehicle constructors and add finitions to the entity system
  • Handle sub-spawners monobehaviours in placeholders groups

NitroxModel/DataStructures/Unity/NitroxVector3.cs Outdated Show resolved Hide resolved
NitroxServer/Helper/XORRandom.cs Show resolved Hide resolved
NitroxServer/Helper/XORRandom.cs Outdated Show resolved Hide resolved
NitroxServer/Helper/XORRandom.cs Outdated Show resolved Hide resolved
Copy link
Collaborator

@Measurity Measurity left a comment

Choose a reason for hiding this comment

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

Just a minor quick code review for now so I can look at PR 2090

Copy link
Collaborator Author

@tornac1234 tornac1234 left a comment

Choose a reason for hiding this comment

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

I'll wait for further reviews to push the mentionned changes

@tornac1234 tornac1234 added Area: persistence Related to serialization for long term storage (i.e. files and databases) Area: spawning Related to spawning and/or terrain labels Dec 23, 2023
@tornac1234 tornac1234 mentioned this pull request Dec 27, 2023
10 tasks
Copy link
Collaborator

@Measurity Measurity left a comment

Choose a reason for hiding this comment

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

Minor thing: moving the PrefabPlaceholderEntity in WorldPersistenceTest to the correct switch (inside WorldEntity condition) and unit test will succeed.

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.

One test is failing still. Can be fixed with the comment in SerializedWorldEntitySpawner.cs and also this change in NitroxClient.GameLogic.Spawning.WorldEntities.CrashEntitySpawner:

private static readonly Quaternion spawnRotation = new(-0.7f, 0f, 0f, 0.7f); // Equal to Quaternion.Euler(-90f, 0f, 0f)```

@tornac1234 tornac1234 force-pushed the entity-overall-fix branch 3 times, most recently from b74a937 to 2af9c87 Compare December 27, 2023 20:13
@dartasen dartasen merged commit 8abb67b into SubnauticaNitrox:master Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: persistence Related to serialization for long term storage (i.e. files and databases) Area: spawning Related to spawning and/or terrain
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants