Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6055 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Dec 11, 2005, 10:15:23 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: first optimisations with InactiveNode
observe this through changing weapons while showing the PNodes with Shell → World togglePNodeVisibility

Location:
trunk/src/world_entities/weapons
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/weapons/weapon_manager.cc

    r6054 r6055  
    2323#include "crosshair.h"
    2424
    25 #include "class_list.h"
    2625#include "load_param.h"
    2726#include "factory.h"
    28 #include "list.h"
     27
    2928#include "t_animation.h"
    3029#include "null_parent.h"
     
    380379          tickWeapon->requestAction(WA_ACTIVATE);
    381380          tickWeapon->setParent(&this->currentSlotConfig[i].position);
     381          this->currentSlotConfig[i].position.activateNode();
    382382        }
     383        else
     384          this->currentSlotConfig[i].position.deactivateNode();
    383385      }
    384386    }
  • trunk/src/world_entities/weapons/weapon_manager.h

    r5885 r6055  
    1717// FORWARD DECLARATION
    1818template <class T> class tAnimation;
    19 template <class T> class tIterator;
    20 
    2119
    2220#define    WM_MAX_SLOTS            10             //!< How many slots the WeaponManager has at its max
    2321#define    WM_MAX_CONFIGS          4              //!< The maximum number of predefined Configurations
    2422#define    WM_MAX_LOADED_WEAPONS   20             //!< The
    25 
    26 //! an enumerator defining a Slot, where a Weapon can be stored inside.
    27 typedef struct
    28 {
    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;
    3523
    3624//! This is a special class, that can handle many different Weapons of a ship/man/whatever.
     
    4533 */
    4634class 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
    4746  public:
    4847    WeaponManager(PNode* parent);
Note: See TracChangeset for help on using the changeset viewer.