Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8942 in orxonox.OLD


Ignore:
Timestamp:
Jun 30, 2006, 3:05:48 AM (18 years ago)
Author:
patrick
Message:

more repair station

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/single_player_map/src/world_entities/npcs/repair_station.cc

    r8941 r8942  
    8080  this->loadModel("models/creatures/doors.md2", this->scale);
    8181
    82   this->setAnimation(DOOR_CLOSE, MD2_ANIM_ONCE);
     82  this->setAnimation(REPAIR_CYCLE00, MD2_ANIM_ONCE);
    8383}
    8484
     
    9797  WorldEntity::loadParams(root);
    9898
    99   LoadParam(root, "action-radius", this, RepairStation, setActionRadius)
    100       .describe("sets the action radius of the door")
    101       .defaultValues(3.0);
    10299  LoadParam(root, "scale", this, RepairStation, setScale)
    103       .describe("sets the scale of the door")
     100      .describe("sets the scale of the repair station")
    104101      .defaultValues(1.0);
    105102}
     
    122119
    123120
     121/**
     122 * this activates the repair station and makes it working
     123 */
     124void RepairStation::activate()
     125{
     126  this->animationStep = 1;
     127}
    124128
    125 void RepairStation::activate()
    126 {}
    127129
     130/**
     131 * this deactivates the repair station
     132 */
    128133void RepairStation::deactivate()
    129 {}
     134{
     135  this->animationStep = 0;
     136}
    130137
     138
     139/**
     140 * this toggles the rotation direction
     141 */
    131142void RepairStation::toggleRotation()
    132 {}
     143{
     144  this->animationStep *= -1;
     145}
    133146
    134147
     
    142155    ((InteractiveModel*)this->getModel(0))->tick(time);
    143156
     157//   if( ((MD2Model*)this->getModel(0))->getAnimation() != ATTACK)
     158//     ((MD2Model*)this->getModel(0))->setAnimation(ATTACK);
    144159
     160
     161  this->setAnimation( this->animationCurrent, MD2_ANIM_ONCE);
     162  this->animationCurrent = (this->animationCurrent + this->animationStep)%RAPAIR_MAX_ANIMATION;
    145163}
    146164
Note: See TracChangeset for help on using the changeset viewer.