TankDamage Class Reference

#include <TankDamage.h>

Inheritance diagram for TankDamage:

ActionReferenced Action

List of all members.

Public Member Functions

 TankDamage (Weapon *weapon, unsigned int damagedPlayerId, WeaponFireContext &weaponContext, fixed damage, bool useShieldDamage, bool checkFall, bool shieldOnlyDamage)
virtual ~TankDamage ()
virtual void init ()
virtual void simulate (fixed frameTime, bool &remove)
virtual std::string getActionDetails ()

Protected Member Functions

void calculateDamage ()
void calculateDeath ()
void logDeath ()

Protected Attributes

bool firstTime_
Weaponweapon_
WeaponFireContext weaponContext_
unsigned int damagedPlayerId_
fixed damage_
bool useShieldDamage_
bool checkFall_
bool shieldOnlyDamage_


Detailed Description

Definition at line 28 of file TankDamage.h.


Constructor & Destructor Documentation

TankDamage::TankDamage ( Weapon weapon,
unsigned int  damagedPlayerId,
WeaponFireContext weaponContext,
fixed  damage,
bool  useShieldDamage,
bool  checkFall,
bool  shieldOnlyDamage 
)

Definition at line 50 of file TankDamage.cpp.

TankDamage::~TankDamage (  )  [virtual]

Definition at line 62 of file TankDamage.cpp.


Member Function Documentation

void TankDamage::init (  )  [virtual]

Implements Action.

Definition at line 66 of file TankDamage.cpp.

References ActionController::addAction(), Action::context_, damagedPlayerId_, ScorchedContext::getActionController(), Target::getLife(), TargetContainer::getTargetById(), ScorchedContext::getTargetContainer(), TargetLife::getTargetPosition(), and Target::isTarget().

void TankDamage::simulate ( fixed  frameTime,
bool &  remove 
) [virtual]

Reimplemented from Action.

Definition at line 86 of file TankDamage.cpp.

References calculateDamage(), firstTime_, and Action::simulate().

std::string TankDamage::getActionDetails (  )  [virtual]

Reimplemented from Action.

Definition at line 80 of file TankDamage.cpp.

References damage_, damagedPlayerId_, S3D::formatStringBuffer(), fixed::getInternal(), Accessory::getName(), AccessoryPart::getParent(), and weapon_.

void TankDamage::calculateDamage (  )  [protected]

Definition at line 98 of file TankDamage.cpp.

References ActionController::addAction(), TankTeamScore::addScore(), ActionController::addSyncCheck(), fixed::asFloat(), fixed::asInt(), calculateDeath(), TankPosition::changePower(), checkFall_, Action::context_, damage_, damagedPlayerId_, S3D::formatStringBuffer(), Accessory::getAction(), ScorchedContext::getActionController(), Target::getAlive(), TankContainer::getAllTanks(), Weapon::getArmsLevel(), TankScore::getAssists(), Target::getCStrName(), TargetParachute::getCurrentParachute(), TargetShield::getCurrentShield(), TargetState::getDisplayDamage(), TargetState::getFalling(), TargetLife::getFloatPosition(), LandscapeMaps::getGroundMaps(), Shield::getHitPenetration(), TankScore::getHurtBy(), fixed::getInternal(), TankScore::getKills(), ScorchedContext::getLandscapeMaps(), TargetLife::getLife(), Target::getLife(), TankState::getLives(), TankState::getMaxLives(), TankScore::getMoney(), ScorchedContext::getOptionsGame(), Target::getParachute(), Target::getPlayerId(), WeaponFireContext::getPlayerId(), Tank::getPosition(), TankScore::getScore(), Tank::getScore(), ScorchedContext::getServerMode(), Target::getShield(), TargetShield::getShieldPower(), TankState::getSpectator(), TankState::getState(), Tank::getState(), Tank::getTankAI(), TankContainer::getTankById(), ScorchedContext::getTankContainer(), ScorchedContext::getTankTeamScore(), TargetContainer::getTargetById(), ScorchedContext::getTargetContainer(), TargetLife::getTargetPosition(), Target::getTargetState(), Tank::getTeam(), TankScore::getTurnKills(), Target::isTarget(), RAND, TankState::sDead, TankScore::setAssists(), TankScore::setKills(), TargetLife::setLife(), TankState::setLives(), TankScore::setMoney(), TankScore::setScore(), TargetShield::setShieldPower(), TankState::setState(), TankScore::setTurnKills(), shieldOnlyDamage_, TankState::sNormal, TankAI::tankHurt(), useShieldDamage_, weapon_, and weaponContext_.

Referenced by simulate().

void TankDamage::calculateDeath (  )  [protected]

Definition at line 400 of file TankDamage.cpp.

References ActionController::addSyncCheck(), Action::context_, damagedPlayerId_, Weapon::eDataDeathAnimation, Weapon::fireWeapon(), S3D::formatStringBuffer(), ScorchedContext::getActionController(), Target::getDeathAction(), Target::getLife(), Accessory::getName(), ScorchedContext::getOptionsGame(), AccessoryPart::getParent(), WeaponFireContext::getPlayerId(), TargetContainer::getTargetById(), ScorchedContext::getTargetContainer(), TargetLife::getTargetPosition(), StatsLogger::instance(), logDeath(), weaponContext_, and StatsLogger::weaponFired().

Referenced by calculateDamage().

void TankDamage::logDeath (  )  [protected]

Definition at line 431 of file TankDamage.cpp.

References ActionController::addAction(), Action::context_, damagedPlayerId_, Weapon::eDataDeathAnimation, S3D::formatStringBuffer(), Accessory::getAccessoryId(), ScorchedContext::getAccessoryStore(), ScorchedContext::getActionController(), Weapon::getArmsLevel(), WeaponFireContext::getData(), TankAIStrings::getDeathLine(), Tank::getDestinationId(), Accessory::getName(), ScorchedContext::getOptionsGame(), AccessoryPart::getParent(), Target::getPlayerId(), WeaponFireContext::getPlayerId(), Tank::getScore(), ScorchedContext::getServerMode(), TankScore::getSkill(), TankContainer::getTankById(), ScorchedContext::getTankContainer(), TargetContainer::getTargetById(), ScorchedContext::getTargetContainer(), Target::getTargetName(), Tank::getTeam(), Accessory::getTexture(), TankScore::getTurnKills(), StatsLogger::instance(), TankAIStrings::instance(), int(), Target::isTarget(), LANG_RESOURCE_3, LANG_RESOURCE_4, LANG_STRING, TankScore::setSkill(), Tank::setUniqueId(), ChannelManager::showText(), weapon_, and weaponContext_.

Referenced by calculateDeath().


Member Data Documentation

bool TankDamage::firstTime_ [protected]

Definition at line 42 of file TankDamage.h.

Referenced by simulate().

Weapon* TankDamage::weapon_ [protected]

Definition at line 43 of file TankDamage.h.

Referenced by calculateDamage(), getActionDetails(), and logDeath().

WeaponFireContext TankDamage::weaponContext_ [protected]

Definition at line 44 of file TankDamage.h.

Referenced by calculateDamage(), calculateDeath(), and logDeath().

unsigned int TankDamage::damagedPlayerId_ [protected]

Definition at line 45 of file TankDamage.h.

Referenced by calculateDamage(), calculateDeath(), getActionDetails(), init(), and logDeath().

fixed TankDamage::damage_ [protected]

Definition at line 46 of file TankDamage.h.

Referenced by calculateDamage(), and getActionDetails().

bool TankDamage::useShieldDamage_ [protected]

Definition at line 47 of file TankDamage.h.

Referenced by calculateDamage().

bool TankDamage::checkFall_ [protected]

Definition at line 47 of file TankDamage.h.

Referenced by calculateDamage().

bool TankDamage::shieldOnlyDamage_ [protected]

Definition at line 47 of file TankDamage.h.

Referenced by calculateDamage().


The documentation for this class was generated from the following files:
Generated on Mon Feb 16 15:15:07 2009 for Scorched3D by  doxygen 1.5.3