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
requestrevivalstatus is an expensive netmessage #1386
Comments
I remember we had a discussion about this when I added the revival UI. I wanted to have that variable shared so that I can access it in targetID. But we ultimately decided on not having it shared. This means that every addon that needs that info (the targetID of the defi for example) has to poll that information from the server. Maybe it is now time to revert that change and make the value shared again. |
A band-aid fix would be to limit the defi to send this request only once per second or so. I would still prefer to just have that value shared |
i'm somewhat inclined to agree with Tim on making this shared. IIRC our last discussion about this ended up with the netmessage way because we wanted to prevent other players snooping on revives, but seeing the sheer amount of netmessages players could at least assume that someone is getting revived. Maybe there is some middle ground to be found. |
The cleanest solution would probably be a polling in a good intrerval. But it is way more complex then a shared variable which would reduce the traffic a lot. Because by polling the client has to request the data. If the server only updates the data when changed, then the traffic is vastly reduced |
I think this is not a direct issue for TTT2 but rather the defib repo. Even though fixing this might also need some changes in TTT2. The defib only needs this for the TargetID, idk about the functionality and what it really does, like is this for other players to see that the corpse is being revived? @TimGoll should we rather move this to the defib repo? |
If we move this to the defi, we need the same custom systen for the marker and the necro. I'm still in favor of changing this in TTT2 |
TTT2 does not expose anything like this and i don't really see what you would "change"? |
TTT2 exposes the revival status on the server. I have three addons that need it on the client. The best solution would be to have this exposed on the client as well. The other solution would be to implement a better custom syncing system in all three addons, which means I have to maintain in three times. Therefore I'd like to just use a shared variable on the player ent in TTT2. It is easy, vastly reduces net traffic ans pretty stable This is also how I implemented it years ago before you requested me to remove it. As I see the problems with the removal now clearly, I want to add it back |
Do that no one is against that. |
I'm against implementing the same syncing code in three addons and maintaining it in three addons. So I don't know which solution noone is against It is used to show the holder of the defi if they are able to use the defi on a player |
I think the base game should just handle it FWIW, it's not just the defib that could potentially break with a corpse being revived. For example, cannibalizing a swapper prior to respawning might break things. Cannibalizing a player killed by the infected could also break things prior to their respawn. There's a bunch of situations where authors should be able to consider a corpse "engaged". Fultoning a burnt coprse, cannibalizing a fultoned corpse, reviving a burning corpse, cannibalizing a burning corpse ... |
Your version of TTT2 (mandatory)
Video
Describe the bug (mandatory)
requestrevivalstatus is an expensive netmessage
To reproduce
Expected behavior
The client doesn't produce so many netmessages.
Context (please provide as much as you can)
ttt2_net_stream
, it does still burden the server.The text was updated successfully, but these errors were encountered: