This commit is contained in:
aozhiwei 2024-03-26 11:22:02 +08:00
parent 7e33a8fbda
commit a965005f7d
3 changed files with 7 additions and 1 deletions

View File

@ -322,7 +322,8 @@ void CustomBattle::OnEnter(std::shared_ptr<cs::CMJoin> join_msg, long ip_saddr,
}
f8::Timer::Instance()->SetTimeoutEx
(
1000 * 3,
a8::RandEx(mt::Param::s().battle_auto_ready_min_time,
mt::Param::s().battle_auto_ready_max_time) * 1000,
[] (int event, const a8::Args* args)
{
if (a8::TIMER_EXEC_EVENT == event) {

View File

@ -91,6 +91,8 @@ namespace mt
s_.nature_recover_hp_interval = a8::XValue(GetStringParam("nature_recover_hp_interval1", "1"));
s_.nature_recover_hp_rate = a8::XValue(GetStringParam("nature_recover_hp_rate", "0.1")).GetDouble();
#endif
s_.battle_auto_ready_min_time = GetIntParam("battle_auto_ready_min_time", 5);
s_.battle_auto_ready_max_time = GetIntParam("battle_auto_ready_max_time", 8);
#ifdef MYDEBUG
s_.match_team_time = 6;
s_.match_robot_time = 5;

View File

@ -145,6 +145,9 @@ namespace mt
float battle_gain_exp_rate_killer = 0;
float battle_gain_exp_rate_teammate = 0;
int battle_auto_ready_min_time = 0;
int battle_auto_ready_max_time = 0;
std::vector<float> block_effect_range;
std::vector<float> crit_effect_range;