Skip to content

Fix sporadic missing pants on initial spawn after character selection#152

Open
DispersiaRoleplay wants to merge 2 commits intoVORPCORE:mainfrom
DispersiaRoleplay:main
Open

Fix sporadic missing pants on initial spawn after character selection#152
DispersiaRoleplay wants to merge 2 commits intoVORPCORE:mainfrom
DispersiaRoleplay:main

Conversation

@DispersiaRoleplay
Copy link

Fixes a sporadic issue where the player spawns without pants until the clothing menu "wear all" option is used.

Pull request template

Important

Please complete all fields. PRs will not be merged if any fields are incomplete. Be respectful, and keep in mind that it may take some time for your PR to be reviewed.

Bear in mind refactors are up to the developers and not it's contributors after all we are the ones giving support when needed. if they are big changes I suggest you to release it under your name instead.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Motive for This Pull Request

Some players would occasionally spawn without pants after selecting a character.
The issue resolved itself once the clothing menu was opened and "wear all" was applied, indicating that the pants component was not being re-applied during the initial spawn flow.

Provide a brief explanation of why these changes are being proposed and what they aim to achieve.

This change ensures the pants component is explicitly re-applied to the ped after a boots wearable state change (tuck), matching the behavior of the clothing menu "wear all" action and preventing incomplete outfit application on spawn.

Explain the necessity of these changes and how they will impact the framework or its users.

Without this fix, affected players may spawn with incomplete outfits, breaking immersion and causing confusion.
The change is minimal, non-breaking, and only re-applies an already loaded clothing component, with no impact on performance or existing logic.

Please describe the tests you have conducted to verify your changes. Provide instructions so we can reproduce these tests. Also, list any relevant details for your test configuration.

  • Tested with latest vorp scripts
  • Tested with latest artifacts

Test steps:

  1. Create or select an existing character with pants equipped.
  2. Join the server and spawn via vorp_character.
  3. Observe that pants are correctly applied on first spawn without opening the clothing menu.
  4. Repeat multiple joins to confirm the issue no longer occurs.

Notes if any

This PR adds a single ApplyShopItemToPed call and does not alter existing logic or introduce refactors.
image

Fixes sporadic "no pants on spawn" until clothing menu "wear all" is used.
Fix sporadic missing pants on initial spawn after character selection
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.

1 participant