Collection Point AI fix.
This commit is contained in:
parent
020c15bcc3
commit
f63c2b00ca
@ -93,7 +93,7 @@ void Scenario::RunAI(Resources&enemy_resources,std::vector<std::shared_ptr<Colle
|
||||
}
|
||||
}
|
||||
for(auto&key:cpCheckTimer){
|
||||
cpCheckTimer[key.first]=std::max(0.0f,game.GetPGE()->GetElapsedTime());
|
||||
cpCheckTimer[key.first]=std::max(0.0f,cpCheckTimer[key.first]-game.GetPGE()->GetElapsedTime());
|
||||
}
|
||||
int memoryAllocatorCount=0;
|
||||
for(auto&u:units){
|
||||
@ -752,6 +752,7 @@ void Stage6::Update(){
|
||||
if(box.bPressed){
|
||||
flags.playerInControl=true;
|
||||
box.SetVisible(false);
|
||||
state=1;
|
||||
}
|
||||
}break;
|
||||
}
|
||||
@ -803,15 +804,20 @@ Stage8::Stage8(std::vector<std::shared_ptr<Unit>>&units,std::vector<std::unique_
|
||||
:Scenario(units,IMAGES,SOUNDS,objective,game,flags){}
|
||||
void Stage8::Start(){
|
||||
SetCameraTarget({4*24,4*24},true);
|
||||
flags.playerInControl=true;
|
||||
flags.playerInControl=false;
|
||||
SetObjective("Defeat all enemy units.");
|
||||
nextLevel=LevelName::FINISH;
|
||||
};
|
||||
void Stage8::Update(){
|
||||
switch(state){
|
||||
case 0:{
|
||||
|
||||
}break;
|
||||
case 0:{
|
||||
DisplayBox("You need to cease all operations, you are causing more harm than good.");
|
||||
if(box.bPressed){
|
||||
state=1;
|
||||
flags.playerInControl=true;
|
||||
box.SetVisible(false);
|
||||
}
|
||||
}break;
|
||||
}
|
||||
};
|
||||
bool Stage8::MissionCompleted(){
|
||||
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user