1
This commit is contained in:
commit
c73977c617
@ -2443,7 +2443,7 @@ long long Room::GetGasInactiveTime()
|
|||||||
App::Instance()->debug_params[1] : 10;
|
App::Instance()->debug_params[1] : 10;
|
||||||
#endif
|
#endif
|
||||||
if (IsPveRoom()) {
|
if (IsPveRoom()) {
|
||||||
return 10;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
return MetaMgr::Instance()->gas_inactive_time;
|
return MetaMgr::Instance()->gas_inactive_time;
|
||||||
}
|
}
|
||||||
@ -3664,6 +3664,7 @@ void Room::InitAndroidAI()
|
|||||||
continue;
|
continue;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
bool found = false;
|
||||||
int rnd = rand() % ai_weights_space;
|
int rnd = rand() % ai_weights_space;
|
||||||
++rnd;
|
++rnd;
|
||||||
for (auto& tuple : *ai_weights) {
|
for (auto& tuple : *ai_weights) {
|
||||||
@ -3672,9 +3673,22 @@ void Room::InitAndroidAI()
|
|||||||
if (rnd <= space) {
|
if (rnd <= space) {
|
||||||
hum->SetAiLevel(ai_level);
|
hum->SetAiLevel(ai_level);
|
||||||
++ai_num[ai_level];
|
++ai_num[ai_level];
|
||||||
|
found = true;
|
||||||
break;
|
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
|
#ifdef DEBUG
|
||||||
for (auto& pair : accountid_hash_) {
|
for (auto& pair : accountid_hash_) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user