Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 16, 2008, 6:01:13 PM (16 years ago)
Author:
landauf
Message:

Merged objecthierarchy2 into presentation branch

Couln't merge 2 lines in Gamestate.cc and a whole block of code in GSDedicated.cc (it seems like oli implemented in both branches something like a network-tick-limiter but with different approaches)

Not yet tested in network mode and with bots
The SpaceShips movement is also not yet fully adopted to the new physics (see Engine class)

Location:
code/branches/presentation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation

  • code/branches/presentation/src/orxonox/overlays/OrxonoxOverlay.h

    r2087 r2485  
    125125
    126126        //! Gets the rotation angle applied to this overlay in degrees.
    127         const Radian& getRotation() const         { return this->angle_; }
     127        const Degree& getRotation() const         { return this->angle_; }
    128128
    129129        //! Rotates the overlay by angle degrees.
     
    154154        virtual void changedVisibility();
    155155
     156        inline void setOwner(ControllableEntity* owner)
     157        {
     158            if (this->owner_ != owner)
     159            {
     160                this->owner_ = owner;
     161                this->changedOwner();
     162            }
     163        }
     164        inline ControllableEntity* getOwner() const
     165            { return this->owner_; }
     166        virtual void changedOwner() {}
     167
     168        inline void setOverlayGroup(OverlayGroup* group)
     169        {
     170            if (group != this->group_)
     171            {
     172                this->group_ = group;
     173                this->changedOverlayGroup();
     174            }
     175        }
     176        inline OverlayGroup* getOverlayGroup() const
     177            { return this->group_; }
     178        virtual void changedOverlayGroup() {}
     179
    156180    protected:
    157181        virtual void angleChanged();
     
    172196        Vector2 position_;                         //!< Position of the pickPoint on the screen.
    173197        Vector2 pickPoint_;                        //!< Point on the overlay to pick when translating
    174         Radian angle_;                             //!< Rotation angle of the overlay
     198        Degree angle_;                             //!< Rotation angle of the overlay
    175199        RotationState rotState_;             //!< horizontal, vertical or inbetween
    176200
     
    182206            We could also use the ObjectList, but that doesn't guarantee XMLPort(.) was called and is slower. */
    183207        static std::map<std::string, OrxonoxOverlay*> overlays_s;
     208        ControllableEntity* owner_;
     209        OverlayGroup* group_;
    184210  };
     211
     212  SUPER_FUNCTION(7, OrxonoxOverlay, changedOwner, false);
     213  SUPER_FUNCTION(8, OrxonoxOverlay, changedOverlayGroup, false);
    185214}
    186215
Note: See TracChangeset for help on using the changeset viewer.