From 8b17d9bcbde623f9f0c2717bfd9276cf4c6bd669 Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Mon, 4 Sep 2023 03:49:35 -0500 Subject: [PATCH] We shouldn't mess with allocators that already are trying to collect resources. --- olcCodeJam2023Entry/Scenario.cpp | 2 +- olcCodeJam2023Entry/pge.wasm | Bin 1144981 -> 1145004 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/olcCodeJam2023Entry/Scenario.cpp b/olcCodeJam2023Entry/Scenario.cpp index d18a0f6..589becb 100644 --- a/olcCodeJam2023Entry/Scenario.cpp +++ b/olcCodeJam2023Entry/Scenario.cpp @@ -112,7 +112,7 @@ void Scenario::RunAI(Resources&enemy_resources,std::vectorIsFriendly()&&u->IsAllocator()){ + if(!u->IsFriendly()&&u->IsAllocator()&&u->attachTarget.expired()){ std::arrayunitChoiceList={UnitType::LeftShifter,UnitType::LeftShifter,UnitType::RightShifter,UnitType::RightShifter, UnitType::Corrupter,UnitType::MemorySwapper,UnitType::BitRestorer,UnitType::BitRestorer,UnitType::_Platform,UnitType::Corrupter}; std::array,10>unitResourceCostList={LeftShifter::resourceCost,LeftShifter::resourceCost,RightShifter::resourceCost,RightShifter::resourceCost, diff --git a/olcCodeJam2023Entry/pge.wasm b/olcCodeJam2023Entry/pge.wasm index 0dbe41f71df22f177e3c64575d9616cd5faccb25..8188a3bc3849bb6bef70e20e8f4cf98d3a0ed916 100644 GIT binary patch delta 2338 zcmbtWU2GIp6yBM8c4oWV-Fvq!Z7HR_Q>@)$r8dNpD3VT~R1hj8R1ig@4HTv=+K8?4 z*GLT*;twi#fzmBC6a|}zEjorLL0?Rah>3`RCO*jngp{9v3aQ`hE-fe~MITPi?783h z?sx9FKf7(Px^J-h!0}nyrGX!3{k%Z?Y~a)Qbv>=fXZs%Tk@R)+_iXC#(cJzX{mh@* zN2;@nHE3M1IJ4oZ<7}(O-IHwDSJ zN5D3DkgW)FsY@owKJi)_aQg;X9YhTcvI4k*3+x=+w5x1`d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