WEAPON:Clip1 and WEAPON:Clip2 not being networked to spectating players creates logic errors #6100
Labels
Net compat
This issue requires breaking network compatibility to solve so it will be queued.
Protocol version 24
Exe version 2024.10.29 (garrysmod)
Exe build: 19:13:34 Nov 28 2024 (9511) (4000)
GMod version 2024.11.28, branch: dev, multicore: 1
Windows 32bit
Details
It appears that Clip1() and Clip2() are not networked to other players. It's probably a networking optimization, but it creates issues when you are spectating someone. Some weapon addons either manually network both clips using NWVar's or others just accept the logic errors this creates. This issue occurs when the player reloads their weapons that use custom reload sequences such as shotguns. This issue also occurs to the default HL2 weapons that come with the game if they auto-reload when the primary clip is empty.
Steps to reproduce
lua_run Entity(1):Spectate( OBS_MODE_IN_EYE ) Entity(1):SpectateEntity( Entity(2) ) Entity(1):SetupHands( Entity(2) )
lua_run print( Entity(2):GetActiveWeapon():Clip1() )
and this for the clientlua_run_cl print( Entity(2):GetActiveWeapon():Clip1() )
https://github.com/user-attachments/assets/f1d1bc81-3f58-43d6-83ae-4458151397f4
The text was updated successfully, but these errors were encountered: