Changeset 5576 in orxonox.OLD for branches/world_entities/src
- Timestamp:
- Nov 15, 2005, 11:21:57 PM (19 years ago)
- Location:
- branches/world_entities/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/world_entities/src/lib/coord/p_node.h
r5414 r5576 127 127 static const char* parentingModeToChar(int parentingMode); 128 128 static PARENT_MODE charToParentingMode(const char* parentingMode); 129 130 129 131 private: 130 132 void init(PNode* parent); -
branches/world_entities/src/world_entities/player.cc
r5574 r5576 343 343 Weapon* turret = NULL; 344 344 345 printf("free slot: %d\n", this->weaponMan->getNextFreeSlot(3, WTYPE_TURRET | WTYPE_ALLDIRS));346 347 345 if ((float)rand()/RAND_MAX < .1) 348 346 { -
branches/world_entities/src/world_entities/weapons/aim.cc
r5574 r5576 101 101 } 102 102 103 void Aim::searchTarget( PNode* source)103 void Aim::searchTarget(float range) 104 104 { 105 105 tIterator<WorldEntity>* iterator = State::getWorldEntityList()->getIterator(); … … 107 107 while (likely(entity != NULL)) 108 108 { 109 if (entity->isA(CL_NPC) && source->getAbsCoor().x < entity->getAbsCoor().x && (source->getAbsCoor() - entity->getAbsCoor()).len() < 100)109 if (entity->isA(CL_NPC) && this->source->getAbsCoor().x < entity->getAbsCoor().x && (this->source->getAbsCoor() - entity->getAbsCoor()).len() < range) 110 110 { 111 111 if (this->getParent() != entity) … … 156 156 this->text->setText(outputText); 157 157 158 159 if (this->source->getAbsCoor().x > this->getAbsCoor().x ) 160 this->searchTarget(1000); 158 161 // float z = 0.0f; 159 162 // glReadPixels ((int)this->getAbsCoor2D().x, -
branches/world_entities/src/world_entities/weapons/aim.h
r5567 r5576 38 38 inline PNode* getTarget(PNode* target) { return this->getParent(); }; 39 39 40 void searchTarget( PNode* source);40 void searchTarget(float range); 41 41 42 42 void setSize(float size); -
branches/world_entities/src/world_entities/weapons/aiming_turret.cc
r5574 r5576 157 157 pj->setAbsDir(this->getAbsDir()); 158 158 pj->activate(); 159 this->target->searchTarget( this);159 this->target->searchTarget(100); 160 160 } 161 161 -
branches/world_entities/src/world_entities/weapons/weapon_manager.cc
r5574 r5576 472 472 (this->currentSlotConfig[i].capability & capability & WTYPE_ALLKINDS) && 473 473 (this->currentSlotConfig[i].capability & capability & WTYPE_ALLDIRS)) 474 {475 printf("%d %d %d %d\n", currentSlotConfig[i].capability, capability, WTYPE_ALLKINDS, WTYPE_ALLDIRS);476 477 474 return i; 478 }479 475 } 480 476 return -1;
Note: See TracChangeset
for help on using the changeset viewer.