Page MenuHomeFeedback Tracker

Using setUnitLoadout on Multiplayer produces silent bullets and incorrect weapon reference
Need More Info, NormalPublic

Description

Running setUnitLoadout on a player that is in the middle of switching weapons, creates a potential that their weapon will be considered "Throw" or similar for every client that is not local to the player, even while shooting.
This makes the bullets they shoot silent for everyone except themselves..

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Engine
Steps To Reproduce
  1. Load a server
  2. Log in 2 clients (Doesn't matter if its on the same computer or not)
  3. Run this script on one client
[]spawn{
     _clothing = getUnitLoadout player;
     player action ["SwitchWeapon", player, player, 100]; 
     player switchCamera cameraView;
     uiSleep 0.5;
     player setUnitLoadout _clothing;
   };
  1. The other client will see the player that set the loadout with the proper loadout, however their bullets will be silent and their weapons will return as follows;

(Current weapon in hands is a Mk-1 ("srifle_DMR_03_tan_F"), while standing still)

getUnitLoadout _player select 0 select 0
"srifle_DMR_03_tan_F"

currentWeapon _player
"Throw"

weaponState _player
["Throw","HandGrenadeMuzzle","HandGrenadeMuzzle","",0,-1,0]

Additional Information

It seems that the issue sometimes will resolve itself after a few minutes, but not confirmed that it will all the time.

Video of bug and supplied mission
https://www.dropbox.com/s/0g1tg15elsdxi7t/Silent_Bullet_Test.Altis.pbo?dl=0

https://youtu.be/O7klLSCi3LY

Event Timeline

Fraali created this task.Aug 8 2022, 3:22 AM
Fraali edited Steps To Reproduce. (Show Details)

I'll investigate, no promises

BIS_fnc_KK added a comment.EditedAug 8 2022, 10:34 PM

Cannot repro. What game version do you test it on?

BIS_fnc_KK changed the task status from New to Need More Info.Aug 8 2022, 10:35 PM
Fraali edited Additional Information. (Show Details)Aug 9 2022, 12:19 AM
Fraali added a comment.EditedAug 9 2022, 12:24 AM

I've added a video of the issue (with timestamps) as well as a mission that the bug happens on. I couldn't reproduce on a brand new empty mission made in editor, so I found a random mission and removed a bunch of scripts that weren't required for the mission to start.

I've tried on
Current stable branch (2.08.149102)
Current profiling build (2.08.149743)

could you try it on dev please? It could have been fixed indirectly

Can confirm that it also happens on the current dev branch (2.11.149760)