diff --git a/src/Ext/RadSite/Hooks.cpp b/src/Ext/RadSite/Hooks.cpp index de9f085079..235bf82e68 100644 --- a/src/Ext/RadSite/Hooks.cpp +++ b/src/Ext/RadSite/Hooks.cpp @@ -62,27 +62,27 @@ DEFINE_HOOK(0x5213B4, InfantryClass_AIDeployment_CheckRad, 0x7) auto const pWeapon = pInf->GetDeployWeapon()->WeaponType; int radLevel = 0; - if (RadSiteExt::ExtMap.size() > 0 && pWeapon) + if (RadSiteClass::Array->Count && pWeapon) { auto const pWeaponExt = WeaponTypeExt::ExtMap.Find(pWeapon); auto const pRadType = pWeaponExt->RadType; auto const warhead = pWeapon->Warhead; auto currentCoord = pInf->GetCell()->MapCoords; - auto const it = std::find_if(RadSiteExt::ExtMap.begin(), RadSiteExt::ExtMap.end(), - [=](std::pair const& pair) + auto const it = std::find_if(RadSiteClass::Array->begin(), RadSiteClass::Array->end(), + [=](RadSiteClass* const rad) { + auto const radExt = RadSiteExt::ExtMap.Find(rad); return - pair.second->Type == pRadType && - pair.first->BaseCell == currentCoord && - pair.first->Spread == Game::F2I(warhead->CellSpread) + radExt->Type == pRadType && + rad->BaseCell == currentCoord && + rad->Spread == Game::F2I(warhead->CellSpread) ; }); - if (it != RadSiteExt::ExtMap.end()) + if (it != RadSiteClass::Array->end()) { - //auto pRadExt = it->second; - auto pRadSite = it->first; + auto pRadSite = *it; radLevel = pRadSite->GetRadLevel(); } } @@ -138,8 +138,9 @@ DEFINE_HOOK(0x43FB23, BuildingClass_AI_Radiation, 0x5) { CellStruct nCurrentCoord = buildingCoords + *pFoundation; - for (auto& [pRadSite, pRadExt] : RadSiteExt::ExtMap) + for (auto const pRadSite : *RadSiteClass::Array) { + auto pRadExt = RadSiteExt::ExtMap.Find(pRadSite); RadTypeClass* pType = pRadExt->Type; // Check the distance, if not in range, just skip this one @@ -190,8 +191,9 @@ DEFINE_HOOK(0x4DA59F, FootClass_AI_Radiation, 0x5) CellStruct CurrentCoord = pFoot->GetCell()->MapCoords; // Loop for each different radiation stored in the RadSites container - for (auto& [pRadSite, pRadExt] : RadSiteExt::ExtMap) + for (auto const pRadSite : *RadSiteClass::Array) { + auto pRadExt = RadSiteExt::ExtMap.Find(pRadSite); // Check the distance, if not in range, just skip this one double orDistance = pRadSite->BaseCell.DistanceFrom(CurrentCoord); diff --git a/src/Phobos.cpp b/src/Phobos.cpp index b5037e11e3..37aca52b6d 100644 --- a/src/Phobos.cpp +++ b/src/Phobos.cpp @@ -23,13 +23,7 @@ const char* Phobos::AppIconPath = nullptr; bool Phobos::DisplayDamageNumbers = false; bool Phobos::IsLoadingSaveGame = false; -#ifdef STR_GIT_COMMIT -const wchar_t* Phobos::VersionDescription = L"Phobos nightly build (" STR_GIT_COMMIT L" @ " STR_GIT_BRANCH L"). DO NOT SHIP IN MODS!"; -#elif !defined(IS_RELEASE_VER) -const wchar_t* Phobos::VersionDescription = L"Phobos development build #" _STR(BUILD_NUMBER) L". Please test the build before shipping."; -#else -//const wchar_t* Phobos::VersionDescription = L"Phobos release build v" FILE_VERSION_STR L"."; -#endif +const wchar_t* Phobos::VersionDescription = L"\u57fa\u4e8eb38\u6d4b\u8bd5\u8f90\u5c04RE\u539f\u56e0"; void Phobos::CmdLineParse(char** ppArgs, int nNumArgs)