More casts to make gcc happy. Change 2nd chapter bonus boss mob counter from using std::reduce to std::accumulate (Apparently gcc is ambiguous about argument order?? wtf)
This commit is contained in:
@@ -49,8 +49,8 @@ using A=Attribute;
|
||||
|
||||
void Monster::STRATEGY::MAJOR_HAWK(Monster&m,float fElapsedTime,std::string strategy){
|
||||
//Runs the Hawk strategy and has an aggressive mode when the amount of this monster falls below an amount.
|
||||
const int majorHawkCount=std::reduce(MONSTER_LIST.begin(),MONSTER_LIST.end(),0,[&](const int&acc,const std::unique_ptr<Monster>&monster){return std::move(acc)+((monster->IsAlive()&&monster->GetName()==ConfigString("Aggressive Name Check"))?1:0);});
|
||||
const int majorHawkCount=std::accumulate(MONSTER_LIST.begin(),MONSTER_LIST.end(),0,[&](const int&acc,const std::unique_ptr<Monster>&monster){return std::move(acc)+((monster->IsAlive()&&monster->GetName()==ConfigString("Aggressive Name Check"))?1:0);});
|
||||
|
||||
if(majorHawkCount<=ConfigInt("Aggressive Hawk Count"))HAWK(m,fElapsedTime,"Major Hawk");
|
||||
else HAWK(m,fElapsedTime,"Hawk"); //Use normal hawk behaviors when there are too many Major Hawks.
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user