Changeset 9243 in orxonox.OLD for branches/scripting/src/world_entities
- Timestamp:
- Jul 6, 2006, 4:10:39 PM (18 years ago)
- Location:
- branches/scripting/src/world_entities
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/scripting/src/world_entities/npcs/gate.cc
r9241 r9243 13 13 ### File Specific 14 14 main-programmer: Patrick Boenzli 15 co-programmer: 15 co-programmer: Silvan Nellen 16 16 */ 17 17 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY … … 66 66 this->scale = 1.0f; 67 67 this->actionRadius = 1.0; 68 this->destroyed = false; 68 69 69 70 if( root != NULL) … … 151 152 void Gate::open() 152 153 { 153 if( this->bLocked )154 if( this->bLocked || this->destroyed) 154 155 return; 155 156 … … 164 165 void Gate::close() 165 166 { 167 168 if( this->destroyed) 169 return; 170 166 171 this->setAnimation(GATE_CLOSE, MD2_ANIM_ONCE); 167 172 this->bOpen = false; … … 171 176 void Gate::destroy() 172 177 { 178 if( this->destroyed) 179 return; 180 173 181 this->setAnimation(GATE_DIE, MD2_ANIM_ONCE); 174 182 175 Explosion::explode(this, Vector(10,10,10)); 183 Explosion::explode(this, Vector(this->getScaling()/160,this->getScaling()/160,this->getScaling()/160)); 184 185 186 this->destroyed = true; 176 187 } 177 188 -
branches/scripting/src/world_entities/npcs/gate.h
r9235 r9243 50 50 51 51 private: 52 bool destroyed; //!< true if the door is destroyed 52 53 bool bOpen; //!< true if the door is open 53 54 bool bLocked; //!< true if this door is locked -
branches/scripting/src/world_entities/projectiles/guided_missile.cc
r9235 r9243 43 43 this->lifeSpan = 4.0; 44 44 this->agility = 3.5; 45 this->maxVelocity = 75;45 this->maxVelocity = 100; 46 46 47 47 this->emitter = new DotEmitter(100, 5, M_2_PI); -
branches/scripting/src/world_entities/space_ships/spacecraft_2d.cc
r9235 r9243 498 498 this->bForward = event.bPressed; //this->shiftCoor(0,.1,0); 499 499 else if( event.type == KeyMapper::PEV_BACKWARD) 500 this->bBackward = event.bPressed;//this->shiftCoor(0,-.1,0);500 {this->bBackward = event.bPressed; printf(" %f, %f, %f \n",getAbsCoorX(),getAbsCoorY(),getAbsCoorZ());} //this->shiftCoor(0,-.1,0); 501 501 else if( event.type == EV_MOUSE_MOTION) 502 502 { -
branches/scripting/src/world_entities/weapons/aiming_system.cc
r9235 r9243 115 115 if( this->owner != killer) 116 116 { 117 PRINTF(0)("real hit: %s\n", killer->getClassName());117 //PRINTF(0)("real hit: %s\n", killer->getClassName()); 118 118 this->selectionList.push_back(killer); 119 119 } -
branches/scripting/src/world_entities/world_entity.h
r9235 r9243 129 129 130 130 /* --- Character Attribute Block --- */ 131 /** @returns the scaling of the model */ 132 float getScaling(){return this->scaling;} 131 133 /** @returns the damage dealt by this world entity */ 132 134 float getDamage() const { return this->damage; }
Note: See TracChangeset
for help on using the changeset viewer.