#include <ServerShotHolder.h>

Public Member Functions | |
| bool | addShot (unsigned int playerId, ComsPlayedMoveMessage *message) |
| bool | haveAllTurnShots () |
| bool | allSkipped () |
Static Public Member Functions | |
| static ServerShotHolder * | instance () |
Protected Member Functions | |
| void | sendWaitingMessage () |
| bool | validateFiredMessage (ScorchedContext &context, ComsPlayedMoveMessage &message, Tank *tank) |
Static Protected Attributes | |
| static ServerShotHolder * | instance_ = 0 |
Private Member Functions | |
| ServerShotHolder () | |
| virtual | ~ServerShotHolder () |
Definition at line 26 of file ServerShotHolder.h.
| ServerShotHolder::ServerShotHolder | ( | ) | [private] |
Definition at line 56 of file ServerShotHolder.cpp.
| ServerShotHolder::~ServerShotHolder | ( | ) | [private, virtual] |
Definition at line 60 of file ServerShotHolder.cpp.
| ServerShotHolder * ServerShotHolder::instance | ( | ) | [static] |
Definition at line 47 of file ServerShotHolder.cpp.
References instance_.
Referenced by ServerPlayingState::acceptStateChange(), TankAICurrentWeapons::buyWeapons(), ServerShotState::enterState(), ServerReadyState::enterState(), ServerNextShotState::enterState(), TankAICurrentMove::fireShot(), ServerPlayedMoveHandler::processMessage(), ServerDefenseHandler::processMessage(), ServerBuyAccessoryHandler::processMessage(), TankAICurrentMove::resign(), and TankAICurrentMove::skipMove().
| bool ServerShotHolder::addShot | ( | unsigned int | playerId, | |
| ComsPlayedMoveMessage * | message | |||
| ) |
Definition at line 89 of file ServerShotHolder.cpp.
References ComsPlayedMoveMessage::eShot, TankState::getState(), Tank::getState(), TankContainer::getTankById(), ScorchedContext::getTankContainer(), ComsPlayedMoveMessage::getType(), PlayShots::haveShot(), ScorchedServer::instance(), PlayShots::messages_, sendWaitingMessage(), TankState::sNormal, and validateFiredMessage().
Referenced by TankAICurrentWeapons::buyWeapons(), TankAICurrentMove::fireShot(), ServerPlayedMoveHandler::processMessage(), TankAICurrentMove::resign(), and TankAICurrentMove::skipMove().
| bool ServerShotHolder::haveAllTurnShots | ( | ) |
Definition at line 208 of file ServerShotHolder.cpp.
References Tank::getDestinationId(), Target::getPlayerId(), TurnController::getPlayersThisTurn(), TankState::getState(), Tank::getState(), TankContainer::getTankById(), ScorchedContext::getTankContainer(), PlayShots::haveShot(), ScorchedServer::instance(), TurnController::instance(), and TankState::sNormal.
Referenced by ServerPlayingState::acceptStateChange().
| bool ServerShotHolder::allSkipped | ( | ) |
Definition at line 189 of file ServerShotHolder.cpp.
References ComsPlayedMoveMessage::eSkip, ComsPlayedMoveMessage::getType(), and PlayShots::messages_.
| void ServerShotHolder::sendWaitingMessage | ( | ) | [protected] |
Definition at line 64 of file ServerShotHolder.cpp.
References NetInterfaceFlags::fAsync, Target::getPlayerId(), TurnController::getPlayersThisTurn(), TankState::getState(), Tank::getState(), TankContainer::getTankById(), ScorchedContext::getTankContainer(), ComsPlayerStatusMessage::getWaitingPlayers(), PlayShots::haveShot(), ScorchedServer::instance(), TurnController::instance(), ComsMessageSender::sendToAllPlayingClients(), and TankState::sNormal.
Referenced by addShot().
| bool ServerShotHolder::validateFiredMessage | ( | ScorchedContext & | context, | |
| ComsPlayedMoveMessage & | message, | |||
| Tank * | tank | |||
| ) | [protected] |
Definition at line 121 of file ServerShotHolder.cpp.
References AccessoryPart::AccessoryWeapon, MovementMap::calculatePosition(), TankAccessories::canUse(), MovementMap::eMovement, Accessory::ePositionSelectFuelLimit, Accessory::ePositionSelectLimit, Accessory::ePositionSelectNone, AccessoryStore::findByAccessoryId(), Tank::getAccessories(), ScorchedContext::getAccessoryStore(), OptionsTransient::getArmsLevel(), Accessory::getArmsLevel(), MovementMap::getEntry(), Target::getLife(), ScorchedContext::getOptionsGame(), ScorchedContext::getOptionsTransient(), Accessory::getPositionSelect(), Accessory::getPositionSelectLimit(), ComsPlayedMoveMessage::getSelectPositionX(), ComsPlayedMoveMessage::getSelectPositionY(), TargetLife::getTargetPosition(), Accessory::getType(), ComsPlayedMoveMessage::getWeaponId(), ScorchedServer::instance(), and MovementMap::MovementMapEntry::type.
Referenced by addShot().
ServerShotHolder * ServerShotHolder::instance_ = 0 [static, protected] |
1.5.3