$treeview $search $mathjax
Stratagus  2.2.6
$projectbrief
$projectbrief
$searchbox
-->
         _________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
           Stratagus - A free fantasy real time strategy game engine

BestRangeTargetFinder Struct Reference

List of all members.


Public Member Functions

 BestRangeTargetFinder (const CUnit &a, const int r)
void operator() (CUnit *const dest)
CUnitFind (CUnit *table[], const int table_size)
CUnitFind (CUnitCache &cache)

Public Attributes

const CUnitattacker
const int range
CUnitbest_unit
int best_cost
int good [32 *32]
int bad [32 *32]

Classes

struct  FillBadGood

Detailed Description

Attack units in distance, with large missile

Choose the best target, that can be attacked. It takes into account allied unit which could be hit by the missile

Note:
This could be improved, for better performance / better trade.

Limited to attack range smaller than 16.

Will be moved to unit_ai.c soon.


Constructor & Destructor Documentation

BestRangeTargetFinder::BestRangeTargetFinder ( const CUnit a,
const int  r 
) [inline]

Parameters:
a Find in distance for this unit.
range Distance range to look.


Member Function Documentation

void BestRangeTargetFinder::operator() ( CUnit *const   dest  )  [inline]

CUnit* BestRangeTargetFinder::Find ( CUnit table[],
const int  table_size 
) [inline]

CUnit* BestRangeTargetFinder::Find ( CUnitCache cache  )  [inline]


Member Data Documentation


The documentation for this struct was generated from the following file:
(C) Copyright 1998-2011 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.