game: fix stray building restoration warning when loading a wallet

This commit is contained in:
Crypto City 2021-03-14 10:30:38 +00:00
parent 030004f3fb
commit cd51352373

View File

@ -5632,7 +5632,8 @@ void CryptoCityUrho3D::HandleNewWallet(StringHash eventType, VariantMap& eventDa
MINFO("New wallet, rebuilding player state");
//ui->AddNotification("Wallet loaded, scanning...");
}
RestoreFlagUnderConstruction();
if (flagUnderConstruction)
RestoreFlagUnderConstruction();
cryptonote::cc_snapshot *snapshot = (cryptonote::cc_snapshot*)eventData[NewSnapshot::P_SNAPSHOT].GetVoidPtr();
const bool new_city = snapshot && gameState.cityState.ox == 0;
gameState.reset(snapshot);