#include <TankState.h>
Definition at line 28 of file TankState.h.
| enum TankState::State |
Definition at line 31 of file TankState.h.
| TankState::TankState | ( | ScorchedContext & | context, | |
| unsigned int | playerId | |||
| ) |
Definition at line 46 of file TankState.cpp.
| TankState::~TankState | ( | ) | [virtual] |
Definition at line 56 of file TankState.cpp.
| void TankState::setTank | ( | Tank * | tank | ) | [inline] |
| void TankState::newGame | ( | ) |
Definition at line 66 of file TankState.cpp.
References context_, ScorchedContext::getOptionsGame(), Target::getTargetState(), Target::isTemp(), lives_, maxLives_, TargetState::setFalling(), setState(), sNormal, and tank_.
Referenced by Tank::newGame().
| void TankState::newMatch | ( | ) |
Definition at line 60 of file TankState.cpp.
References readyState_, sDead, setState(), and sReady.
Referenced by Tank::newMatch().
| void TankState::clientNewGame | ( | ) |
Definition at line 78 of file TankState.cpp.
References skipshots_.
Referenced by Tank::clientNewGame().
| void TankState::setReady | ( | ) | [inline] |
Definition at line 57 of file TankState.h.
References readyState_, and sReady.
Referenced by ServerReadyState::enterState(), ServerPlayerReadyHandler::processMessage(), and ClientPlayerStatusHandler::processMessage().
| void TankState::setNotReady | ( | ) | [inline] |
Definition at line 58 of file TankState.h.
References readyState_, and SNotReady.
Referenced by ServerNewGameState::addTanksToGame(), ClientPlayerStatusHandler::processMessage(), and TankContainer::setAllNotReady().
| ReadyState TankState::getReadyState | ( | ) | [inline] |
Definition at line 59 of file TankState.h.
References readyState_.
Referenced by ServerReadyState::acceptStateChange(), ScoreDialog::addLine(), TankContainer::allReady(), and GLWPlanView::drawTanks().
| void TankState::setState | ( | State | s | ) |
Definition at line 83 of file TankState.cpp.
References allowedStateTransitions, from, TargetLife::getLife(), Target::getLife(), Target::getShield(), TargetShield::setCurrentShield(), TargetLife::setLife(), sNormal, state_, and tank_.
Referenced by TankAIAdder::addTankAI(), TankDamage::calculateDamage(), TankDefinition::createTank(), ServerCommon::killAll(), newGame(), newMatch(), ServerInitializeHandler::processMessage(), readMessage(), ComsSyncCheckMessage::readMessage(), ServerNewGameState::resetTankStates(), Tank::rezTank(), ServerShotFinishedState::scoreWinners(), TankContainer::setAllDead(), ServerFileServer::simulate(), TankResign::simulate(), Tank::Tank(), and Tank::~Tank().
| State TankState::getState | ( | ) | [inline] |
Definition at line 63 of file TankState.h.
References state_.
Referenced by ServerPlayingState::acceptStateChange(), ScoreDialog::addLine(), ServerShotHolder::addShot(), TankDeadContainer::addTank(), TankContainer::aliveCount(), TankContainer::allReady(), TankDamage::calculateDamage(), ShotProjectile::collision(), GLWTankTracker::currentChanged(), GLWTankSlider::currentChanged(), ServerMessageHandler::destroyPlayer(), GiftMoneyDialog::display(), GLWWeaponModel::draw(), GLWTankTracker::draw(), GLWTankSlider::draw(), GLWScorchedInfo::draw(), GLWPlanView::drawTanks(), ServerShotState::enterState(), ServerNextTurnState::enterState(), TankKeyboardControl::enterState(), WeaponTankVelocity::fireWeapon(), WeaponTankPosition::fireWeapon(), WeaponSelectPosition::fireWeapon(), PlacementTankPosition::flattenTankPositions(), generateTargetTip(), TankMenus::AccessoryMenu::getEnabled(), TankMenus::PlayerMenu::getEnabled(), PlayerDialog::getNextPlayer(), TankLib::getTanksSortedByDistance(), ServerShotHolder::haveAllTurnShots(), Teleport::init(), TankKeyboardControl::keyboardCheck(), ServerCommon::killAll(), GLWWeaponModel::mouseDown(), GLWScorchedInfo::mouseDown(), GLWTankFire::mouseUp(), TargetCamera::moveCamera(), TurnController::nextShot(), TurnController::nextTurn(), PlayShots::processFiredMessage(), ServerPlayedMoveHandler::processMessage(), ServerGiftMoneyHandler::processMessage(), ServerDefenseHandler::processMessage(), ServerBuyAccessoryHandler::processMessage(), ServerAddPlayerHandler::processMessage(), ClientDefenseHandler::processMessage(), ClientChannelManager::processMessage(), ServerNewGameState::resetTankStates(), ServerShotFinishedState::scoreOverallWinner(), ServerShotFinishedState::scoreWinners(), ComsMessageSender::sendToAllPlayingClients(), ServerShotHolder::sendWaitingMessage(), TankContainer::setAllDead(), TankContainer::setAllNotReady(), ServerFileServer::simulate(), Teleport::simulate(), TankResign::simulate(), CheckResurrection::simulate(), TankMovement::simulationMove(), tankTargetCloseness(), and TankContainer::teamCount().
| void TankState::setSpectator | ( | bool | s | ) | [inline] |
Definition at line 64 of file TankState.h.
References spectator_.
Referenced by ServerConnectAuthHandler::addNextTank(), ServerAddPlayerHandler::processMessage(), and ClientAddPlayerHandler::processMessage().
| bool TankState::getSpectator | ( | ) | [inline] |
Definition at line 65 of file TankState.h.
References spectator_.
Referenced by ServerTooFewPlayersStimulus::acceptStateChange(), ScoreDialog::addLine(), TankDamage::calculateDamage(), ServerNewGameState::checkBots(), ServerNewGameState::checkTeams(), ServerNewGameState::checkTeamsAuto(), ServerNewGameState::checkTeamsBotsVs(), ShotProjectile::collision(), GiftMoneyDialog::display(), ScoreDialog::draw(), GLWPlanView::drawTanks(), PlacementTankPosition::flattenTankPositions(), StatsLoggerDatabase::gameStart(), OptionsTransient::getLeastUsedTeam(), TankContainer::getNoOfNonSpectatorTanks(), PlayerDialog::nextPlayer(), TankSort::SortOnScore::operator()(), ServerAddPlayerHandler::processMessage(), ServerNewGameState::resetTankStates(), ClientSave::restoreClient(), StatsLoggerDatabase::roundStart(), ServerShotFinishedState::scoreOverallWinner(), ServerShotFinishedState::scoreWinners(), CheckResurrection::simulate(), ClientSave::storeClient(), tankTargetCloseness(), and StatsLoggerDatabase::updateStats().
| void TankState::setMuted | ( | bool | muted | ) | [inline] |
Definition at line 67 of file TankState.h.
References muted_.
Referenced by ServerConnectAuthHandler::addNextTank(), GLWChannelText::itemSelected(), ServerAdminCommon::mutePlayer(), ServerAdminCommon::permMutePlayer(), ClientAddPlayerHandler::processMessage(), and ServerAdminCommon::unpermMutePlayer().
| bool TankState::getMuted | ( | ) | [inline] |
Definition at line 68 of file TankState.h.
References muted_.
Referenced by GLWChannelText::buttonDown(), GLWChannelText::itemSelected(), ServerLinesHandler::processMessage(), ServerChannelManager::processMessage(), ServerAdminHandler::processMessage(), ClientLinesHandler::processMessage(), and ClientChannelManager::processMessage().
| void TankState::setSkipShots | ( | bool | skip | ) | [inline] |
Definition at line 69 of file TankState.h.
References skipshots_.
Referenced by SkipDialog::buttonDown(), and SkipAllDialog::buttonDown().
| bool TankState::getSkipShots | ( | ) | [inline] |
Definition at line 70 of file TankState.h.
References skipshots_.
Referenced by SkipAllDialog::windowInit().
| int TankState::getLives | ( | ) | [inline] |
Definition at line 71 of file TankState.h.
References lives_.
Referenced by ScoreDialog::addLine(), TankDamage::calculateDamage(), generateTargetTip(), TankScore::getScoreString(), ServerShotFinishedState::scoreWinners(), TankResign::simulate(), Resurrection::simulate(), CheckResurrection::simulate(), and WeaponGiveLives::weaponCallback().
| void TankState::setLives | ( | int | lives | ) | [inline] |
Definition at line 72 of file TankState.h.
References lives_.
Referenced by TankDamage::calculateDamage(), ServerCommon::killAll(), TankContainer::setAllDead(), TankResign::simulate(), and WeaponGiveLives::weaponCallback().
| int TankState::getMaxLives | ( | ) | [inline] |
Definition at line 73 of file TankState.h.
References maxLives_.
Referenced by TankDamage::calculateDamage(), generateTargetTip(), TankResign::simulate(), CheckResurrection::simulate(), and WeaponGiveLives::weaponCallback().
| void TankState::setDestroy | ( | bool | destroy | ) | [inline] |
Definition at line 74 of file TankState.h.
References destroy_.
Referenced by ServerMessageHandler::destroyPlayer().
| bool TankState::getDestroy | ( | ) | [inline] |
Definition at line 75 of file TankState.h.
References destroy_.
Referenced by ServerMessageHandler::destroyTaggedPlayers().
| const char * TankState::getStateString | ( | ) |
Definition at line 110 of file TankState.cpp.
References fixed::asInt(), TargetLife::getLife(), Target::getLife(), getSmallStateString(), muted_, readyState_, snprintf, sReady, and tank_.
Referenced by ServerWebHandler::PlayerHandler::processRequest(), and ComsSyncCheckMessage::readMessage().
| const char * TankState::getSmallStateString | ( | ) |
Definition at line 121 of file TankState.cpp.
References sDead, sInitializing, sLoading, sNormal, spectator_, sPending, and state_.
Referenced by generateTargetTip(), and getStateString().
| LangString & TankState::getSmallStateLangString | ( | ) |
Definition at line 146 of file TankState.cpp.
References LANG_RESOURCE_CONST_VAR, sDead, sInitializing, sLoading, sNormal, spectator_, sPending, and state_.
Referenced by ScoreDialog::addLine().
| bool TankState::writeMessage | ( | NetBuffer & | buffer | ) |
Definition at line 179 of file TankState.cpp.
References NetBuffer::addToBuffer(), lives_, maxLives_, spectator_, and state_.
Referenced by Tank::writeMessage().
| bool TankState::readMessage | ( | NetBufferReader & | reader | ) |
Definition at line 188 of file TankState.cpp.
References NetBufferReader::getFromBuffer(), lives_, Logger::log(), maxLives_, setState(), spectator_, and state_.
Referenced by Tank::readMessage().
Tank* TankState::tank_ [protected] |
Definition at line 86 of file TankState.h.
Referenced by getStateString(), newGame(), setState(), and setTank().
ScorchedContext& TankState::context_ [protected] |
State TankState::state_ [protected] |
Definition at line 88 of file TankState.h.
Referenced by getSmallStateLangString(), getSmallStateString(), getState(), readMessage(), setState(), and writeMessage().
ReadyState TankState::readyState_ [protected] |
Definition at line 89 of file TankState.h.
Referenced by getReadyState(), getStateString(), newMatch(), setNotReady(), and setReady().
int TankState::lives_ [protected] |
Definition at line 90 of file TankState.h.
Referenced by getLives(), newGame(), readMessage(), setLives(), and writeMessage().
int TankState::maxLives_ [protected] |
Definition at line 90 of file TankState.h.
Referenced by getMaxLives(), newGame(), readMessage(), and writeMessage().
bool TankState::spectator_ [protected] |
Definition at line 91 of file TankState.h.
Referenced by getSmallStateLangString(), getSmallStateString(), getSpectator(), readMessage(), setSpectator(), and writeMessage().
bool TankState::muted_ [protected] |
Definition at line 92 of file TankState.h.
Referenced by getMuted(), getStateString(), and setMuted().
bool TankState::skipshots_ [protected] |
Definition at line 93 of file TankState.h.
Referenced by clientNewGame(), getSkipShots(), and setSkipShots().
bool TankState::destroy_ [protected] |
1.5.3