-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Fix lag spike from stinger grenades #33885
Conversation
fixes: #32642? Also amazing first contribution |
I took a swing at the problem in my complete cluster grenade refactor and explain it similarly in my latest post, and you can get around the issue by just NEVER setting the ProjectileComponent's gunUid at all which I did at some point, but it also just feels wrong using gun code to shoot a projectile without providing the gunUid because it causes bad admin logs as you've already explained so I didn't go that route |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
I totally agree that my PR is sloppy. I was just looking at a simple fix, but you're is definitely much better done. |
I mean I still haven't fixed the problem |
About the PR
ClusterGrenadeComponent
- specifically the type that spawns bullets - currently causes a lag spike when it goes off. This is because every bullet tries and fails to reference the already deleted grenade. This PR stops the bullets from looking for the grenade.Why / Balance
Lag is bad.
Technical details
Changed
ShootProjectile
inSharedGunSystem
to make the parameter for gun source nullable.Media
Causes ugly admin logging, but previously there was no admin logging at all.

Requirements
Breaking changes
Changelog
🆑 aada