Changeset 6056 in orxonox.OLD for trunk/src/world_entities/weapons/laser.cc
- Timestamp:
- Dec 11, 2005, 10:47:01 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/weapons/laser.cc
r5994 r6056 100 100 // GarbageCollector::getInstance()->collect(this); 101 101 State::getWorldEntityList()->remove(this); 102 this->removeNode(); 102 103 Laser::fastFactory->kill(this); 103 104 } … … 113 114 /** 114 115 * signal tick, time dependent things will be handled here 115 * @param time since last tick116 * @param dt time since last tick 116 117 */ 117 void Laser::tick (float time)118 void Laser::tick (float dt) 118 119 { 119 120 //Vector v = *this->flightDirection * ( this->speed * time * 1000 + 0.1); 120 Vector v = this->velocity * (time);121 Vector v = this->velocity * dt; 121 122 this->shiftCoor(v); 122 123 123 this->lifeCycle += time/this->lifeSpan; 124 if( this->lifeCycle >= 1.0) 125 { 126 PRINTF(5)("FINALIZE==========================\n"); 127 PRINTF(5)("current life cycle is: %f\n", this->lifeCycle); 128 PRINTF(5)("FINALIZE===========================\n"); 129 130 this->deactivate(); 131 } 124 if (this->tickLifeCycle(dt)) 125 this->deactivate(); 132 126 } 133 127
Note: See TracChangeset
for help on using the changeset viewer.