wiremod / wire

Garry's Mod add-on that allows users to wire up components in order to make more elaborate automatic and user-controlled contraptions.
http://www.wiremod.com
Apache License 2.0
549 stars 333 forks source link

RT Camera may work incorrectly if two RT Screens are connected to it. #3115

Open stepa2 opened 1 month ago

stepa2 commented 1 month ago

It seems that, if RT Camera is connected to two monitors, of which only one is enabled, one monitor can break another depending on the clientside :Think order.

I can't right now check if this issue actually exists and fix it, but it seems to exist, according to the code. I've personally seen a bug when monitor breaks, but I'm not sure if it related to this issue.

https://github.com/wiremod/wire/blob/4038ae0a5cd2335d6af52d6baafb6fbc70d74e21/lua/entities/gmod_wire_rt_screen.lua#L209-L226

To fix this, cameras clientside should store set of entities (for future compatibility, not necessary screens) that are observing it and :AddObserver(ent) and :RemoveObserver(ent) functions.

deltamolfar commented 1 month ago

Just checked - yeah, one monitor may disable another if in correct order