67             virtual void tick(
float dt) 
override;
    70                 { 
return this->bAlive_; }
    73             void setHealth(
float health);
    75                 { this->setHealth(this->health_ + health); }
    77                 { this->setHealth(this->health_ - health); }
    79                 { 
return this->health_; }
    82                 { this->maxHealth_ = maxhealth; this->setHealth(this->health_); }
    84                 { 
return this->maxHealth_; }
    87                 { this->initialHealth_ = initialhealth; this->setHealth(initialhealth); }
    89                 { 
return this->initialHealth_; }
    91             void setShieldHealth(
float shieldHealth);
    94                 { 
return this->shieldHealth_; }
    97                 { this->setShieldHealth(this->shieldHealth_ + amount); }
   100                 { 
return (this->getShieldHealth() > 0); }
   102             void setMaxShieldHealth(
float maxshieldhealth);
   104                 { 
return this->maxShieldHealth_; }
   107                 { this->initialShieldHealth_ = initialshieldhealth; this->setShieldHealth(initialshieldhealth); }
   109                 { 
return this->initialShieldHealth_; }
   112                 { this->setShieldHealth(this->initialShieldHealth_); }
   114                 { this->setShieldHealth(this->maxShieldHealth_); }
   117                 { this->shieldAbsorption_ = shieldAbsorption; }
   119                 { 
return this->shieldAbsorption_; }
   121             void setShieldRechargeRate(
float shieldRechargeRate);
   123                 { 
return this->shieldRechargeRate_; }
   125             void setShieldRechargeWaitTime(
float shieldRechargeWaitTime);
   127                 { 
return this->shieldRechargeWaitTime_; }
   130                 { this->shieldRechargeWaitCountdown_ = 0; }
   133                 { this->shieldRechargeWaitCountdown_ = this->getShieldRechargeWaitTime(); } 
   135             void decreaseShieldRechargeCountdownTime(
float dt);
   140                 if (this->bVulnerable_ != bVulnerable)
   142                     this->bVulnerable_ = bVulnerable;
   143                     this->changedVulnerability();
   149             virtual void changedVulnerability();
   152                 { 
return this->lastHitOriginator_; }
   154             virtual void hit(
Pawn* originator, 
const Vector3& force, 
const btCollisionShape* cs, 
float damage, 
float healthdamage = 0.0f, 
float shielddamage = 0.0f);
   155             virtual void hit(
Pawn* originator, btManifoldPoint& contactpoint, 
const btCollisionShape* cs, 
float damage, 
float healthdamage = 0.0f, 
float shielddamage = 0.0f);
   159             virtual void fired(
unsigned int firemode) 
override;
   160             virtual void postSpawn();
   166             WeaponSlot * getWeaponSlot(
unsigned int index) 
const;
   168             WeaponSet * getWeaponSet(
unsigned int index) 
const;
   171             WeaponPack * getWeaponPack(
unsigned int index) 
const;
   173             void addMunitionXML(
Munition* munition);
   181                 { this->spawnparticlesource_ = 
source; }
   183                 { 
return this->spawnparticlesource_; }
   186                 { this->spawnparticleduration_ = duration; }
   188                 { 
return this->spawnparticleduration_; }
   191                 { this->numexplosionchunks_ = chunks; }
   193                 { 
return this->numexplosionchunks_; }
   197                 { this->damageMultiplier_ = multiplier; }
   199                 { 
return this->damageMultiplier_; }
   203                 { this->acceptsPickups_ = b; }
   205                 { 
return this->acceptsPickups_;}
   207             virtual void startLocalHumanControl() 
override;
   210                 { this->aimPosition_ = position; }
   212                 { 
return this->aimPosition_; }
   215                 { 
return this->getWorldPosition(); };
   217             virtual void changedVisibility() 
override;
   219             void setExplosionSound(
const std::string& engineSound);
   223                 { 
return this->weaponSystem_; }
   225             static void consoleCommand_debugDrawWeapons(
bool bDraw); 
   230             virtual void preDestroy() 
override;
   232             virtual void setPlayer(
PlayerInfo* player) 
override;
   233             virtual void removePlayer() 
override;
   235             virtual void death();
   236             virtual bool hasSlaves();
   238             virtual void goWithStyle();
   239             virtual void spawneffect();
   241             virtual void damage(
float damage, 
float healthdamage = 0.0f, 
float shielddamage = 0.0f, 
Pawn* originator = 
nullptr, 
const btCollisionShape* cs = 
nullptr);
   247                 { 
return new std::vector<PickupCarrier*>(); }
   278             void registerVariables();
   280                 { this->weaponSystem_ = weaponsystem; }
   281             void drawWeapons(
bool bDraw);
 void removeHealth(float health)
Definition: Pawn.h:76
 
Everything in Orxonox that has a health attribute is a Pawn. 
Definition: Pawn.h:56
 
The a WeaponSlot defines where a Weapon is placed on a pawn. 
Definition: WeaponSlot.h:59
 
void resetShieldRechargeCountdown()
Definition: Pawn.h:129
 
bool doesAcceptPickups()
Definition: Pawn.h:204
 
void source(const std::string &filename)
Reads the content of a file and executes the commands in it line by line. 
Definition: ConsoleCommandCompilation.cc:167
 
std::vector< Model * > debugWeaponSlotModels_
Definition: Pawn.h:287
 
ControllableEntity * getLastHitOriginator() const 
Definition: Pawn.h:151
 
WorldSound * explosionSound_
Definition: Pawn.h:285
 
std::vector< ExplosionPart * > explosionPartList_
Definition: Pawn.h:275
 
The WorldSound class is to be used for sounds with position and orientation. 
Definition: WorldSound.h:44
 
Definition: Munition.h:48
 
void setAimPosition(Vector3 position)
Definition: Pawn.h:209
 
::std::string string
Definition: gtest-port.h:756
 
const bool & isVulnerable() const 
Returns the state of the pawns vulnerability. 
Definition: Pawn.h:147
 
Definition of the PickupCarrier class. 
 
float health_
Definition: Pawn.h:252
 
bool acceptsPickups_
Definition: Pawn.h:265
 
Vector3 getAimPosition()
Definition: Pawn.h:211
 
void setSpawnParticleSource(const std::string &source)
Definition: Pawn.h:180
 
void setInitialHealth(float initialhealth)
Definition: Pawn.h:86
 
Vector3 aimPosition_
Definition: Pawn.h:283
 
float getShieldRechargeRate() const 
Definition: Pawn.h:122
 
float maxShieldHealth_
Definition: Pawn.h:257
 
WeakPtr< Pawn > lastHitOriginator_
Definition: Pawn.h:267
 
void restoreMaxShieldHealth()
Definition: Pawn.h:113
 
bool bVulnerable_
If this is false, then the pawn may not take damage. 
Definition: Pawn.h:244
 
Definition: WeaponSet.h:40
 
float getShieldAbsorption()
Definition: Pawn.h:118
 
float shieldRechargeWaitCountdown_
Definition: Pawn.h:262
 
Interface for receiving window events. 
Definition: RadarViewable.h:48
 
WeakPtr wraps a pointer to an object, which becomes nullptr if the object is deleted. 
Definition: CorePrereqs.h:236
 
std::string spawnparticlesource_
Definition: Pawn.h:271
 
const WeaponSystem * getWeaponSystem() const 
Definition: Pawn.h:222
 
float getHealth() const 
Definition: Pawn.h:78
 
void setShieldAbsorption(float shieldAbsorption)
Definition: Pawn.h:116
 
unsigned int getExplosionChunks() const 
Definition: Pawn.h:192
 
float getInitialHealth() const 
Definition: Pawn.h:88
 
float damageMultiplier_
Used by the Damage Boost Pickup. 
Definition: Pawn.h:264
 
float getShieldRechargeWaitTime() const 
Definition: Pawn.h:126
 
float getShieldHealth()
Definition: Pawn.h:93
 
void setDamageMultiplier(float multiplier)
Definition: Pawn.h:196
 
An orxonox::Pawn that is able to fire weapons always need to have a WeaponSystem. ...
Definition: WeaponSystem.h:47
 
void setPickupAcceptance(bool b)
Definition: Pawn.h:202
 
xmlelement
Definition: Super.h:519
 
void setVulnerable(bool bVulnerable)
Sets the state of the pawns vulnerability. 
Definition: Pawn.h:138
 
float getSpawnParticleDuration() const 
Definition: Pawn.h:187
 
void setExplosionChunks(unsigned int chunks)
Definition: Pawn.h:190
 
float initialHealth_
Definition: Pawn.h:254
 
Die Wagnis Klasse hat die folgenden Aufgaben: 
Definition: ApplicationPaths.cc:66
 
float shieldAbsorption_
Has to be between 0 and 1. 
Definition: Pawn.h:259
 
void addShieldHealth(float amount)
Definition: Pawn.h:96
 
Mode
Definition: CorePrereqs.h:102
 
Definition: WeaponPack.h:40
 
void restoreInitialShieldHealth()
Definition: Pawn.h:111
 
const std::string & getSpawnParticleSource() const 
Definition: Pawn.h:182
 
virtual PickupCarrier * getCarrierParent(void) const override
Get the parent of this PickupSpawner. 
Definition: Pawn.h:248
 
Shared library macros, enums, constants and forward declarations for the orxonox library  ...
 
void setSpawnParticleDuration(float duration)
Definition: Pawn.h:185
 
Definition: ExplosionPart.h:48
 
void setInitialShieldHealth(float initialshieldhealth)
Definition: Pawn.h:106
 
float getDamageMultiplier() const 
Definition: Pawn.h:198
 
bool hasShield()
Definition: Pawn.h:99
 
float maxHealth_
Definition: Pawn.h:253
 
#define _OrxonoxExport
Definition: OrxonoxPrereqs.h:60
 
Definition: Controller.h:38
 
WeaponSystem * weaponSystem_
Definition: Pawn.h:269
 
void setWeaponSystem(WeaponSystem *weaponsystem)
Definition: Pawn.h:279
 
unsigned int numexplosionchunks_
Definition: Pawn.h:273
 
void addHealth(float health)
Definition: Pawn.h:74
 
void startShieldRechargeCountdown()
Definition: Pawn.h:132
 
float initialShieldHealth_
Definition: Pawn.h:258
 
void setMaxHealth(float maxhealth)
Definition: Pawn.h:81
 
The PickupCarrier interface provides the means, for any class implementing it, to possess Pickupables...
Definition: PickupCarrier.h:68
 
float shieldRechargeWaitTime_
Definition: Pawn.h:261
 
virtual void addedWeaponPack(WeaponPack *wPack)
Definition: Pawn.h:178
 
float shieldHealth_
Definition: Pawn.h:256
 
float spawnparticleduration_
Definition: Pawn.h:272
 
float shieldRechargeRate_
Definition: Pawn.h:260
 
Definition: PlayerInfo.h:39
 
bool isAlive() const 
Definition: Pawn.h:69
 
virtual const Vector3 & getCarrierPosition(void) const override
Get the (absolute) position of the PickupCarrier. 
Definition: Pawn.h:214
 
The SubclassIdentifier acts almost like an Identifier, but has some prerequisites. 
Definition: SubclassIdentifier.h:90
 
The ControllableEntity is derived from the orxonox::MobileEntity. 
Definition: ControllableEntity.h:48
 
virtual std::vector< PickupCarrier * > * getCarrierChildren(void) const override
Get all direct children of this PickupSpawner. 
Definition: Pawn.h:246
 
float getMaxShieldHealth() const 
Definition: Pawn.h:103
 
float getMaxHealth() const 
Definition: Pawn.h:83
 
bool bAlive_
Definition: Pawn.h:243
 
float getInitialShieldHealth() const 
Definition: Pawn.h:108