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

Modify loot-to-crate to dump all leftovers to a single weapon holder #3462

Conversation

jaj22
Copy link
Collaborator

@jaj22 jaj22 commented Dec 11, 2024

What type of PR is this.

  1. Bug
  2. Change
  3. Enhancement

What have you changed and why?

Reworked loot-to-crate to dump all the leftovers to a single weapon holder next to the looting crate. This has some likely client performance & networking advantages, and enabled easier detection of whether the leftover weapon holder could be deleted as a priority (due to only containing unlocked items).

The original code didn't differentiate between the crate-full and already-unlocked cases when looting items from bodies (only when looting other weapon holders), and there was a danger of all the additional weapon holders (typically 2-3 per corpse) filling up the postmortem queue and causing premature deletion of corpses.

As far as I can tell I didn't break anything new in the process. Test cases:

  • Full squads of various types, ended with zeus.
  • Locked and unlocked items of all four types.
  • Filling up the box.
  • Re-looting dumped weapon holders.

Please specify which Issue this PR Resolves.

closes #3447

Please verify the following and ensure all checks are completed.

  1. Have you loaded the mission in LAN host?
  2. Have you loaded the mission on a dedicated server?

Is further testing or are further changes required?

  1. No
  2. Yes (Please provide further detail below.)

Someone else should probably test it and see if they can break anything.

@jaj22 jaj22 added Change A change to existing functionality Review pending labels Dec 11, 2024
@jaj22 jaj22 added this to the 3.8.0 milestone Dec 11, 2024
@Play3rgg Play3rgg self-assigned this Dec 11, 2024
Copy link

@ante185 ante185 left a comment

Choose a reason for hiding this comment

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

This seems to be working as advertised, might not have done the most thorough test though i tried.

It's a little jarring to have the big pile of stuff appear at your feet / by the crate, the old piles felt like they spawned more naturally, and as each had less stuff it'd be easier to see what's in the pile. not sure if regressing to the old pile spawning behaviour is worth it though.

Approving so we can throw this up on the test server and see if the overall effect is what we desired.

@Bob-Murphy Bob-Murphy merged commit 586ad9f into official-antistasi-community:unstable Dec 13, 2024
@Bob-Murphy Bob-Murphy added the Added to changelog Added to changelog label Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Added to changelog Added to changelog Change A change to existing functionality Ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: item piles are too aggresively clean away
4 participants