____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
A futuristic real-time strategy game.
This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project.
Distributed under the "GNU General Public License"
#include <stdio.h>
#include <stdlib.h>
#include "stratagus.h"
#include "unittype.h"
#include "animation.h"
#include "player.h"
#include "unit.h"
#include "actions.h"
#include "interface.h"
#include "pathfinder.h"
#include "map.h"
Go to the source code of this file.
Functions | |
| static int | MoveToTransporter (CUnit *unit) |
| static int | WaitForTransporter (CUnit *unit) |
| static void | EnterTransporter (CUnit *unit) |
| void | HandleActionBoard (CUnit *unit) |
| Handle command unload. | |
Definition in file action_board.cpp.
| static void EnterTransporter | ( | CUnit * | unit | ) | [static] |
Enter the transporter.
| unit | Pointer to unit. |
Definition at line 138 of file action_board.cpp.
References CPlayer::AiEnabled, CUnit::BoardCount, CUnit::Boarded, CUnit::ClearAction(), DebugPrint, IsOnlySelected, CUnit::IsVisibleAsGoal(), CUnitType::MaxOnBoard, NoUnitP, CUnit::OrderCount, CUnit::Orders, CUnit::Player, CUnit::RefsDecrease(), CUnit::Remove(), SelectedUnitChanged(), and CUnit::Type.
Referenced by HandleActionBoard().
| void HandleActionBoard | ( | CUnit * | unit | ) |
Handle command unload.
The unit boards a transporter.
| unit | Pointer to unit. |
Definition at line 185 of file action_board.cpp.
References CUnitType::Animations, CUnit::ClearAction(), EnterTransporter(), CMap::Info, Map, CMapInfo::MapHeight, CMapInfo::MapWidth, MoveToTransporter(), NewResetPath, NoUnitP, CUnit::Orders, PF_REACHED, PF_UNREACHABLE, CUnit::RefsDecrease(), CAnimations::Still, CUnit::SubAction, CUnit::Type, UnitShowAnimation(), CUnit::Wait, and WaitForTransporter().
| static int MoveToTransporter | ( | CUnit * | unit | ) | [static] |
Move to transporter.
| unit | Pointer to unit, moving to transporter. |
Definition at line 60 of file action_board.cpp.
References Assert, DoActionMove(), NewResetPath, CUnit::Orders, UnitActionBoard, CUnit::X, CUnit::Y, and y.
Referenced by HandleActionBoard().
| static int WaitForTransporter | ( | CUnit * | unit | ) | [static] |
Wait for transporter.
| unit | Pointer to unit. |
Definition at line 86 of file action_board.cpp.
References CanTransport(), DebugPrint, CUnit::IsVisibleAsGoal(), MapDistanceBetweenUnits(), NoUnitP, CUnit::Orders, CUnit::Player, CUnit::RefsDecrease(), CUnit::SubAction, and CUnit::Wait.
Referenced by HandleActionBoard().
1.5.6