- Timestamp:
- Oct 27, 2005, 10:56:58 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/defs/debug.h
r5439 r5440 43 43 //definitions 44 44 #ifndef MODULAR_DEBUG 45 #define HARD_DEBUG_LEVEL DEBUG46 #define SOFT_DEBUG_LEVEL verbose45 #define HARD_DEBUG_LEVEL DEBUG 46 #define SOFT_DEBUG_LEVEL verbose 47 47 #else /* MODULAR_DEBUG */ 48 #ifndef DEBUG_MODULE_SOFT 49 #define SOFT_DEBUG_LEVEL verbose 50 #else /* DEBUG_MODULE_SOFT */ 51 #define SOFT_DEBUG_LEVEL DEBUG_MODULE_SOFT 52 #endif /* DEBUG_MODULE_SOFT */ 53 54 #ifndef DEBUG_SPECIAL_MODULE 55 #define HARD_DEBUG_LEVEL DEBUG 56 #else /* DEBUG_SPECIAL_MODULE */ 57 //////////////////// 58 // DEFINE MODULES // 59 //////////////////// 60 // FRAMEWORK 61 #define DEBUG_MODULE_BASE 2 62 #define DEBUG_MODULE_ORXONOX 2 63 #define DEBUG_MODULE_WORLD 2 64 #define DEBUG_MODULE_NETWORK 2 65 66 // LOADING 67 #define DEBUG_MODULE_LOAD 2 68 #define DEBUG_MODULE_IMPORTER 2 69 70 // ENGINES 71 #define DEBUG_MODULE_GRAPHICS 2 72 #define DEBUG_MODULE_EVENT 2 73 #define DEBUG_MODULE_PHYSICS 2 74 #define DEBUG_MODULE_GARBAGE_COLLECTOR 2 75 #define DEBUG_MODULE_OBJECT_MANAGER 2 76 #define DEBUG_MODULE_ANIM 2 77 #define DEBUG_MODULE_COLLISON_DETECTION 2 78 #define DEBUG_MODULE_SPATIAL_SEPARATION 2 79 #define DEBUG_MODULE_GUI 2 80 81 // MISC 82 #define DEBUG_MODULE_TRACK_MANAGER 2 83 #define DEBUG_MODULE_MATH 2 84 85 #define DEBUG_MODULE_PNODE 2 86 #define DEBUG_MODULE_WORLD_ENTITY 2 87 88 #define DEBUG_MODULE_WEAPON 2 89 90 #define HARD_DEBUG_LEVEL DEBUG_SPECIAL_MODULE 91 #endif /* DEBUG_SPECIAL_MODULE */ 48 #ifndef DEBUG_MODULE_SOFT 49 #define SOFT_DEBUG_LEVEL verbose 50 #else /* DEBUG_MODULE_SOFT */ 51 #define SOFT_DEBUG_LEVEL DEBUG_MODULE_SOFT 52 #endif /* DEBUG_MODULE_SOFT */ 53 54 #ifndef DEBUG_SPECIAL_MODULE 55 #define HARD_DEBUG_LEVEL DEBUG 56 #else /* DEBUG_SPECIAL_MODULE */ 57 //////////////////// 58 // DEFINE MODULES // 59 //////////////////// 60 // FRAMEWORK 61 #define DEBUG_MODULE_BASE 2 62 #define DEBUG_MODULE_ORXONOX 2 63 #define DEBUG_MODULE_WORLD 2 64 #define DEBUG_MODULE_NETWORK 2 65 66 // LOADING 67 #define DEBUG_MODULE_LOAD 2 68 #define DEBUG_MODULE_IMPORTER 2 69 70 // ENGINES 71 #define DEBUG_MODULE_GRAPHICS 2 72 #define DEBUG_MODULE_EVENT 2 73 #define DEBUG_MODULE_PHYSICS 2 74 #define DEBUG_MODULE_GARBAGE_COLLECTOR 2 75 #define DEBUG_MODULE_OBJECT_MANAGER 2 76 #define DEBUG_MODULE_ANIM 2 77 #define DEBUG_MODULE_COLLISON_DETECTION 2 78 #define DEBUG_MODULE_SPATIAL_SEPARATION 2 79 #define DEBUG_MODULE_GUI 2 80 81 // MISC 82 #define DEBUG_MODULE_TRACK_MANAGER 2 83 #define DEBUG_MODULE_MATH 2 84 85 #define DEBUG_MODULE_PNODE 2 86 #define DEBUG_MODULE_WORLD_ENTITY 2 87 88 #define DEBUG_MODULE_WEAPON 2 89 90 #define HARD_DEBUG_LEVEL DEBUG_SPECIAL_MODULE 91 92 #endif /* DEBUG_SPECIAL_MODULE */ 92 93 #endif /* MODULAR_DEBUG */ 93 94 -
trunk/src/world_entities/player.cc
r5435 r5440 136 136 137 137 this->weaponMan->setSlotPosition(0, Vector(-2.6, .1, -3.0)); 138 this->weaponMan->setSlotCapability(0, WTYPE_ALLDIRS & WTYPE_DIRECTIONAL); 138 139 139 140 this->weaponMan->setSlotPosition(1, Vector(-2.6, .1, 3.0)); 141 this->weaponMan->setSlotCapability(1, WTYPE_ALLDIRS & WTYPE_DIRECTIONAL); 140 142 141 143 this->weaponMan->setSlotPosition(2, Vector(-1.5, .5, -.5)); … … 329 331 330 332 // FIXME THIS MIGHT BE CONSIDERED EITHER A FEATURE, OR A BUG 331 int slot = 2;332 333 void Player::ADDWEAPON() 333 334 { … … 336 337 turret1->setStateDuration(WS_SHOOTING, (float)rand()/RAND_MAX*.5+.1); 337 338 338 this->weaponMan->addWeapon(turret1, 2 , slot++);339 this->weaponMan->addWeapon(turret1, 2); 339 340 340 341 this->weaponMan->changeWeaponConfig(2); -
trunk/src/world_entities/weapons/turret.cc
r5414 r5440 97 97 this->setEmissionPoint(1.684, 0.472, 0); 98 98 //this->getProjectileFactory()->prepare(100); 99 100 101 99 } 102 100 … … 140 138 if (target != NULL) 141 139 { 142 pj->setVelocity(this->getVelocity()+(this->getAbsDir().apply(Vector(1,0,0))*100.0 /*target->getAbsCoor() - this->getAbsCoor()*/)*.5);//this->getVelocity()); 140 pj->setVelocity(this->getVelocity()+(this->getAbsDir().apply(Vector(1,0,0))*100.0 + VECTOR_RAND(20) 141 /*target->getAbsCoor() - this->getAbsCoor()*/)*.5);//this->getVelocity()); 143 142 } 144 143 else … … 148 147 pj->setAbsCoor(this->getEmissionPoint()); 149 148 pj->setAbsDir(this->getAbsDir()); 149 150 150 State::getWorldEntityList()->add(pj); 151 151 } 152 153 152 154 153 void Turret::destroy () -
trunk/src/world_entities/weapons/weapon_manager.cc
r5435 r5440 220 220 if (unlikely(configID >= WM_MAX_CONFIGS || slotID >= (int)this->slotCount)) 221 221 { 222 PRINTF(2)("Slot %d of config %d is not availiabe \n", slotID, configID);222 PRINTF(2)("Slot %d of config %d is not availiabe (max: %d)\n", slotID, configID, this->slotCount); 223 223 return; 224 224 } … … 238 238 239 239 //! @todo check if the weapon is already assigned to another config in another slot 240 241 240 this->configs[configID][slotID] = weapon; 242 241 if (this->parent != NULL) … … 403 402 * @param the selected weaponconfig 404 403 */ 405 int WeaponManager::getNextFreeSlot(int configID )404 int WeaponManager::getNextFreeSlot(int configID, long capability) 406 405 { 407 406 for( int i = 0; i < this->slotCount; ++i) 408 407 { 409 if( this->configs[configID][i] == NULL) 408 if( this->configs[configID][i] == NULL && 409 (this->currentSlotConfig[i].capability & capability == this->currentSlotConfig[i].capability)) 410 410 return i; 411 411 } -
trunk/src/world_entities/weapons/weapon_manager.h
r5435 r5440 87 87 88 88 private: 89 int getNextFreeSlot(int configID );89 int getNextFreeSlot(int configID, long capability = WTYPE_ALL); 90 90 91 91 private:
Note: See TracChangeset
for help on using the changeset viewer.