Skip to content

Conversation

@iloomilo
Copy link

@iloomilo iloomilo commented Sep 15, 2025

Description

This PR removes the health initialization from the CreatePlayer() function.
With a dedicated spawn resource, setting health here is unnecessary and may cause players to spawn dead during selection if their saved health metadata is 0.

It should also address this and related issues but I didn't test it directly for qbx_medical, just encountered a similar issue while developing my own medical resource:
Fixes Qbox-project/qbx_medical#115

Checklist

  • I have personally loaded this code into an updated Qbox project and checked all of its functionality.
  • My pull request fits the contribution guidelines & code conventions.

@iloomilo
Copy link
Author

I’ve rethought this and committed a better solution. The initialization now stays within qbx_core, so there’s no need to modify the spawn resource. Optionally, initialization can be disabled in the server config

@iloomilo iloomilo changed the title fix(server/player): prevent health init if qbx_spawn is active. for o… fix(server/player): move health init into OnPlayLoaded to prevent being dead in spawn selection Sep 17, 2025
@iloomilo iloomilo changed the title fix(server/player): move health init into OnPlayLoaded to prevent being dead in spawn selection fix(server/player): move health init into OnPlayerLoaded to prevent being dead in spawn selection Sep 17, 2025
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.

death timer shows on player join even though person is not dead when they spawn

1 participant