Changeset 8942 in orxonox.OLD for branches/single_player_map/src
- Timestamp:
- Jun 30, 2006, 3:05:48 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/single_player_map/src/world_entities/npcs/repair_station.cc
r8941 r8942 80 80 this->loadModel("models/creatures/doors.md2", this->scale); 81 81 82 this->setAnimation( DOOR_CLOSE, MD2_ANIM_ONCE);82 this->setAnimation(REPAIR_CYCLE00, MD2_ANIM_ONCE); 83 83 } 84 84 … … 97 97 WorldEntity::loadParams(root); 98 98 99 LoadParam(root, "action-radius", this, RepairStation, setActionRadius)100 .describe("sets the action radius of the door")101 .defaultValues(3.0);102 99 LoadParam(root, "scale", this, RepairStation, setScale) 103 .describe("sets the scale of the door")100 .describe("sets the scale of the repair station") 104 101 .defaultValues(1.0); 105 102 } … … 122 119 123 120 121 /** 122 * this activates the repair station and makes it working 123 */ 124 void RepairStation::activate() 125 { 126 this->animationStep = 1; 127 } 124 128 125 void RepairStation::activate()126 {}127 129 130 /** 131 * this deactivates the repair station 132 */ 128 133 void RepairStation::deactivate() 129 {} 134 { 135 this->animationStep = 0; 136 } 130 137 138 139 /** 140 * this toggles the rotation direction 141 */ 131 142 void RepairStation::toggleRotation() 132 {} 143 { 144 this->animationStep *= -1; 145 } 133 146 134 147 … … 142 155 ((InteractiveModel*)this->getModel(0))->tick(time); 143 156 157 // if( ((MD2Model*)this->getModel(0))->getAnimation() != ATTACK) 158 // ((MD2Model*)this->getModel(0))->setAnimation(ATTACK); 144 159 160 161 this->setAnimation( this->animationCurrent, MD2_ANIM_ONCE); 162 this->animationCurrent = (this->animationCurrent + this->animationStep)%RAPAIR_MAX_ANIMATION; 145 163 } 146 164
Note: See TracChangeset
for help on using the changeset viewer.