Add timer synchronization to config and adjust for CTF
This commit is contained in:
parent
1992177205
commit
7b646dd2cb
@ -752,15 +752,15 @@ namespace UserConfigParams
|
||||
PARAM_PREFIX FloatUserConfigParam m_time_limit_threshold_ffa
|
||||
PARAM_DEFAULT(FloatUserConfigParam(0.7f, "time-limit-threshold-ffa",
|
||||
&m_network_group, "Value used to calculate time limit in free for all, which "
|
||||
"is max(number of players * time-limit-threshold-ffa, 2.0) * 60, negative value to disable time limit."));
|
||||
"is max(number of players * time-limit-threshold-ffa, 3.0) * 60, negative value to disable time limit."));
|
||||
PARAM_PREFIX FloatUserConfigParam m_capture_limit_threshold
|
||||
PARAM_DEFAULT(FloatUserConfigParam(0.5f, "capture-limit-threshold",
|
||||
PARAM_DEFAULT(FloatUserConfigParam(0.7f, "capture-limit-threshold",
|
||||
&m_network_group, "Value used to calculate capture limit in CTF, which "
|
||||
"is max(2.0, number of players * capture-limit-threshold), negative value to disable capture limit."));
|
||||
"is max(3.0, number of players * capture-limit-threshold), negative value to disable capture limit."));
|
||||
PARAM_PREFIX FloatUserConfigParam m_time_limit_threshold_ctf
|
||||
PARAM_DEFAULT(FloatUserConfigParam(0.9f, "time-limit-threshold-ctf",
|
||||
&m_network_group, "Value used to calculate time limit in CTF, which "
|
||||
"is max(2.0, number of players * (time-limit-threshold-ctf + flag-return-timemout / 60.0)) * 60.0,"
|
||||
"is max(3.0, number of players * (time-limit-threshold-ctf + flag-return-timemout / 60.0)) * 60.0,"
|
||||
" negative value to disable time limit."));
|
||||
PARAM_PREFIX StringToUIntUserConfigParam m_server_ban_list
|
||||
PARAM_DEFAULT(StringToUIntUserConfigParam("server_ban_list",
|
||||
@ -774,6 +774,9 @@ namespace UserConfigParams
|
||||
PARAM_PREFIX IntUserConfigParam m_jitter_tolerance
|
||||
PARAM_DEFAULT(IntUserConfigParam(100, "jitter-tolerance",
|
||||
&m_network_group, "Tolerance of jitter in network allowed (in ms)."));
|
||||
PARAM_PREFIX IntUserConfigParam m_timer_sync_tolerance
|
||||
PARAM_DEFAULT(IntUserConfigParam(50, "timer-sync-tolerance",
|
||||
&m_network_group, "Max time difference tolerance (in ms) to synchronize timer with server."));
|
||||
PARAM_PREFIX BoolUserConfigParam m_kick_high_ping_players
|
||||
PARAM_DEFAULT(BoolUserConfigParam(false, "kick-high-ping-players",
|
||||
&m_network_group, "Kick players whose ping is above max-ping."));
|
||||
|
@ -1856,7 +1856,7 @@ std::pair<int, float> ServerLobby::getHitCaptureLimit(float num_karts)
|
||||
{
|
||||
if (UserConfigParams::m_capture_limit_threshold > 0.0f)
|
||||
{
|
||||
float val = fmaxf(2.0f, num_karts *
|
||||
float val = fmaxf(3.0f, num_karts *
|
||||
UserConfigParams::m_capture_limit_threshold);
|
||||
hit_capture_limit = (int)val;
|
||||
}
|
||||
@ -1880,7 +1880,7 @@ std::pair<int, float> ServerLobby::getHitCaptureLimit(float num_karts)
|
||||
if (UserConfigParams::m_time_limit_threshold_ffa > 0.0f)
|
||||
{
|
||||
time_limit = fmaxf(num_karts *
|
||||
UserConfigParams::m_time_limit_threshold_ffa, 2.0f) * 60.0f;
|
||||
UserConfigParams::m_time_limit_threshold_ffa, 3.0f) * 60.0f;
|
||||
}
|
||||
}
|
||||
return std::make_pair(hit_capture_limit, time_limit);
|
||||
|
Loading…
x
Reference in New Issue
Block a user