Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11783


Ignore:
Timestamp:
Feb 20, 2018, 12:14:40 AM (6 years ago)
Author:
landauf
Message:

merged Presentation_HS17_merge back to trunk

Location:
code/trunk
Files:
6 deleted
75 edited
38 copied

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/data/gui/layouts/HighscoreMenu.layout

    • Property svn:eol-style set to native
  • code/trunk/data/gui/scripts/HighscoreMenu.lua

    • Property svn:eol-style set to native
  • code/trunk/data/gui/scripts/TestDialogButttons.lua

    • Property svn:eol-style set to native
  • code/trunk/data/levels/Endurancefinal.oxw

    • Property svn:eol-style set to native
  • code/trunk/data/levels/MilleniumFalconTest.oxw

    • Property svn:eol-style set to native
  • code/trunk/data/levels/SOB.oxw

    • Property svn:eol-style set to native
    r11449 r11783  
    77
    88        <?lua
    9         include("HUDTemplates3.oxo") 
    10         include("jumpHUD.oxo")
    119        include("stats.oxo")
    1210        include("templates/lodInformation.oxt")
    1311        include("overlays/SOBHUD.oxo")
    1412        ?>
     13
    1514
    1615
     
    4847
    4948
    50 
    5149        <Template name=sobFigureTemplate>
    5250                <SOBFigure camerapositiontemplate=sobfigurecameras collisionType="dynamic" position="0,0,30">
     
    5755
    5856                        <collisionShapes>
    59                                 <BoxCollisionShape position="-2,0,2" halfExtents="3,1,10" />
     57                                <BoxCollisionShape position="0,0,2" halfExtents="3,1,10" />
    6058                        </collisionShapes>
    6159
    6260
    6361                </SOBFigure>
     62        </Template>
     63
     64
     65        <Template name=fireball>
     66                <SOBFireball collisionType="dynamic" speed=90>
     67                        <attached>
     68                                <Model mesh="planets/sol.mesh" position="0,0,0" scale=3 pitch=90/>
     69
     70                                <ParticleSpawner source="Orxonox/fire4" startdelay=0  position="-4,0,0" visible="false"/>
     71                               
     72                        </attached>
     73                        <collisionShapes>
     74                                <SphereCollisionShape position="0,0,0" radius="3" />                   
     75                        </collisionShapes>
     76                </SOBFireball>
    6477        </Template>
     78
     79        <Template name=gumbaShootable>
     80                <SOBGumba collisionType="dynamic" speed=60>
     81                        <attached>
     82                                <Model mesh="Goomba.mesh" position="0,0,1" scale=3 pitch=90/>                           
     83                        </attached>
     84                        <collisionShapes>
     85                                <BoxCollisionShape position="0,0,0" halfExtents="5,5,3" />                     
     86                        </collisionShapes>
     87                </SOBGumba>
     88        </Template>
     89
    6590
    6691        <Level
     
    95120
    96121
    97                                         <!--Gumba-->
     122
     123
     124
     125
    98126
    99127                                        <SOBGumba collisionType="dynamic" speed=40 position = "240,0,0">
     
    106134                                                </collisionShapes>
    107135                                        </SOBGumba>
     136
    108137                                        <SOBGumba collisionType="dynamic" speed=30 position = "420,0,0">
    109138                                                <attached>
     
    193222                                        </SOBGumba>
    194223
    195                                         <SOBGumba collisionType="dynamic" speed=30 position = "1750,0,0">
    196                                                 <attached>
    197                                                         <Model mesh="Goomba.mesh" position="0,0,21" scale=3 pitch=90/>
    198                                                        
    199                                                 </attached>
    200                                                 <collisionShapes>
    201                                                         <BoxCollisionShape position="0,0,20" halfExtents="5,5,3" />                     
    202                                                 </collisionShapes>
    203                                         </SOBGumba>
    204 
    205                                         <SOBGumba collisionType="dynamic" speed=20 position = "1770,0,0">
    206                                                 <attached>
    207                                                         <Model mesh="Goomba.mesh" position="0,0,21" scale=3 pitch=90/>
    208                                                        
    209                                                 </attached>
    210                                                 <collisionShapes>
    211                                                         <BoxCollisionShape position="0,0,20" halfExtents="5,5,3" />                     
    212                                                 </collisionShapes>
    213                                         </SOBGumba>
    214 
     224                                        <!--GumbaBoss-->
     225                                        <SOBGumbaBoss collisionType="dynamic" speed=20 position = "1750,0,0">
     226                                                <attached>
     227                                                        <Model mesh="Goomba.mesh" position="0,0,21" scale=6 pitch=90/>
     228                                                       
     229                                                </attached>
     230                                                <collisionShapes>
     231                                                        <BoxCollisionShape position="0,0,20" halfExtents="10,10,6" />                   
     232                                                </collisionShapes>
     233                                        </SOBGumbaBoss>
     234x       
    215235
    216236                                        <!--CollisionShape for Gumba-->
     
    225245                                                </collisionShapes>
    226246                                        </StaticEntity>
    227 
    228 
    229 
    230                                        
    231 
    232247
    233248
     
    581596
    582597
    583                                         <!-- Luft4 -->
     598                                        <!-- Luft4 (BossAbschnitt)-->
    584599                                        <Model mesh="Dreieck.mesh" position="1560,0,-10" scale=10 Roll=90 Pitch=-90 yaw=90/>                    <!-- L4.1 -->
    585600
    586601                                        <Model mesh="Rohr.mesh" position="1645,5,-35" scale=10  roll=90 yaw=90 pitch=-90 />                     <!-- L4.2 -->
    587 
    588                                         <Model mesh="Cube1.1.mesh" position="1690,0,20" scale=10/>                                                                              <!-- L4.3 -->
    589                                         <Model mesh="Cube1.1.mesh" position="1700,0,20" scale=10/>                                                                              <!-- L4.4 -->
    590 
    591                                         <SOBQBlock collisionType="static" type="Coin" position="1710,0,20" mass='-1'>                                   <!-- L4.5 -->                           
    592                                                 <attached>
    593                                                         <Model mesh="QCube.mesh" scale=10 pitch=90/>
    594                                                         <Model mesh="QCube-grey.mesh" scale=10 pitch=90 visible=false/>                         
    595                                                 </attached>
    596                                                 <collisionShapes>
    597                                                         <BoxCollisionShape position="0,0,0" halfExtents="5,5,5" />
    598                                                 </collisionShapes>
    599                                         </SOBQBlock>
    600 
    601                                         <Model mesh="Cube1.1.mesh" position="1720,0,20" scale=10/>                                                                              <!-- L4.6 -->
    602602                                        <Model mesh="Rohr.mesh" position="1805,5,-35" scale=10  roll=90 yaw=90 pitch=-90 />                     <!-- L4.7 -->
    603603                                        <Model mesh="Dreieckgross.mesh" position="1850,0,-10" scale=10 pitch=90 />                                              <!-- L4.8 -->
     
    606606
    607607
    608                                         <Model mesh="Schloss.mesh" position="2050,40,60" scale=12 pitch=90/>                                    <!-- L4.12 -->
     608                                        <Model mesh="Schloss.mesh" position="2050,40,80" scale=15 pitch=90/>                                    <!-- L4.12 -->
    609609                                        <Model mesh="Fahne.mesh" position="1984,-5,88" scale=10 pitch=90/>                                              <!-- L4.11 -->
    610610                                        <Model mesh="Fahnenstange.mesh" position="1990,0,95" pitch=90 scale=3/>                                 <!-- L4.10 -->
     
    680680                                        </StaticEntity>
    681681
    682 
    683 
    684 
    685                                         <StaticEntity collisionType="static" mass='-1'>
    686                                                 <collisionShapes>
    687 
    688                                                         <BoxCollisionShape position="1690,0,20" halfExtents="5,5,5" />                                  <!-- 4.3 -->
    689                                                         <BoxCollisionShape position="1700,0,20" halfExtents="5,5,5" />                                  <!-- 4.4 -->
    690                                                         <BoxCollisionShape position="1720,0,20" halfExtents="5,5,5" />                                  <!-- 4.6 -->
    691 
    692 
    693                                                 </collisionShapes>
    694                                         </StaticEntity>
    695682
    696683
  • code/trunk/data/levels/StoryModeMap.oxw

    • Property svn:eol-style set to native
  • code/trunk/data/levels/includes/MFalconWeapon.oxi

    • Property svn:eol-style set to native
  • code/trunk/data/levels/newnewnewspacerace.oxw

    • Property svn:eol-style set to native
  • code/trunk/data/levels/templates/MFalcon.oxt

    • Property svn:eol-style set to native
  • code/trunk/data/levels/templates/StoryMode.oxt

    • Property svn:eol-style set to native
  • code/trunk/data/levels/templates/endurancetest_template.oxt

    • Property svn:eol-style set to native
  • code/trunk/data/levels/templates/fastship.oxt

    • Property svn:eol-style set to native
  • code/trunk/data/overlays/HUDTemplates3.oxo

    r11718 r11783  
    4747<Template name="spaceshiphud">
    4848  <OverlayGroup name = "spaceshiphud" scale = "1, 1">
    49     <Map />
     49
    5050
    5151    <HUDHealthBar
     
    217217
    218218    <GUIOverlay
    219       name = "Dialogue"
    220       guiname = "Dialogue"
     219      name = "Dialog"
     220      guiname = "Dialog"
    221221      visible = "false"
    222222    />
  • code/trunk/data/overlays/HUDTemplatesFPS.oxo

    r11711 r11783  
    11<Template name="fpshud">
    22  <OverlayGroup name = "fpshud" scale = "1, 1">
    3     <Map />
    4 
    53    <HUDHealthBar
    64     name              = "HealthBar1"
  • code/trunk/data/overlays/SOBHUD.oxo

    • Property svn:eol-style set to native
  • code/trunk/data/overlays/StoryModeHUD.oxo

    • Property svn:eol-style set to native
    r11359 r11783  
    22<Template name="StoryModeMap">
    33  <OverlayGroup name = "spaceshiphud" scale = "1, 1">
    4     <Map />
    5 
    64
    75     <GUIOverlay
  • code/trunk/data/particle/fire3.particle

    r5781 r11783  
    6565                colour3 0 0 0 0
    6666                time3   1
    67                 colour4 0.5 0.5 0.5 0
    68                 time4   1
    69                 colour5 0.5 0.5 0.5 0
    70                 time5   1
     67               
    7168        }
    7269}
  • code/trunk/src/libraries/tools/Mesh.cc

    r11080 r11783  
    100100    }
    101101
     102    // PRE: a valid  Ogre::Entity* entity with a valid subentity at index
     103    // POST: changed material of subentity at index to name
     104    void Mesh::setSubMaterial(const std::string& name, const int index){
     105         if (this->entity_ && this->entity_->getSubEntity(index))
     106        {
     107                this->entity_->getSubEntity(index)->setMaterialName(name);
     108        }
     109        else
     110            orxout() << "ERROR at Index " << index << endl;
     111    }
     112
    102113    const std::string& Mesh::getMaterial() const
    103114    {
  • code/trunk/src/libraries/tools/Mesh.h

    r11080 r11783  
    5151            const std::string& getMaterial() const;
    5252
     53            void setSubMaterial(const std::string& name, const int index);
     54
    5355            void setVisible(bool bVisible);
    5456            bool isVisible() const;
  • code/trunk/src/modules/CMakeLists.txt

    r11451 r11783  
    2626################ Sub Directories ################
    2727
    28 ADD_SUBDIRECTORY(dialogue)
     28ADD_SUBDIRECTORY(asteroidmining)
     29ADD_SUBDIRECTORY(dialog)
    2930ADD_SUBDIRECTORY(designtools)
    3031ADD_SUBDIRECTORY(gametypes)
     
    4647ADD_SUBDIRECTORY(hover)
    4748ADD_SUBDIRECTORY(superorxobros)
     49ADD_SUBDIRECTORY(asteroids2D)
     50ADD_SUBDIRECTORY(flappyorx)
  • code/trunk/src/modules/dodgerace/DodgeRace.cc

    r11716 r11783  
    3737#include "core/CoreIncludes.h"
    3838#include "Highscore.h"
     39#include "infos/PlayerInfo.h"
    3940
    4041namespace orxonox
     
    9091    void DodgeRace::tick(float dt)
    9192    {
    92         if (getPlayer() != nullptr)
    93         {
    94             currentPosition = getPlayer()->getWorldPosition().x;
     93        DodgeRaceShip* player = this->getPlayer();
     94        if (player != nullptr)
     95        {
     96            currentPosition = player->getWorldPosition().x;
    9597            counter = counter + (currentPosition - lastPosition);
    9698            lastPosition = currentPosition;
    9799            point = (int) currentPosition;
    98             getPlayer()->speed = 830.0f - (point / 1000);
     100            player->speed = 830.0f - (point / 1000);
    99101
    100102            for(unsigned int i=0; i < cubeList.size();i++)
     
    123125                    }
    124126
    125                     cube->setPosition(getPlayer()->getWorldPosition() + Vector3(5000.0f, 0.0f, -3600.0f + (i*1200)));
     127                    cube->setPosition(player->getWorldPosition() + Vector3(5000.0f, 0.0f, -3600.0f + (i*1200)));
    126128                    //stEntity->setScale3D(50,50,50);
    127129                }
     
    139141    DodgeRaceShip* DodgeRace::getPlayer()
    140142    {
    141         if (player == nullptr)
    142         {
    143             for (DodgeRaceShip* ship : ObjectList<DodgeRaceShip>())
    144             {
    145                 player = ship;
    146             }
    147         }
    148         return player;
     143        for (DodgeRaceShip* ship : ObjectList<DodgeRaceShip>())
     144        {
     145            return ship;
     146        }
     147        return nullptr;
    149148    }
    150149
     
    190189    void DodgeRace::playerPreSpawn(PlayerInfo* player)
    191190    {
     191        this->playerInfo_ = player;
    192192        if(lives <= 0)
    193193        {
     
    228228        {
    229229            int score = this->getPoints();
    230             Highscore::getInstance().storeScore("Dodge Race", score, this->getPlayer()->getPlayer());
     230            Highscore::getInstance().storeScore("Dodge Race", score, this->playerInfo_);
    231231        }
    232232        GSLevel::startMainMenu();
  • code/trunk/src/modules/dodgerace/DodgeRace.h

    r11071 r11783  
    103103
    104104            DodgeRaceShip* getPlayer();
    105             WeakPtr<DodgeRaceShip> player;
     105            WeakPtr<PlayerInfo> playerInfo_;
    106106            std::vector<DodgeRaceCube*> cubeList;
    107107            void toggleShowLevel(){bShowLevel = !bShowLevel;}
  • code/trunk/src/modules/overlays/hud/CMakeLists.txt

    r11705 r11783  
    2626  LastTeamStandingInfos.cc
    2727  CountDown.cc
     28  StoryModeHUD.cc
    2829)
  • code/trunk/src/modules/overlays/hud/HUDPickupSystem.cc

    • Property svn:eol-style set to native
  • code/trunk/src/modules/overlays/hud/HUDPickupSystem.h

    • Property svn:eol-style set to native
  • code/trunk/src/modules/pickup/PickupPrereqs.h

    r11708 r11783  
    7272    class Pickup;
    7373    class PickupCollection;
    74     class PickupInventoryContainer;
     74    struct PickupInventoryContainer;
    7575    class PickupManager;
    7676    class PickupRepresentation;
  • code/trunk/src/modules/pickup/PickupSpawner.cc

    r11707 r11783  
    158158            for(Pawn* pawn : ObjectList<Pawn>())
    159159            {
     160                if(!(pawn->doesAcceptPickups())){continue;} // skip those pawns, e.g. AsteroidMinables.
     161
    160162                Vector3 distance = pawn->getWorldPosition() - this->getWorldPosition();
    161163                PickupCarrier* carrier = static_cast<PickupCarrier*>(pawn);
  • code/trunk/src/modules/pickup/PickupSpawner.h

    r11071 r11783  
    9292                { return this->triggerDistance_; }
    9393            /**
     94            @brief Set the distance in which to trigger.
     95            @param value The new distance in which to trigger.
     96            */
     97            inline void setTriggerDistance(float value)
     98                { this->triggerDistance_ = value; }
     99            /**
    94100            @brief Get the time to respawn.
    95101            @returns Returns the time after which this gets re-actived.
     
    98104                { return this->respawnTime_; }
    99105            /**
     106            @brief Set the time to respawn.
     107            @param time New time after which this gets re-actived.
     108            */
     109            inline void setRespawnTime(float time)
     110                { this->respawnTime_ = time; }
     111            /**
    100112            @brief Get the maximum number of items that will be spawned by this PickupSpawner.
    101113            @return Returns the maximum number of items spawned by this PickupSpawner.
     
    103115            inline int getMaxSpawnedItems(void) const
    104116                { return this->maxSpawnedItems_; }
     117            void setMaxSpawnedItems(int items); //!< Sets the maximum number of spawned items.
     118
    105119            /**
    106120            @brief Returns the name of the template which is used to create a pickup for this spawner.
     
    113127            inline Template* getPickupTemplate() const
    114128                {return this->pickupTemplate_; }
     129
     130            void setPickupTemplateName(const std::string& name);
     131            void setPickupTemplate(Template* temp);
    115132
    116133        private:
     
    130147            void block(PickupCarrier* carrier, unsigned int time = DEFAULT_BLOCKED_TIME)
    131148                { this->blocked_.insert(std::pair<PickupCarrier*, std::time_t>(carrier, std::time(0)+time)); }
    132 
    133             /**
    134             @brief Set the distance in which to trigger.
    135             @param value The new distance in which to trigger.
    136             */
    137             inline void setTriggerDistance(float value)
    138                 { this->triggerDistance_ = value; }
    139             /**
    140             @brief Set the time to respawn.
    141             @param time New time after which this gets re-actived.
    142             */
    143             inline void setRespawnTime(float time)
    144                 { this->respawnTime_ = time; }
    145 
    146             void setMaxSpawnedItems(int items); //!< Sets the maximum number of spawned items.
    147 
    148             void setPickupTemplateName(const std::string& name);
    149             void setPickupTemplate(Template* temp);
    150149
    151150            Pickupable* createPickup(void); //!< Creates a new Pickupable.
  • code/trunk/src/modules/superorxobros/CMakeLists.txt

    • Property svn:eol-style set to native
    r11416 r11783  
    99  SOBHUDInfo.cc
    1010  SOBGumba.cc
     11  SOBFireball.cc
    1112  SOBFlagstone.cc
    1213  SOBCastlestone.cc
    1314  SOBCoin.cc
     15  SOBGumbaBoss.cc
    1416
    1517)
  • code/trunk/src/modules/superorxobros/SOB.cc

    • Property svn:eol-style set to native
    r11418 r11783  
    4444#include "SOBFigure.h"
    4545#include "graphics/Camera.h"
     46#include "Highscore.h"
    4647
    4748
     
    4950namespace orxonox
    5051{
    51 
     52    bool newHighscore=0;
    5253    RegisterUnloadableClass(SOB);
    5354
     
    5960    {
    6061        RegisterObject(SOB);
    61         camera = nullptr;
    6262
    6363        this->center_ = nullptr;
     
    6868        timeLeft_=400.0;
    6969        done_ = true;
     70        newHighscore = false;
    7071        lvl_ = 1;
    7172
     
    7879    SOB::~SOB()
    7980    {
    80         if (this->isInitialized())
    81             this->cleanup();
    8281    }
    83 
    84     void SOB::cleanup()
    85     {
    86         camera = nullptr;
    87     }
    88 
    89 
    9082
    9183    void SOB::start()
     
    9991            }
    10092
    101             center_->attach(figure_);
    10293            figure_->setPosition(0, 0, 0);
    10394        }
     
    112103        Gametype::start();
    113104
    114         if (figure_ != nullptr)
    115         {
    116             camera = figure_->getCamera();
    117         }
    118 
    119105    }
    120106
    121107    void SOB::end()
    122108    {
    123         cleanup();
    124109        GSLevel::startMainMenu();
    125110        Deathmatch::end();
    126     }
     111}
    127112
    128113    void SOB::restart() {
    129         cleanup();
    130 
    131114        // HACK - only method I found to simply reload the level
    132115        Game::getInstance().popState();
     
    167150        if (this->figure_ != nullptr && figure_->lvlEnded_) {
    168151            std::stringstream a;
    169             a << "Nice! " << getPoints() << " Points in " << (400-getTimeLeft())/2 <<"s.\n\nPress <Space> to restart";
     152            if(!newHighscore){
     153                a << "Nice! " << getPoints() << " Points in " << (400-getTimeLeft())/2 <<"s.\n\nPress <Space> to restart";
     154            }
     155            else{
     156                a << "Congrats, new Highscore! " << getPoints() << " Points in " << (400-getTimeLeft())/2 <<"s.\n\nPress <Space> to restart";
     157            }
    170158            info_ =a.str();
    171159
     
    181169        //The time on the HUD
    182170        if (!done_)
    183             timeLeft_-=dt*2.5;
     171            timeLeft_-=dt*2.5f;
    184172    }
    185173
  • code/trunk/src/modules/superorxobros/SOB.h

    • Property svn:eol-style set to native
    r11418 r11783  
    7676                points_+=100;
    7777            }
     78            void addGumbaBoss() {
     79                points_+=5000;
     80            }
    7881            void addPoints(int poi) {
    7982                points_+=poi;
    8083            }
    8184            int getTimeLeft() {
    82                 return timeLeft_;
     85                return (int) timeLeft_;
    8386            }
    8487            std::string getInfoText() {
     
    103106
    104107            WeakPtr<SOBCenterpoint> center_;
     108            bool newHighscore;
    105109
    106110        protected:
    107111
    108112
    109             void cleanup(); //!< Cleans up the Gametype
    110113            WeakPtr<SOBFigure> figure_;
    111             WeakPtr<Camera> camera;
    112114            int points_;
    113115            int coins_;
  • code/trunk/src/modules/superorxobros/SOBCastlestone.cc

    • Property svn:eol-style set to native
  • code/trunk/src/modules/superorxobros/SOBCastlestone.h

    • Property svn:eol-style set to native
  • code/trunk/src/modules/superorxobros/SOBCenterpoint.cc

    • Property svn:eol-style set to native
  • code/trunk/src/modules/superorxobros/SOBCenterpoint.h

    • Property svn:eol-style set to native
  • code/trunk/src/modules/superorxobros/SOBCoin.cc

    • Property svn:eol-style set to native
    r11420 r11783  
    4949        setAngularFactor(0.0);
    5050
     51        speed_ = 0;
     52        lifetime_ = 0;
    5153    }
    5254
     
    6769        lifetime_-=dt;
    6870
    69         if (lifetime_ <+ 0) {
     71        if (lifetime_ < 0) {
    7072            destroyLater();
    7173        }
  • code/trunk/src/modules/superorxobros/SOBCoin.h

    • Property svn:eol-style set to native
    r11416 r11783  
    5050
    5151
    52         bool attachedToFigure_;
    53 
    5452        void setLifetime(const float lt)
    5553        { this->lifetime_ = lt; }
  • code/trunk/src/modules/superorxobros/SOBFigure.cc

    • Property svn:eol-style set to native
    r11420 r11783  
    2323 *      Julien Kindle
    2424 *   Co-authors:
     25 *      Noah Zarro
     26 *      Theo von Arx
    2527 *     
    2628 *
     
    3941#include "graphics/Camera.h"
    4042#include "graphics/ParticleSpawner.h"
     43#include <OgreMath.h>
    4144
    4245#include "SOBMushroom.h"
    4346#include "SOBGumba.h"
     47#include "SOBGumbaBoss.h"
     48#include "SOBFireball.h"
    4449#include "SOB.h"
    4550#include "SOBFlagstone.h"
    4651#include "SOBCastlestone.h"
     52#include "SOBFireball.h"
     53#include "Highscore.h"
    4754#include <BulletCollision/NarrowPhaseCollision/btManifoldPoint.h>
    4855
     
    5966
    6067        //Vars for movement of player
    61         moveUpPressed_ = false;
    62         moveDownPressed_ = false;
    63         moveLeftPressed_ = false;
    64         moveDownPressed_ = false;
    65         firePressed_ = false;
    66         collDisZ_ = 0;
     68        moveUpPressed_      = false;
     69        moveDownPressed_    = false;
     70        moveLeftPressed_    = false;
     71        moveRightPressed_    = false;
     72        firePressed_        = false;
     73        collDisZ_           = 0;
     74
    6775        //Times and turning
    68         timeSinceLastFire_ = 0.0;
    69         lastSpeed_z = 0.0;
    70         pitch_ = 0.0;
    71         timeCounter_ = 0;
     76        timeSinceLastFire_  = 0.0;
     77        lastSpeed_z         = 0.0;
     78        timeCounter_        = 0;
    7279
    7380        //Properties of player
    74         gotPowerUp_ = false;
    75         isColliding_ = true;
    76         particlespawner_ = NULL;
     81
     82        isColliding_        = true;
     83        particlespawner_    = NULL;
    7784
    7885        //Properties of players life
    79         predead_ = false;
    80         dead_ = false;
    81         lvlEnded_ = false;
     86        predead_            = false;
     87        dead_               = false;
     88        lvlEnded_           = false;
    8289        reachedLvlEndState_ = 0;
     90
     91        // Properties concerning PowerUps and items
     92        PowerUpCounter_     = 0;
     93        maxPowerUp_         = 2;
     94        FireballPower       = 2;
     95        //Properties of fireing Fireballs, NOTE! fireballs are fired with the moveUP Key, not with the fire key
     96        fireallowed_        = true;
     97        firecooldown_       = 0;
    8398
    8499       
     
    97112
    98113        //Orxocast returns object with casted type if otherObject has that class, and if not a nullptr
    99         SOBMushroom* mush = orxonox_cast<SOBMushroom*>(otherObject);
    100         SOBGumba* gumba = orxonox_cast<SOBGumba*>(otherObject);
    101         SOBFlagstone* flagstone = orxonox_cast<SOBFlagstone*>(otherObject);
    102         SOBCastlestone* castlestone = orxonox_cast<SOBCastlestone*>(otherObject);
    103 
    104         //Check if otherObject is a powerup
     114        SOBMushroom*    mush        = orxonox_cast<SOBMushroom*>    (otherObject);
     115        SOBGumba*       gumba       = orxonox_cast<SOBGumba*>       (otherObject);
     116        SOBGumbaBoss*   gumbaBoss   = orxonox_cast<SOBGumbaBoss*>   (otherObject);
     117        SOBFlagstone*   flagstone   = orxonox_cast<SOBFlagstone*>   (otherObject);
     118        SOBCastlestone* castlestone = orxonox_cast<SOBCastlestone*> (otherObject);
     119        SOBFireball*    fireball    = orxonox_cast<SOBFireball*>    (otherObject);
     120        SOB* SOBGame                = orxonox_cast<SOB*>            (getGametype());
     121
     122
     123        //Check if otherObject is a powerup-mushroom
    105124        if (mush != nullptr && !(mush->hasCollided_)) {
    106125            otherObject->destroyLater();
    107             gotPowerUp_ = true;
    108             SOB* SOBGame = orxonox_cast<SOB*>(getGametype()); //Get the Gametype
     126
     127            PowerUpCounter_++;
     128            if(PowerUpCounter_ > maxPowerUp_)   PowerUpCounter_ = maxPowerUp_; // you had already the max
     129            else                                this->changeClothes();
     130
    109131            SOBGame->addMushroom(); // Tell the gametype to increase points
    110132            mush->hasCollided_ = true; // needed because of destroyLater takes some time and player should receive points only once
     133           
     134           
     135        }
     136
     137       
    111138
    112139        //Check if otherObject is a Gumba (that walking enemies)
    113         } else if (gumba != nullptr && !(gumba->hasCollided_)) {
    114 
    115             //If player jumps on its head, kill it, else, kill the player
     140
     141         else if (gumba != nullptr && gumbaBoss == nullptr && !(gumba->hasCollided_)) {
     142
     143            //If player jumps on its head, kill the Gumba, else, kill the player
    116144            if (getVelocity().z >= -20) {
    117               Vector3 vel = getVelocity();
    118               vel.y = -80;
    119               vel.z = 200;
    120               setVelocity(vel);
    121               predead_=true;
    122               SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
    123               SOBGame->setDone(true);
     145                // If player hasn't a power up, he dies. Else he shrinks and the gumba dies.
     146                if(PowerUpCounter_ == 0){
     147                    this->die();
     148                }
     149                else{
     150                    PowerUpCounter_--;
     151                    this->changeClothes();
     152
     153                    gumba->destroyLater();
     154                    gumba->hasCollided_ = true;
     155                }
    124156
    125157          } else {
    126158            gumba->destroyLater();
    127159            gumba->hasCollided_ = true;
    128             SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
    129160            SOBGame->addGumba();
    130161
    131162
    132         }
    133     }
     163            }
     164        }
     165        else if (gumbaBoss != nullptr && !(gumbaBoss->hasCollided_)) {
     166            if (getVelocity().z >= -20) {
     167                // If player hasn't a power up, he dies. Else he dies directly.
     168                this->die();
     169            }
     170
     171            else {
     172                gumbaBoss->destroyLater();
     173                gumbaBoss->hasCollided_ = true;
     174                SOBGame->addGumbaBoss();
     175                }
     176        }
     177        else if (fireball != nullptr && !(fireball->hasCollided_)){
     178            if(PowerUpCounter_ == 0){
     179                    this->die();
     180                }
     181            PowerUpCounter_--;
     182            this->changeClothes();
     183            fireball->destroyLater();
     184        }
    134185
    135186    //Purpose is that if player hits the flag, he should walk into the castle at the end of the level. For that we use SOBCastlestone
     
    137188        flagstone->hasCollided_ = true;
    138189        reachedLvlEndState_ = 1;
    139         SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
     190
    140191        SOBGame->setDone(true);
    141192        SOBGame->addPoints(flagstone->getPoints());
     
    159210}
    160211
     212//Function to spawn the Fireball
     213void SOBFigure::spawnFireball() {
     214        SOBCenterpoint* center_ = ((SOB*)getGametype())->center_;
     215
     216         SOBFireball* ball = new SOBFireball(center_->getContext());
     217         Vector3 spawnpos = this->getWorldPosition();
     218         spawnpos.z += 0;
     219
     220        if (ball != nullptr && center_ != nullptr)
     221        {
     222            ball->addTemplate("fireball");
     223            bool direction = ((this->getWorldOrientation().getRoll().valueRadians())>-1.6&&(this->getWorldOrientation().getRoll().valueRadians()<1.6));
     224            ball->setDirection(direction);
     225            if(direction)
     226            {
     227                spawnpos.x+=10;
     228            }
     229            else
     230            {
     231                spawnpos.x-=10;
     232            }
     233            ball->setPosition(spawnpos);
     234
     235        }
     236     }
     237
    161238//For those of you who don't have an idea: the tick function is called about 50 times/sec
    162239void SOBFigure::tick(float dt)
     
    166243
    167244    bool inputAllowed = true;
     245    //SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
    168246
    169247    //the particle spawner that generates the fire from the backpack when pressed
     
    174252            particlespawner_ = object;
    175253        }
    176     }
     254
     255    }
     256   
    177257
    178258
     
    190270    //if input blocked, then cancel every movement operation
    191271    if (!inputAllowed) {
    192         moveUpPressed_ = false;
    193         moveDownPressed_ = false;
    194         moveLeftPressed_ = false;
    195         moveRightPressed_ = false;
     272        moveUpPressed_      = false;
     273        moveDownPressed_    = false;
     274        moveLeftPressed_    = false;
     275        moveRightPressed_   = false;
    196276    }
    197277
     
    204284    if (hasLocalController())
    205285    {
     286        SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
    206287        Vector3 velocity = getVelocity();
    207288        Vector3 position = getPosition();
     
    212293        if (position.z < -100) {
    213294            dead_ = true;
    214             SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
    215295            SOBGame->setDone(true);
    216296        }
     
    221301            velocity.z = 0;
    222302            setVelocity(velocity);
    223             SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
     303           
    224304            if (firePressed_)
    225305                SOBGame->restart();
     
    242322        else
    243323            particlespawner_->setVisible(false);
    244 
     324       
    245325
    246326        //If player hits space and collides against an object under him then jump
    247         if (inputAllowed && firePressed_ && isColliding_ && (collDisZ_ >= 7.75 && collDisZ_ <+ 8.25)) {
    248             gravityAcceleration_ = 100.0;
    249             velocity.z = 110;
     327        if (inputAllowed && firePressed_ && isColliding_ && (collDisZ_ >= 0 && collDisZ_ <+ 10)) {
     328            gravityAcceleration_ = 350;
     329            velocity.z = 175;
    250330        }
    251331
     
    274354        }
    275355
     356        //If moveUp pressed, fire a fireball
     357        if(moveUpPressed_ && (PowerUpCounter_ >= FireballPower) && fireallowed_)
     358        {
     359            spawnFireball();
     360            fireallowed_  = false;
     361            firecooldown_ = 0;
     362        }
     363
     364        //Increase the firecooldown
     365        if(firecooldown_> 0.5)
     366        {
     367            fireallowed_ = true;
     368        }
     369        if(!fireallowed_)
     370        {
     371            firecooldown_ += dt;
     372        }
    276373
    277374        //Again another EndOfLevel behavior
     
    283380            velocity.x = 0;
    284381            velocity.y = 20;
     382            setOrientation(Vector3::UNIT_Z, Degree(90));
    285383        }
    286384        if (reachedLvlEndState_ == 4) {
     385            //Highscore
     386            if (Highscore::exists())
     387            {
     388                int score = SOBGame->getPoints();
     389                bool isHighScore = Highscore::getInstance().storeScore("Super Orxo Bros.", score, this->getPlayer());
     390                SOBGame->newHighscore = isHighScore;
     391            }
    287392            lvlEnded_ = true;
    288393            dead_ = true;
     
    307412        }
    308413
    309 
    310 
    311 
    312     }
    313 
    314 
     414    }
    315415
    316416    // Reset key variables
    317     moveUpPressed_ = false;
    318     moveDownPressed_ = false;
    319     moveLeftPressed_ = false;
    320     moveRightPressed_ = false;
     417    moveUpPressed_      = false;
     418    moveDownPressed_    = false;
     419    moveLeftPressed_    = false;
     420    moveRightPressed_   = false;
    321421
    322422    isColliding_ = false;
     
    364464
    365465
    366 }
     466
     467// PRE: name is an existing name of a material. Example orxo_material for orxo_material.material in data_extern/materials
     468//      !!! PowerUpCounter_ has to be modified before changing the clothes!!!
     469// POST: clothes of body of player are changed to name
     470void SOBFigure::changeClothes(){
     471            // clothes: white (basic), red (one PowerUp), orange (Fireball enabled)
     472            std::string clothes[] = {"orxo_material", "orxo_material_gross", "orxo_material_fire"};
     473
     474            std::set<WorldEntity*> attachedObjects = this->getAttachedObjects();
     475            std::set<WorldEntity*>::iterator it;
     476            for (it = attachedObjects.begin(); it != attachedObjects.end(); ++it)
     477            {
     478                Model* FiguresModel = orxonox_cast<Model*>(*it);
     479                if (FiguresModel != nullptr)
     480                {
     481                    FiguresModel->setSubMaterial(clothes[PowerUpCounter_] , 4); // 4 is the body
     482                }
     483            }   
     484}
     485// PRE:
     486// POST: Player jumps out of the game, game is finished and can be restarted.
     487void SOBFigure::die(){
     488    Vector3 vel = getVelocity();
     489    vel.y = -80;
     490    vel.z = 200;
     491    setVelocity(vel);
     492    predead_= true;
     493    SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
     494    SOBGame->setDone(true);
     495}
     496
     497}
  • code/trunk/src/modules/superorxobros/SOBFigure.h

    • Property svn:eol-style set to native
    r11418 r11783  
    4646            virtual void boost(bool boost) override;
    4747            virtual  bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
     48            void changeClothes();
     49            void spawnFireball();
     50            void die();
    4851
    4952            bool dead_;
     
    5457
    5558            //Soooo many declarations
    56             bool gotPowerUp_;
     59            bool fireallowed_;
     60
    5761            bool moveUpPressed_;
    5862            bool moveDownPressed_;
     
    6367            float timeSinceLastFire_;
    6468            float lastSpeed_z;
    65             SOBCenterpoint* sobcenterpoint;
    66             float pitch_;
     69            float firecooldown_;
    6770            bool isColliding_;
    6871            WorldEntity* particlespawner_;
     72            int PowerUpCounter_;
     73            int maxPowerUp_;
     74            int FireballPower;
    6975            int sgn(float x);
    7076            int reachedLvlEndState_;
  • code/trunk/src/modules/superorxobros/SOBFlagstone.cc

    • Property svn:eol-style set to native
    r11416 r11783  
    5252       
    5353        hasCollided_=false;
    54        
     54        points_=0;
    5555       
    5656    }
  • code/trunk/src/modules/superorxobros/SOBFlagstone.h

    • Property svn:eol-style set to native
    r11416 r11783  
    2929/**
    3030    @file SOBFlagstone.h
    31     @brief Declaration of the SOBFlagstone class. This class is used for the flag - for everz 10x10x10 stone we added a flagstone with different points. The higher you touch the flag, the more points you get.
     31    @brief Declaration of the SOBFlagstone class.
     32            This class is used for the flag - for every 10x10x10 stone we added a flagstone with different points. The higher you touch the flag, the more points you get.
    3233    @ingroup SOB
    3334*/
  • code/trunk/src/modules/superorxobros/SOBGumba.cc

    • Property svn:eol-style set to native
    r11416 r11783  
    4848        RegisterObject(SOBGumba);
    4949
    50         attachedToFigure_ = false;
    5150        setAngularFactor(0.0);
    52         figure_ = nullptr;
    5351        this->enableCollisionCallback();
    5452        gravityAcceleration_ = 350.0;
     
    5654        hasCollided_=false;
    5755        goesRight_ = true;
    58         lastPos_ = getPosition();
    59         lastPos_.x -= 20;
    6056        changeAllowed_ = true;
    6157        changedOn_ = 0.0;
     58        creator_ = nullptr;
     59        maxLifetime_ = 10;
     60        lifetime_ = 0;
    6261       
    6362    }
     
    8685
    8786
    88     void SOBGumba::setFigure(SOBFigure* newFigure)
     87    void SOBGumba::setDirection(const bool direction)
    8988    {
    90         figure_ = newFigure;
     89        if(direction)
     90        {
     91            goesRight_=true;
     92        }
     93        else
     94        {
     95            goesRight_=false;
     96        }
    9197    }
    9298
    93 
     99    void SOBGumba::die(){
     100        Vector3 velocity = this->getVelocity();
     101        velocity.y = speed_;
     102        this->setVelocity(velocity);
     103    }
    94104
    95105    void SOBGumba::tick(float dt)
     
    100110            changedOn_+= dt;
    101111            // After a collision, we don't listen for collisions for 200ms - that's because one wall can cause several collisions!
    102             if (changedOn_> 0.200) {
     112            if (changedOn_> 0.400) {
    103113                changeAllowed_ = true;
    104114                changedOn_ = 0.0;
     
    106116            }
    107117        }
    108        
     118   
    109119
    110120        int dir = 1;
     
    113123
    114124        Vector3 velocity = getVelocity();
     125        if(velocity.z > -1 && velocity.z < 1)
     126        {
     127            velocity.x = dir*speed_;
     128        }     
     129
    115130        velocity.z -= gravityAcceleration_*dt;
    116         velocity.x = dir*speed_;
    117131        setVelocity(velocity);
    118132
    119         lastPos_ = getPosition();
     133        if (creator_ != nullptr)
     134        {
     135            lifetime_ += dt;
     136            if(lifetime_>maxLifetime_)
     137            {
     138               
     139            }
     140        }
     141
     142        if(abs(this->getPosition().z) > 1000) this->destroyLater();
     143
    120144    }
    121 
    122 
    123145}
  • code/trunk/src/modules/superorxobros/SOBGumba.h

    • Property svn:eol-style set to native
    r11416 r11783  
    4747            SOBGumba(Context* context);
    4848            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    49             virtual void setFigure(SOBFigure* newFigure);
    5049            virtual  bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
    5150            virtual void tick(float dt) override;
    5251
     52            void setDirection(const bool direction);
     53            void die();
    5354         
    54             bool attachedToFigure_;
    55 
    5655            void setSpeed(const float speed)
    5756                { this->speed_ = speed; }
     
    6059
    6160            bool hasCollided_;
     61            SOBGumbaBoss* creator_;
    6262        protected:
    6363            float gravityAcceleration_;
    6464            float speed_;
    65             WeakPtr<SOBFigure> figure_;
    6665            bool goesRight_;
    67             Vector3 lastPos_;
    6866            bool changeAllowed_;
    6967            float changedOn_;
     68            float maxLifetime_;
     69            float lifetime_;
     70
    7071           
    7172    };
  • code/trunk/src/modules/superorxobros/SOBHUDInfo.cc

    • Property svn:eol-style set to native
  • code/trunk/src/modules/superorxobros/SOBHUDInfo.h

    • Property svn:eol-style set to native
  • code/trunk/src/modules/superorxobros/SOBItem.cc

    • Property svn:eol-style set to native
  • code/trunk/src/modules/superorxobros/SOBItem.h

    • Property svn:eol-style set to native
  • code/trunk/src/modules/superorxobros/SOBMushroom.cc

    • Property svn:eol-style set to native
    r11416 r11783  
    4848        RegisterObject(SOBMushroom);
    4949
    50         attachedToFigure_ = false;
    5150        setAngularFactor(0.0);
    52         figure_ = nullptr;
    5351        this->enableCollisionCallback();
    5452        gravityAcceleration_ = 350.0;
     
    5654        hasCollided_=false;
    5755        goesRight_ = true;
    58         lastPos_ = getPosition();
    59         lastPos_.x -= 20;
    6056        changeAllowed_ = true;
    6157        changedOn_ = 0.0;
     
    8682
    8783
    88     void SOBMushroom::setFigure(SOBFigure* newFigure)
    89     {
    90         figure_ = newFigure;
    91     }
    92 
    93 
    94 
    9584    void SOBMushroom::tick(float dt)
    9685    {
     
    10493                changedOn_ = 0.0;
    10594
     95            }
    10696        }
    107     }
    10897       
    10998
     
    116105        velocity.x = dir*speed_;
    117106        setVelocity(velocity);
    118 
    119 
    120    
    121         lastPos_ = getPosition();
    122             }
     107    }
    123108
    124109
  • code/trunk/src/modules/superorxobros/SOBMushroom.h

    • Property svn:eol-style set to native
    r11416 r11783  
    4747            SOBMushroom(Context* context);
    4848            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    49             virtual void setFigure(SOBFigure* newFigure);
    5049            virtual  bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
    5150            virtual void tick(float dt) override;
    5251
    5352         
    54             bool attachedToFigure_;
    55 
    5653            void setSpeed(const float speed)
    5754                { this->speed_ = speed; }
     
    6360            float gravityAcceleration_;
    6461            float speed_;
    65             WeakPtr<SOBFigure> figure_;
    6662            bool goesRight_;
    67             Vector3 lastPos_;
    6863            bool changeAllowed_;
    6964            float changedOn_;
  • code/trunk/src/modules/superorxobros/SOBPrereqs.h

    • Property svn:eol-style set to native
    r11699 r11783  
    7676    class SOBHUDInfo;
    7777    class SOBGumba;
     78    class SOBGumbaBoss;
    7879    class SOBFlagstone;
    7980    class SOBCastlestone;
  • code/trunk/src/modules/superorxobros/SOBQBlock.cc

    • Property svn:eol-style set to native
    r11416 r11783  
    3939#include "SOBMushroom.h"
    4040#include "SOBCoin.h"
     41#include <BulletCollision/NarrowPhaseCollision/btManifoldPoint.h>
     42
    4143
    4244namespace orxonox
     
    6264        //If you hit the QBlock, the visibility of all attached objects get inverted! Pretty easy way to create changing blocks :)
    6365        float v_z = otherObject->getVelocity().z;
    64         if (!used_ && v_z > 50.0) {
     66        float collDisZ_ = getPosition().z - contactPoint.getPositionWorldOnB().getZ();
     67        if (!used_ && v_z > 50.0 && collDisZ_ > 0) {
    6568            used_ = true;
    6669
  • code/trunk/src/modules/superorxobros/SOBQBlock.h

    • Property svn:eol-style set to native
  • code/trunk/src/modules/weapons/munitions/FlameMunition.cc

    • Property svn:eol-style set to native
  • code/trunk/src/modules/weapons/munitions/FlameMunition.h

    • Property svn:eol-style set to native
  • code/trunk/src/modules/weapons/projectiles/FlameGunProjectile.cc

    • Property svn:eol-style set to native
  • code/trunk/src/modules/weapons/projectiles/FlameGunProjectile.h

    • Property svn:eol-style set to native
  • code/trunk/src/modules/weapons/weaponmodes/FlameGun.cc

    • Property svn:eol-style set to native
  • code/trunk/src/modules/weapons/weaponmodes/FlameGun.h

    • Property svn:eol-style set to native
  • code/trunk/src/orxonox/Highscore.cc

    • Property svn:eol-style set to native
    r11717 r11783  
    8282    /**
    8383     * @brief stores a new highscore in the orxonox.ini file if the new score is better than the highest score so far.
     84     * @returns true if the given score marks a new high score
    8485     */
    85     void Highscore::storeScore(const std::string& level, int points, PlayerInfo* player)
     86    bool Highscore::storeScore(const std::string& level, int points, PlayerInfo* player)
    8687    {
    8788        if (points > this->getHighestScoreOfGame(level))
    8889        {
    8990            ModifyConfigValue(highscores_, add, player->getName() + "./." + level + "./." + multi_cast<std::string>(points));
     91            return true;
    9092        }
     93        else
     94            return false;
    9195    }
    9296}
  • code/trunk/src/orxonox/Highscore.h

    • Property svn:eol-style set to native
    r11717 r11783  
    4949            void setConfigValues(); // Inherited function
    5050
    51             void storeScore(const std::string& level, int points, PlayerInfo* player);
     51            bool storeScore(const std::string& level, int points, PlayerInfo* player);
    5252            int getHighestScoreOfGame(const std::string& game);
    5353
  • code/trunk/src/orxonox/OrxonoxPrereqs.h

    r11080 r11783  
    152152    // overlays
    153153    class InGameConsole;
    154     class Map;
    155154    class OrxonoxOverlay;
    156155    class OverlayGroup;
  • code/trunk/src/orxonox/controllers/CMakeLists.txt

    r11052 r11783  
    1919  FightingController.cc
    2020  MasterController.cc
     21  ArrowController.cc
    2122)
  • code/trunk/src/orxonox/controllers/DroneController.cc

    r11071 r11783  
    4949        RegisterObject(DroneController);
    5050
     51        this->setTeam(0);
    5152        this->owner_ = nullptr;
    5253        this->drone_ = nullptr;
     
    164165            }
    165166        }
     167       
    166168        SUPER(AIController, tick, dt);
    167169    }
  • code/trunk/src/orxonox/controllers/HumanController.h

    r11720 r11783  
    9090                { return HumanController::localController_s; }
    9191            static Pawn* getLocalControllerEntityAsPawn();
    92             //friend class, for mouselook
    93             friend class Map;
    9492
    9593        protected:
  • code/trunk/src/orxonox/gametypes/StoryMode.cc

    • Property svn:eol-style set to native
  • code/trunk/src/orxonox/gametypes/StoryMode.h

    • Property svn:eol-style set to native
  • code/trunk/src/orxonox/graphics/Model.cc

    r11080 r11783  
    155155        this->mesh_.setMaterial(this->materialName_);
    156156    }
     157
     158    // PRE: a valid  Ogre::Entity* entity with a valid subentity at index
     159    // POST: changed material of subentity at index to name
     160    void Model::setSubMaterial(const std::string& name, const int index){
     161        this->mesh_.setSubMaterial(name, index);
     162    }
     163
    157164
    158165    void Model::changedShadows()
  • code/trunk/src/orxonox/graphics/Model.h

    r11080 r11783  
    8686                { return this->materialName_; }
    8787
     88            void setSubMaterial(const std::string& name, const int index);
     89
    8890        protected:
    8991            /**
  • code/trunk/src/orxonox/interfaces/RadarViewable.h

    r11071 r11783  
    151151            return this->uniqueId_;
    152152        }
    153         //friend class Map;
    154153
    155154    private:
  • code/trunk/src/orxonox/worldentities/CMakeLists.txt

    r11052 r11783  
    1313  ExplosionPart.cc
    1414  Actionpoint.cc
     15  NameableStaticEntity.cc
     16  Arrow.cc
    1517)
    1618
  • code/trunk/src/orxonox/worldentities/pawns/CMakeLists.txt

    r10216 r11783  
    77  TeamBaseMatchBase.cc
    88  Destroyer.cc
     9  StoryModePawn.cc
     10  ShootableObstacle.cc
    911)
  • code/trunk/src/orxonox/worldentities/pawns/Pawn.cc

    r11176 r11783  
    8484        // set damage multiplier to default value 1, meaning nominal damage
    8585        this->damageMultiplier_ = 1;
     86        this->acceptsPickups_ = true;
    8687
    8788        this->spawnparticleduration_ = 3.0f;
  • code/trunk/src/orxonox/worldentities/pawns/Pawn.h

    r11176 r11783  
    199199                { return this->damageMultiplier_; }
    200200
     201            // Some pawns can-t harvest pickups (e.g. AsteroidMinables). Checked in PickupSpawner.
     202            inline void setPickupAcceptance(bool b)
     203                { this->acceptsPickups_ = b; }
     204            inline bool doesAcceptPickups()
     205                { return this->acceptsPickups_;}
    201206
    202207            virtual void startLocalHumanControl() override;
     
    218223                { return this->weaponSystem_; }
    219224
    220             static void consoleCommand_debugDrawWeapons(bool bDraw);
     225            static void consoleCommand_debugDrawWeapons(bool bDraw);
     226
     227
    221228
    222229        protected:
     
    256263
    257264            float damageMultiplier_; ///< Used by the Damage Boost Pickup.
     265            bool acceptsPickups_; // Added for the asteroidMinable class, avoid that they attempt to grab the resources
    258266
    259267            WeakPtr<Pawn> lastHitOriginator_;
Note: See TracChangeset for help on using the changeset viewer.