@ -45,6 +45,7 @@ void Scenario::RunAI(Resources&enemy_resources,std::vector<std::shared_ptr<Colle
if(!setupEasyMode&&flags.difficulty==0){
enemy_resources={100,100,100,100,100};
setupEasyMode=true;
}
attackTimer=std::max(0.f,attackTimer-game.GetPGE()->GetElapsedTime());
unitBuildTimer=std::max(0.f,unitBuildTimer-game.GetPGE()->GetElapsedTime());
@ -960,7 +960,7 @@ void Unit::_Attacked(std::weak_ptr<Unit>attacker,std::vector<std::shared_ptr<Uni
if(!IsFriendly()&&!attacker.lock()->IsFriendly()&&!attacker.lock()->CanInteractWithAllies()){
attacker.lock()->SetTargetLocation(attacker.lock()->GetPos()); //This effectively negates enemies targeting each other for attacking if they're not supposed to. Somehow this occurs sometimes.
if(attacker.lock()->IsFriendly()!=IsFriendly()){
if(!IsFriendly()&&attacker.lock()->IsFriendly()!=IsFriendly()){
for(auto&u:otherUnits){
if(this!=u.get()&&!u->IsFriendly()&&u->GetCurrentTarget().expired()&&u->CanMove()&&!u->IsAllocator()){
geom2d::line<float>distLine={GetPos(),u->GetPos()};