Fixes config merge fn for disabling coordinates and adds it to JSON.
This commit is contained in:
parent
a2bcef00a0
commit
def8c6087d
|
@ -373,7 +373,7 @@ type Config struct {
|
||||||
AEInterval time.Duration `mapstructure:"-" json:"-"`
|
AEInterval time.Duration `mapstructure:"-" json:"-"`
|
||||||
|
|
||||||
// DisableCoordinates controls features related to network coordinates.
|
// DisableCoordinates controls features related to network coordinates.
|
||||||
DisableCoordinates bool `mapstructure:"disable_coordinates" json:"-"`
|
DisableCoordinates bool `mapstructure:"disable_coordinates"`
|
||||||
|
|
||||||
// SyncCoordinateRateTarget controls the rate for sending network
|
// SyncCoordinateRateTarget controls the rate for sending network
|
||||||
// coordinates to the server, in updates per second. This is the max rate
|
// coordinates to the server, in updates per second. This is the max rate
|
||||||
|
@ -1087,6 +1087,9 @@ func MergeConfig(a, b *Config) *Config {
|
||||||
if b.AtlasEndpoint != "" {
|
if b.AtlasEndpoint != "" {
|
||||||
result.AtlasEndpoint = b.AtlasEndpoint
|
result.AtlasEndpoint = b.AtlasEndpoint
|
||||||
}
|
}
|
||||||
|
if b.DisableCoordinates {
|
||||||
|
result.DisableCoordinates = true
|
||||||
|
}
|
||||||
if b.SessionTTLMinRaw != "" {
|
if b.SessionTTLMinRaw != "" {
|
||||||
result.SessionTTLMin = b.SessionTTLMin
|
result.SessionTTLMin = b.SessionTTLMin
|
||||||
result.SessionTTLMinRaw = b.SessionTTLMinRaw
|
result.SessionTTLMinRaw = b.SessionTTLMinRaw
|
||||||
|
|
Loading…
Reference in New Issue