Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 14, 2011, 2:38:37 PM (12 years ago)
Author:
jo
Message:

teamgametype merged into trunk

Location:
code/branches/presentation2011
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2011

  • code/branches/presentation2011/src/orxonox/worldentities/ControllableEntity.cc

    r8891 r8980  
    7474        this->bMouseLook_ = false;
    7575        this->mouseLookSpeed_ = 200;
    76         this->bIsRocket_ = false;
    7776
    7877        this->server_position_         = Vector3::ZERO;
     
    8887        this->setPriority( Priority::VeryHigh );
    8988        this->registerVariables();
     89        this->team_ = -1;
    9090    }
    9191
     
    120120        SUPER(ControllableEntity, XMLPort, xmlelement, mode);
    121121
     122        XMLPortParam(ControllableEntity, "team", setTeam, getTeam, xmlelement, mode).defaultValues(-1);
    122123        XMLPortParam(ControllableEntity, "hudtemplate", setHudTemplate, getHudTemplate, xmlelement, mode);
    123124        XMLPortParam(ControllableEntity, "camerapositiontemplate", setCameraPositionTemplate, getCameraPositionTemplate, xmlelement, mode);
  • code/branches/presentation2011/src/orxonox/worldentities/ControllableEntity.h

    r8891 r8980  
    163163                { return this->target_.get(); }
    164164            void setTargetInternal( uint32_t targetID );
    165             inline bool getRocket() const
    166                 { return this-> bIsRocket_; }
     165
     166            inline void setTeam(int team)
     167                { this->team_ = team; }
     168            inline float getTeam() const
     169                { return this->team_; }
    167170
    168171        protected:
     
    183186
    184187            Ogre::SceneNode* cameraPositionRootNode_;
    185             bool bIsRocket_; //Workaround to see, if the controllable entity is a Rocket.
    186188
    187189        private:
     
    240242            CameraPosition* reverseCamera_;
    241243            WeakPtr<WorldEntity> target_;
     244
     245            int team_ ; //<! teamnumber
    242246    };
    243247}
  • code/branches/presentation2011/src/orxonox/worldentities/pawns/Pawn.cc

    r8891 r8980  
    129129        XMLPortParam(Pawn, "reloadrate", setReloadRate, getReloadRate, xmlelement, mode).defaultValues(0);
    130130        XMLPortParam(Pawn, "reloadwaittime", setReloadWaitTime, getReloadWaitTime, xmlelement, mode).defaultValues(1.0f);
     131
     132
    131133    }
    132134
     
    455457        SUPER(Pawn, changedActivity);
    456458
    457         this->setRadarVisibility(this->isActive());
     459        this->setRadarVisibility(this->isVisible());
    458460    }
    459461
  • code/branches/presentation2011/src/orxonox/worldentities/pawns/Pawn.h

    r8891 r8980  
    5353            inline bool isAlive() const
    5454                { return this->bAlive_; }
     55
    5556
    5657            virtual void setHealth(float health);
     
    194195                { return NULL; }
    195196
     197
    196198            float health_;
    197199            float maxHealth_;
Note: See TracChangeset for help on using the changeset viewer.