Add dev proxy config

This commit is contained in:
rockisch
2023-11-22 00:01:04 -03:00
parent 405e65346b
commit e39630564e
4 changed files with 29 additions and 19 deletions

View File

@@ -69,7 +69,11 @@ func encodeServerInfo(config *_config.Config, s *Server, local bool) []byte {
for channelIdx, ci := range si.Channels {
sid = (4096 + serverIdx*256) + (16 + channelIdx)
bf.WriteUint16(ci.Port)
if _config.ErupeConfig.DevMode && _config.ErupeConfig.DevModeOptions.ProxyPort != 0 {
bf.WriteUint16(_config.ErupeConfig.DevModeOptions.ProxyPort)
} else {
bf.WriteUint16(ci.Port)
}
bf.WriteUint16(16 + uint16(channelIdx))
bf.WriteUint16(ci.MaxPlayers)
var currentPlayers uint16