- Timestamp:
- Dec 11, 2005, 10:15:23 PM (19 years ago)
- Location:
- trunk/src/world_entities/weapons
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/weapons/weapon_manager.cc
r6054 r6055 23 23 #include "crosshair.h" 24 24 25 #include "class_list.h"26 25 #include "load_param.h" 27 26 #include "factory.h" 28 #include "list.h" 27 29 28 #include "t_animation.h" 30 29 #include "null_parent.h" … … 380 379 tickWeapon->requestAction(WA_ACTIVATE); 381 380 tickWeapon->setParent(&this->currentSlotConfig[i].position); 381 this->currentSlotConfig[i].position.activateNode(); 382 382 } 383 else 384 this->currentSlotConfig[i].position.deactivateNode(); 383 385 } 384 386 } -
trunk/src/world_entities/weapons/weapon_manager.h
r5885 r6055 17 17 // FORWARD DECLARATION 18 18 template <class T> class tAnimation; 19 template <class T> class tIterator;20 21 19 22 20 #define WM_MAX_SLOTS 10 //!< How many slots the WeaponManager has at its max 23 21 #define WM_MAX_CONFIGS 4 //!< The maximum number of predefined Configurations 24 22 #define WM_MAX_LOADED_WEAPONS 20 //!< The 25 26 //! an enumerator defining a Slot, where a Weapon can be stored inside.27 typedef struct28 {29 PNode position; //!< the relative Position to the position of the carrying entity. (const PNode* parent; of WeaponManager)30 long capability; //!< the capabilities of the Slot @see WM_SlotCapability.31 32 Weapon* currentWeapon; //!< The current weapon this slot is carrying.33 Weapon* nextWeapon; //!< either NULL or the next weapon that will be set (require currentWeapon to deactivate)34 } WM_Slot;35 23 36 24 //! This is a special class, that can handle many different Weapons of a ship/man/whatever. … … 45 33 */ 46 34 class WeaponManager : public BaseObject { 35 36 //! an enumerator defining a Slot, where a Weapon can be stored inside. 37 typedef struct 38 { 39 PNode position; //!< the relative Position to the position of the carrying entity. (const PNode* parent; of WeaponManager) 40 long capability; //!< the capabilities of the Slot @see WM_SlotCapability. 41 42 Weapon* currentWeapon; //!< The current weapon this slot is carrying. 43 Weapon* nextWeapon; //!< either NULL or the next weapon that will be set (require currentWeapon to deactivate) 44 } WM_Slot; 45 47 46 public: 48 47 WeaponManager(PNode* parent);
Note: See TracChangeset
for help on using the changeset viewer.