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

Null AudioSources, Crash on StoreInteraction assuming Item and Store item not working. #1444

Merged
merged 8 commits into from
Jun 21, 2024

Conversation

Necromunger
Copy link
Contributor

@Necromunger Necromunger commented Jun 19, 2024

Summary

Null AudioSources & Crash on hand not being item

  1. AudioSources when used from the pool and assigned to be a child of an object in the world can be destroyed.
    The function FindAvailableAudioSource never cleaned its list or checked for null AudioSources which caused an exception when being assigned a null one.

  2. For StoreInteraction it did not check if the source item actually was an item, and caused an exception interacting with a ID card with its own hand, for example.

  3. Fixed the radial store option not working for toolbox specifically.

PR checklist

  • The game builds properly without errors.
  • No unrelated changes are present.
  • No "trash" files are committed except for one, DefaultPrefabObjects.asset had a one line change i forgot to remove during fixing.
  • Relevant code is documented.

Testing

  • Works from host in host mode.

Check if source is an item
Need to remove null audioSources if it was destroyed through being a child to a parent gameobject.
Previously was broken, but can now right click and store item into a container
@Necromunger Necromunger changed the title Null AudioSources & Crash on StoreInteraction assuming Item Null AudioSources, Crash on StoreInteraction assuming Item and Store item not working. Jun 19, 2024
@Necromunger
Copy link
Contributor Author

Fixes 1 and 2 seem fine, but on further testing, variations 3. related to the store action still is acting strangely in the sense that its storing multiple items on the same slot.

Fix to items not taking new slots.
@Necromunger
Copy link
Contributor Author

Necromunger commented Jun 19, 2024

Mentioned issues are now solved, for toolboxes with testing. Items correctly add to new slots.

… Viewer

Did code cleanup structure recommended.
@Necromunger
Copy link
Contributor Author

Necromunger commented Jun 20, 2024

Fixed crash for when an inventory is open and you die. Hands can no longer be accessed.

Fixed error with all inventories, there was no position check adding an item at position 0,400 would work just fine.
Adding item now checks the bounds of the container it's being added to.

Changed code style to follow as mentioned by iamteapot.

Copy link
Contributor

@TaylorNAlbarnaz TaylorNAlbarnaz left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@iamteapot422 iamteapot422 left a comment

Choose a reason for hiding this comment

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

Nice

@iamteapot422 iamteapot422 merged commit b020a50 into RE-SS3D:develop Jun 21, 2024
2 checks passed
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.

3 participants