mirror of
https://github.com/glest/glest-source.git
synced 2025-02-24 11:42:31 +01:00
Let's see how good Mega-AI plays with real random when trying to find the enemy.
( the server must use this version to see an effect )
This commit is contained in:
parent
b45c9dcdb1
commit
d56069488f
@ -676,13 +676,14 @@ const TechTree *AiInterface::getTechTree(){
|
||||
|
||||
bool AiInterface::isResourceInRegion(const Vec2i &pos, const ResourceType *rt, Vec2i &resourcePos, int range) const {
|
||||
const Map *map= world->getMap();
|
||||
RandomGen random;
|
||||
|
||||
int xi=1;
|
||||
int xj=1;
|
||||
if(random.randRange(0,1)==1){
|
||||
|
||||
if(rand() % 2==1){
|
||||
xi=-1;
|
||||
}
|
||||
if(random.randRange(0,1)==1){
|
||||
if(rand() % 2==1){
|
||||
xj=-1;
|
||||
}
|
||||
for(int i = -range; i <= range; ++i) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user