This commit is contained in:
aozhiwei 2022-09-30 10:04:20 +08:00
commit c73977c617

View File

@ -2443,7 +2443,7 @@ long long Room::GetGasInactiveTime()
App::Instance()->debug_params[1] : 10;
#endif
if (IsPveRoom()) {
return 10;
return 0;
} else {
return MetaMgr::Instance()->gas_inactive_time;
}
@ -3664,6 +3664,7 @@ void Room::InitAndroidAI()
continue;
#endif
#endif
bool found = false;
int rnd = rand() % ai_weights_space;
++rnd;
for (auto& tuple : *ai_weights) {
@ -3672,9 +3673,22 @@ void Room::InitAndroidAI()
if (rnd <= space) {
hum->SetAiLevel(ai_level);
++ai_num[ai_level];
found = true;
break;
}
}
if (!found) {
int ai_level = 1;
hum->SetAiLevel(ai_level);
++ai_num[ai_level];
}
#ifdef DEBGU
a8::XPrintf("id:%d found:%d\n",
{
hum->GetUniId(),
found ? 1 : 0
});
#endif
}
#ifdef DEBUG
for (auto& pair : accountid_hash_) {