Is Net_Arbitrator guaranteed to be the server?
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
-
- Posts: 29
- Joined: Mon Feb 13, 2023 1:34 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 7 x64
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Is Net_Arbitrator guaranteed to be the server?
I need to get a user var from the server. I'm assuming Net_Arbitrator might help with that, but maybe not. What is Net_Arbitrator set to if the server isn't playing the game, just hosting? What if there are no players in the game? Does Net_Arbitrator stay constant throughout the level?
-
- Posts: 2123
- Joined: Thu May 02, 2013 1:27 am
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: Brazil
Re: Is Net_Arbitrator guaranteed to be the server?
GZDoom doesn't have servers (currently), and you can't host games without also being ingame, so you don't need to worry about those. Net_Arbitrator is the current arbitrator of the game, which is the player that's allowed to change server CVars. If the current arbitrator leaves the game, another player is selected as the arbitrator.
-
- Posts: 29
- Joined: Mon Feb 13, 2023 1:34 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 7 x64
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: Is Net_Arbitrator guaranteed to be the server?
Thanks! Then, is it safe to assume that it should only change on WorldLoaded and PlayerDisconnected? I need to provide the value to ACS, so I'm doing CallASC at these. (Would also listen to PlayerEntered for good measure)phantombeta wrote: ↑Sat Oct 12, 2024 8:21 pm GZDoom doesn't have servers (currently), and you can't host games without also being ingame, so you don't need to worry about those. Net_Arbitrator is the current arbitrator of the game, which is the player that's allowed to change server CVars. If the current arbitrator leaves the game, another player is selected as the arbitrator.
-
-
- Posts: 1694
- Joined: Wed May 13, 2009 3:15 am
- Graphics Processor: nVidia with Vulkan support
Re: Is Net_Arbitrator guaranteed to be the server?
I would also like to point out that while everything phantombeta has said is correct, the use of Net_Arbitrator in your scenario may be a design flaw depending on what you're trying to achieve. The arbitrator designation is purely technical and irrelevant to actual gameplay, so why not simply use a server CVAR instead? It synchronizes automatically between all players, and you do not need to complicate your code by listening to any events.
Still, if you want to use Net_Arbitator:
The only event which signifies the change of the current arbitrator mid-game is PlayerDisconnected. And initially, the arbitrator is always player #0.
-
- Posts: 29
- Joined: Mon Feb 13, 2023 1:34 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 7 x64
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: Is Net_Arbitrator guaranteed to be the server?
The var in question is blood amount. In Zandronum blood is +CLIENTSIDEONLY, so it can be controllable by each user independently. On GZDoom everything is the same for all players, so one setting needs to be used. You're still probably right here, I think I should still have a separate blood setting for the server for this case, because someone may like to play with a ridiculous setting, but in a net game would want the normal one.Player701 wrote: ↑Thu Nov 14, 2024 1:24 pm I would also like to point out that while everything phantombeta has said is correct, the use of Net_Arbitrator in your scenario may be a design flaw depending on what you're trying to achieve. The arbitrator designation is purely technical and irrelevant to actual gameplay, so why not simply use a server CVAR instead? It synchronizes automatically between all players, and you do not need to complicate your code by listening to any events.