RE-SS3D / SS3D

Space Station 3D, another remake of SS13, but with an extra D.
https://ss3d.space/
249 stars 138 forks source link

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

Closed Necromunger closed 1 month ago

Necromunger commented 1 month ago

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

Testing

Necromunger commented 1 month ago

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.

Necromunger commented 1 month ago

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

Necromunger commented 1 month ago

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.