Skip to content

Fix gibs being network spawned multiple times#34

Closed
Nolankicks wants to merge 1 commit intoFacepunch:masterfrom
Nolankicks:prop-gib-networking-fix
Closed

Fix gibs being network spawned multiple times#34
Nolankicks wants to merge 1 commit intoFacepunch:masterfrom
Nolankicks:prop-gib-networking-fix

Conversation

@Nolankicks
Copy link
Copy Markdown
Contributor

@Nolankicks Nolankicks commented Nov 27, 2025

This PR fixes an issue where gibs would be spawned multiple times over the network. The core issue of the code was calling .NetworkSpawn on a gib component. This was called in an rpc, and there no check to only .NetworkSpawn the gib only on the owner of the object. Without this check, the .NetworkSpawn method would be called multiple times, which spawned extra gibs for every client. This PR fixes this by checking !IsProxy in CreateGibs(), which makes only the owner of the prop spawn the gibs.

@garrynewman
Copy link
Copy Markdown
Member

This makes sense to me

@garrynewman garrynewman added the triaged triaged pull-requests are replicated on the internal sbox repo label Nov 27, 2025
@sboxbot sboxbot added the accepted this pull request was accepted, hurrah! label Nov 28, 2025
@sboxbot
Copy link
Copy Markdown
Contributor

sboxbot commented Nov 28, 2025

This PR has been merged upstream.

@sboxbot sboxbot closed this Nov 28, 2025
@Nolankicks Nolankicks deleted the prop-gib-networking-fix branch November 28, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted this pull request was accepted, hurrah! triaged triaged pull-requests are replicated on the internal sbox repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants