Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 23, 2011, 6:19:59 PM (13 years ago)
Author:
simonmie
Message:

added missing server variable transfer registration

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gameimmersion/src/orxonox/worldentities/pawns/Pawn.cc

    r8549 r8551  
    2323 *      Fabian 'x3n' Landau
    2424 *   Co-authors:
    25  *      ...
     25 *      simonmie
    2626 *
    2727 */
     
    6666        this->maxHealth_ = 0;
    6767        this->initialHealth_ = 0;
     68
    6869        this->shieldHealth_ = 0;
     70        this->initialShieldHealth_ = 0;
     71        this->maxShieldHealth_ = 100; //otherwise shield might increase to float_max
    6972        this->shieldAbsorption_ = 0.5;
    70 ////////////////////////me
     73
    7174        this->reloadRate_ = 0;
    7275        this->reloadWaitTime_ = 1.0f;
    7376        this->reloadWaitCountdown_ = 0;
    7477
    75         this->maxShieldHealth_ = 0;
    76 ////////////////////////end me
    77 
    7878        this->lastHitOriginator_ = 0;
    7979
     
    116116
    117117        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);
    118120        XMLPortParam(Pawn, "shieldabsorption", setShieldAbsorption, getShieldAbsorption, xmlelement, mode).defaultValues(0);
    119121
     
    126128        XMLPortObject(Pawn, WeaponPack, "weapons", addWeaponPackXML, getWeaponPack, xmlelement, mode);
    127129
    128 /////// me
    129130        XMLPortParam(Pawn, "reloadrate", setReloadRate, getReloadRate, xmlelement, mode).defaultValues(0);
    130131        XMLPortParam(Pawn, "reloadwaittime", setReloadWaitTime, getReloadWaitTime, xmlelement, mode).defaultValues(1.0f);
    131132
    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)
    137134    }
    138135
     
    141138        registerVariable(this->bAlive_,           VariableDirection::ToClient);
    142139        registerVariable(this->health_,           VariableDirection::ToClient);
    143         registerVariable(this->initialHealth_,    VariableDirection::ToClient);
     140        registerVariable(this->maxHealth_,        VariableDirection::ToClient);
    144141        registerVariable(this->shieldHealth_,     VariableDirection::ToClient);
     142        registerVariable(this->maxShieldHealth_,  VariableDirection::ToClient);
    145143        registerVariable(this->shieldAbsorption_, VariableDirection::ToClient);
    146144        registerVariable(this->bReload_,          VariableDirection::ToServer);
Note: See TracChangeset for help on using the changeset viewer.