添加上马判断

This commit is contained in:
aozhiwei 2020-04-01 13:59:35 +08:00
parent 8131a17b49
commit dd9f855163
3 changed files with 8 additions and 0 deletions

View File

@ -2337,6 +2337,12 @@ void Human::ProcLootSkin(Loot* entity, MetaData::Equip* item_meta)
void Human::ProcLootCar(Loot* entity, MetaData::Equip* item_meta)
{
if (room->gas_data.gas_mode == GasInactive) {
return;
}
if (GetPos().Distance(entity->GetPos()) > MetaMgr::Instance()->max_mount_horse_distance) {
return;
}
if (downed) {
return;
}

View File

@ -140,6 +140,7 @@ public:
MetaMgr::Instance()->max_oil = MetaMgr::Instance()->GetSysParamAsInt("max_oil");
MetaMgr::Instance()->horse_shoot_x = MetaMgr::Instance()->GetSysParamAsInt("horse_shoot_x");
MetaMgr::Instance()->horse_shoot_y = MetaMgr::Instance()->GetSysParamAsInt("horse_shoot_y");
MetaMgr::Instance()->max_mount_horse_distance = MetaMgr::Instance()->GetSysParamAsFloat("max_mount_horse_distance", 100);
if (MetaMgr::Instance()->K < 0.01f) {
abort();
}

View File

@ -59,6 +59,7 @@ class MetaMgr : public a8::Singleton<MetaMgr>
float max_oil = 0.0f;
float horse_shoot_x = 0.0f;
float horse_shoot_y = 0.0f;
float max_mount_horse_distance = 100.0f;
private:
MetaDataLoader* loader_ = nullptr;