_________ __ __ / _____// |_____________ _/ |______ ____ __ __ ______ \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > \/ \/ \//_____/ \/ ______________________ ______________________ T H E W A R B E G I N S Stratagus - A free fantasy real time strategy game engine
#include "stratagus.h"
#include "action/action_unload.h"
#include "animation.h"
#include "iolib.h"
#include "map.h"
#include "pathfinder.h"
#include "player.h"
#include "script.h"
#include "ui.h"
#include "unit.h"
#include "unittype.h"
#include "video.h"
action_unload.cpp - The unload action. | |
constexpr int | MAX_SEARCH_RANGE = 20 |
constexpr int | MAX_RETRIES = 20 |
constexpr int | FIND_DROPZONE_STATE = 0 |
constexpr int | MOVE_TO_DROPZONE_STATE = 1 |
constexpr int | UNLOAD_STATE = 2 |
static bool | FindUnloadPosition (const CUnit &transporter, const CUnit &unit, const Vec2i startPos, int maxRange, Vec2i *res) |
static int | UnloadUnit (CUnit &transporter, CUnit &unit) |
static bool | IsDropZonePossible (const CUnit &transporter, const Vec2i &pos) |
static bool | ClosestFreeDropZone_internal (const CUnit &transporter, const Vec2i &startPos, int maxRange, Vec2i *resPos) |
static int | ClosestFreeDropZone (CUnit &transporter, const Vec2i &startPos, int maxRange, Vec2i *resPos) |
|
static |
Find the closest available drop zone for a transporter. Fail if transporter don't transport any unit..
transporter | the transporter |
startPos | start location for the search |
maxRange | The maximum distance from initial position to search... |
resPos | drop zone position |
|
static |
Find the closest available drop zone for a transporter. Fail if transporter don't transport any unit..
transporter | the transporter |
startPos | start location for the search |
maxRange | The maximum distance from initial position to search... |
resPos | drop zone position |
|
static |
Find a free position close to startPos
transporter | |
unit | Unit to unload. |
startPos | Original search position |
maxrange | maximum range to unload. |
res | Unload position. |
Return true if position is a correct place to drop out units.
transporter | Transporter unit. |
pos | position to drop out units. |
Reappear unit on map.
unit | Unit to drop out. |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |