Changeset 3873 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Apr 18, 2005, 4:01:42 PM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/defs/debug.h
r3863 r3873 68 68 #define DEBUG_MODULE_LIGHT 0 69 69 #define DEBUG_MODULE_PLAYER 1 70 #define DEBUG_MODULE_WEAPON 3 70 71 #define DEBUG_MODULE_MATH 0 71 72 #define DEBUG_MODULE_FONT 4 -
orxonox/trunk/src/world_entities/player.cc
r3811 r3873 53 53 acceleration = 10.0; 54 54 //weapons: 55 this->weaponMan = new WeaponManager(); 55 56 Weapon* wpRight = new TestGun(this, new Vector(-2.6, 0.1, 3.0), new Quaternion(), 0); 56 57 Weapon* wpLeft = new TestGun(this, new Vector(-2.6, 0.1, -3.0), new Quaternion(), 1); 58 59 this->weaponMan->addWeapon(wpRight); 60 57 61 this->weapons->add(wpRight); 58 62 this->activeWeapon = wpRight; … … 70 74 */ 71 75 delete this->weapons; 76 delete this->weaponMan; 72 77 } 73 78 -
orxonox/trunk/src/world_entities/player.h
r3755 r3873 11 11 template<class T> class tList; 12 12 class Weapon; 13 class WeaponManager; 13 14 class Vector; 14 15 class World; … … 49 50 Weapon* activeWeapon; //!< the weapon that is currenty activated 50 51 Weapon* activeWeaponL; //temporary -- FIX THIS 52 WeaponManager* weaponMan; //!< the weapon manager: managing a list of weapon to wepaon-slot mapping 51 53 52 54 World* myWorld; //!< reference to the world object -
orxonox/trunk/src/world_entities/weapon.cc
r3870 r3873 16 16 */ 17 17 18 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON 18 19 19 20 #include "weapon.h" … … 61 62 return; 62 63 } 64 PRINTF(3)("Added new Weapon to Config:%i/Slot:%i\n", configID, freeSlot); 63 65 this->configs[configID].slots[freeSlot] = weapon; 64 66 return; … … 71 73 void WeaponManager::nextWeaponConf() 72 74 { 73 for(; this->currConfID < W_MAX_CONFIGS && !this->configs[this->currConfID].bUsed; this->currConfID+=1) 74 printf(""); 75 } 76 77 78 void WeaponManager::prevWeaponConf() 79 {} 80 81 82 void WeaponManager::selectConfig(int confID) 83 { 84 PRINTF(0)("There is no weapon config defined with the number W_CONF%i", confID); 85 } 86 75 int i; 76 for(i = this->currConfID; i < W_MAX_CONFIGS && !this->configs[i].bUsed; ++i); 77 if( i == W_MAX_CONFIGS) this->currConfID = W_CONFIG0; 78 else this->currConfID = i; 79 } 87 80 88 81 -
orxonox/trunk/src/world_entities/weapon.h
r3870 r3873 80 80 81 81 void addWeapon(Weapon* weapon, int slotID = W_FREE_SLOT, int configID = W_CONFIG1); 82 void nextWeaponConf(); 82 83 83 void nextWeaponConf();84 void prevWeaponConf();85 void selectConfig(int configID);86 84 87 85 private:
Note: See TracChangeset
for help on using the changeset viewer.