File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change 209209
210210-- Returns the address:port of the server.
211211function ix .util .GetAddress ()
212- local address = tonumber (GetConVarString (" hostip" ))
213-
214- if (!address ) then
215- return " 127.0.0.1" .. " :" .. GetConVarString (" hostport" )
216- end
217-
218- local ip = {}
219- ip [1 ] = bit .rshift (bit .band (address , 0xFF000000 ), 24 )
220- ip [2 ] = bit .rshift (bit .band (address , 0x00FF0000 ), 16 )
221- ip [3 ] = bit .rshift (bit .band (address , 0x0000FF00 ), 8 )
222- ip [4 ] = bit .band (address , 0x000000FF )
223- return table.concat (ip , " ." ).. " :" .. GetConVarString (" hostport" )
212+ return game .GetIPAddress ()
224213end
225214
226215--- Returns a cached copy of the given material, or creates and caches one if it doesn't exist. This is a quick helper function
You can’t perform that action at this time.
0 commit comments