1
This commit is contained in:
parent
e1c92ba5a9
commit
b5d13dcb6c
@ -1,5 +1,7 @@
|
||||
#include "precompile.h"
|
||||
|
||||
#include <random>
|
||||
|
||||
#include "incubator.h"
|
||||
#include "room.h"
|
||||
#include "human.h"
|
||||
@ -686,6 +688,9 @@ void Incubator::StartNewBattleMode()
|
||||
(
|
||||
[this, selected_player, &invisable_humans, &invisable_teammates] (Human* hum) -> bool
|
||||
{
|
||||
if (hum == selected_player) {
|
||||
return true;
|
||||
}
|
||||
if (!CanSee(hum, selected_player)) {
|
||||
if (hum->GetTeam() == selected_player->GetTeam()) {
|
||||
invisable_teammates.push_back(hum);
|
||||
@ -696,7 +701,10 @@ void Incubator::StartNewBattleMode()
|
||||
return true;
|
||||
});
|
||||
if (invisable_humans.size() > 0) {
|
||||
|
||||
std::shuffle(invisable_humans.begin(),
|
||||
invisable_humans.end(),
|
||||
std::default_random_engine(a8::XGetTickCount()));
|
||||
Human *target = invisable_humans.at(0);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user