Changeset 8551
- Timestamp:
- May 23, 2011, 6:19:59 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gameimmersion/src/orxonox/worldentities/pawns/Pawn.cc
r8549 r8551 23 23 * Fabian 'x3n' Landau 24 24 * Co-authors: 25 * ...25 * simonmie 26 26 * 27 27 */ … … 66 66 this->maxHealth_ = 0; 67 67 this->initialHealth_ = 0; 68 68 69 this->shieldHealth_ = 0; 70 this->initialShieldHealth_ = 0; 71 this->maxShieldHealth_ = 100; //otherwise shield might increase to float_max 69 72 this->shieldAbsorption_ = 0.5; 70 ////////////////////////me 73 71 74 this->reloadRate_ = 0; 72 75 this->reloadWaitTime_ = 1.0f; 73 76 this->reloadWaitCountdown_ = 0; 74 77 75 this->maxShieldHealth_ = 0;76 ////////////////////////end me77 78 78 this->lastHitOriginator_ = 0; 79 79 … … 116 116 117 117 XMLPortParam(Pawn, "shieldhealth", setShieldHealth, getShieldHealth, xmlelement, mode).defaultValues(0); 118 XMLPortParam(Pawn, "initialshieldhealth", setInitialShieldHealth, getInitialShieldHealth, xmlelement, mode).defaultValues(0); 119 XMLPortParam(Pawn, "maxshieldhealth", setMaxShieldHealth, getMaxShieldHealth, xmlelement, mode).defaultValues(100); 118 120 XMLPortParam(Pawn, "shieldabsorption", setShieldAbsorption, getShieldAbsorption, xmlelement, mode).defaultValues(0); 119 121 … … 126 128 XMLPortObject(Pawn, WeaponPack, "weapons", addWeaponPackXML, getWeaponPack, xmlelement, mode); 127 129 128 /////// me129 130 XMLPortParam(Pawn, "reloadrate", setReloadRate, getReloadRate, xmlelement, mode).defaultValues(0); 130 131 XMLPortParam(Pawn, "reloadwaittime", setReloadWaitTime, getReloadWaitTime, xmlelement, mode).defaultValues(1.0f); 131 132 132 XMLPortParam(Pawn, "maxshieldhealth", setMaxShieldHealth, getMaxShieldHealth, xmlelement, mode).defaultValues(100); 133 XMLPortParam(Pawn, "initialshieldhealth", setInitialShieldHealth, getInitialShieldHealth, xmlelement, mode).defaultValues(0); 134 135 /////// end me 136 //TODO: DEFINES fuer defaultwerte (hier und weiter oben dieselben) 133 //TODO: DEFINES fuer defaultwerte (hier und weiter oben dieselben) 137 134 } 138 135 … … 141 138 registerVariable(this->bAlive_, VariableDirection::ToClient); 142 139 registerVariable(this->health_, VariableDirection::ToClient); 143 registerVariable(this-> initialHealth_,VariableDirection::ToClient);140 registerVariable(this->maxHealth_, VariableDirection::ToClient); 144 141 registerVariable(this->shieldHealth_, VariableDirection::ToClient); 142 registerVariable(this->maxShieldHealth_, VariableDirection::ToClient); 145 143 registerVariable(this->shieldAbsorption_, VariableDirection::ToClient); 146 144 registerVariable(this->bReload_, VariableDirection::ToServer);
Note: See TracChangeset
for help on using the changeset viewer.