]> git.smokeofanarchy.ru Git - space-station-14.git/commit
Fix guns appearing to cycle bolt when wielded (#28756)
authorDoomsdrayk <robotdoughnut@comcast.net>
Thu, 13 Jun 2024 06:30:39 +0000 (00:30 -0600)
committerGitHub <noreply@github.com>
Thu, 13 Jun 2024 06:30:39 +0000 (23:30 -0700)
commit249e4a9c15c8e3960dd1cd77db4ad4090bf6609d
tree4b9bb65fac7b786007bf15c62612b26980d1f524
parentd865bffff3ea620d0562422c869c6e2a02cf68b1
Fix guns appearing to cycle bolt when wielded (#28756)

Adds a check during wielding to see if the code is running clientside, and if so skip the part responsible for creating the virtual items.

This is necessary because TrySpawnVirtualItem is blocked from running clientside, so trying to spawn the virtual items for wielding causes the client to always believe the wield has failed. This erroneous failure leads to the display of incorrect feedback until the server's successful wield attempt makes it to the client. The added check prevents wielding from failing in this way and therefore allows the client to behave as expected.
Content.Shared/Wieldable/WieldableSystem.cs