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
Clientside game.IsDedicated() always returns false #1495
Comments
bump? |
As far as I can tell the client has no way of knowing whether a server is dedicated or not, which is why the Lua binding is made to always return false on client. |
Maybe network the server type on connect? Don't know how useful that info would actually be. |
I think CS:GO has something similar for its net_graph. Possibly is just networked on connect. |
Then it's not a bug and the issue can be closed. 😄 |
useful when using system.GetCountry() |
Dear Rubat, this will be fixed? |
The client fires the server_spawn gameevent when he joins the server. It could also be bound to the SVC_ServerInfo net message, which receives all the data that the server_spawn gameevent uses. If it would be done in one of these ways, this change wouldn't need any additional networking and could be done any time. Example of the server_spawn gameevent: address = loopback
dedicated = false
game = garrysmod
hostname = Garry's Mod
ip = 0
mapname = gm_flatgrass
maxplayers = 8
os = W
password = false
port = 0 (joining a dedicated server) ----server_spawn----
address = 168.119.138.3
dedicated = true
game = garrysmod
hostname = Raphael's testing server
ip = 59406248
mapname = gm_flatgrass
maxplayers = 128
os = L
password = false
port = 29015
---------------------- |
Well spotted, made it shared. |
Hello,
The function game.IsDedicated() always returns false when used clientside.
On the Wiki, the given information is that this function can be used both clientside and serverside.
game.IsDedicated() on Garry's Mod Wiki
The text was updated successfully, but these errors were encountered: