psforever / PSF-LoginServer

Emulated PlanetSide 1 world and login server by the PSForever project.
https://psforever.net
GNU General Public License v3.0
75 stars 46 forks source link

Loadout Item Issues #1172

Closed Fate-JH closed 6 months ago

Fate-JH commented 6 months ago

The linked issue had nothing to do with the inventory tile size of the item. Two different issues were being manifested:

1) Mechanized assault exo-suits could deposit their arm weaponry in the backpack inventory space when changing between loadouts and exo-suits, resulting in a comedically huge 1x1 inventory item that shouldn't have been depicted there in the first place, let alone be able to be moved around like an other item.

2) When adjusting loadout specifications between exo-suits, the item tiles in the backpack space tended to be misplaced or invisible. This very frequently happened when trying to switch to an exo-suit that the player no longer has the ability to wear. The issue was actually two-fold. Firstly, the inventory space that the items were going to be added to was not correctly identified in some situations and the items were being calculated for the wrong index positions. This caused items to skip grid spaces and trail off the edges of the inventory grid and could potentially have lead to the game crashing. Secondly, the messaging for depicting existing equipment in infantry holsters relied on those holsters being unoccupied but earlier messaging for depicting existing equipment in infantry holsters placed the equipment in some holsters, the early messages to self-destruct early. Meanwhile, a second routine drew from that same list of items and found backpack-space for them without causing the same issue as with the holsters. The result was items existing in a place where that item was not depicted, and items being depicted in places where that item didn't exist.

Any further inventory issues might require deleting the entity by globally unique identifier before drawing it into the next spot.

ScrawnyRonnie commented 6 months ago

Did a few tests with the linked issue and had no problems.

Dethdeath commented 6 months ago

Linked issue seems solved, interacting with inventory items also feels slightly more responsive, which is good.

I did run into this: Armor value is incorrect when switching between types.

https://github.com/psforever/PSF-LoginServer/assets/77748540/58c4c834-d38f-4b61-92b6-7dfa0b9cd518

Fate-JH commented 6 months ago

Restored set exo-suit armor value back to where it should be, I think.

ScrawnyRonnie commented 6 months ago

Looked good here.