Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 12396 for code


Ignore:
Timestamp:
May 17, 2019, 1:32:44 PM (5 years ago)
Author:
pomselj
Message:

Jesus safed our souls and stopped the crashing. Hallowed be his name and hallowed be his followers sevy and aryo, first of their names, saviors of the andals the raynars and the first nerds. Fourier is love btw

Location:
code/branches/OrxoBlox_FS19/src/modules
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc

    r12395 r12396  
    1 /*
    2  *   ORXONOX - the hottest 3D action shooter ever to exist
    3  *                    > www.orxonox.net <
    4  *
    5  *
    6  *   License notice:
    7  *
    8  *   This program is free software; you can redistribute it and/or
    9  *   modify it under the terms of the GNU General Public License
    10  *   as published by the Free Software Foundation; either version 2
    11  *   of the License, or (at your option) any later version.
    12  *
    13  *   This program is distributed in the hope that it will be useful,
    14  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  *   GNU General Public License for more details.
    17  *
    18  *   You should have received a copy of the GNU General Public License
    19  *   along with this program; if not, write to the Free Software
    20  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    21  *
    22  *   Author:
    23  *      Fabian 'x3n' Landau
    24  *   Co-authors:
    25  *      ...
    26  *
    27  */
    28 
    29 /**
    30     @file OrxoBlox.cc
    31     @brief Implementation of the OrxoBlox class.
    32 */
    33 
    341#include "OrxoBlox.h"
    352#include "Highscore.h"
     
    10067    void OrxoBlox::cleanup()
    10168    {   
    102         //if (this->ball_ != nullptr) // Destroy the ball, if present.
    103         //{
    104         //    this->ball_->destroy();
    105         //    this->ball_ = nullptr;
    106         //}
    107 
    108         /*if (this->futureWall_ != nullptr)
    109             {
    110             this->futureWall_->destroy();
    111             this->futureWall_ = nullptr;
    112             }
    113         */
    114 
     69
     70        std::vector<OrxoBloxWall*> vyserion_targets;
     71        std::vector<OrxoBloxStones*> casterly_rocks;
     72
     73        for (OrxoBloxWall* wall : ObjectList<OrxoBloxWall>()) {
     74            if(wall != nullptr) {
     75                vyserion_targets.push_back(wall);
     76            }
     77        }
    11578        for (OrxoBloxStones* stone : ObjectList<OrxoBloxStones>()) {
    116             if(stone != nullptr)
    117             stone->destroy();
    118         }
    119 
    120 
    121         for (OrxoBloxWall* wall : this->activeWalls_) {
    122             if (wall != nullptr)
    123                 wall->destroy();
    124         }
    125         this->activeWalls_.clear();
    126 
    127         this->stones_.clear();
    128         if(this->playership != nullptr) {
    129             this->playership->destroy();
    130         }
    131         if(this->center_ != nullptr) {
    132             this->center_->destroy();
    133         }
    134        
     79            if(stone != nullptr) {
     80                casterly_rocks.push_back(stone);
     81            }
     82        }
     83        for(unsigned int i = 0; i < vyserion_targets.size(); i++) {
     84            vyserion_targets.at(i)->destroy();
     85        }
     86        for(unsigned int i = 0; i < casterly_rocks.size(); i++) {
     87            casterly_rocks.at(i)->destroy();
     88        }
    13589
    13690    }
     
    146100        if (this->center_ != nullptr) // There needs to be a OrxoBloxCenterpoint, i.e. the area the game takes place.
    147101        {
    148 
    149102            level_= 1;
    150 
    151103        }
    152104        else // If no centerpoint was specified, an error is thrown and the level is exited.
     
    156108            return;
    157109        }
    158 
    159         // Start the timer. After it has expired the ball is started.
    160110        this->starttimer_.startTimer();
    161111
    162         // Set variable to temporarily force the player to spawn.
    163         // Set variable to temporarily force the player to spawn.
    164         //bool temp = this->bForceSpawn_;
    165112        this->bForceSpawn_ = false;
    166 
    167         // Call start for the parent class.
    168113        Deathmatch::start();
    169 
    170         // Reset the variable.
    171         //this->bForceSpawn_ = temp;
    172 
    173114    }
    174115
     
    199140    }
    200141   
    201     // void OrxoBlox::spawnPlayer(PlayerInfo* player)
    202     // {
    203     //     assert(player);
    204 
    205     //     if(this->player_ == nullptr)
    206     //     {
    207     //         this->player_ = player;
    208     //         this->players_[player].state_ = PlayerState::Alive;
    209     //     }
    210 
    211     // }
    212142
    213143    void OrxoBlox::LevelUp(){
     
    219149
    220150        this->createWall();
    221         this->activeWalls_.push_back(this->futureWall_);
    222         for (int i = 0; i < this->futureWall_->getNumberOfStones(); i++) {
    223             this->stones_.push_back(this->futureWall_->getStone(i));
    224         }
    225 
    226         for(OrxoBloxWall* wall : this->activeWalls_) {
    227             if(wall == nullptr) {
    228                 continue;
    229             }
    230             if(wall->isEmpty()) {
    231                 wall->destroy();
    232             }
    233             int NumberOfStones = 0;
    234             for(int i = 0; i < 10; i++) {
    235                 if(wall->getStone(i) == nullptr) {
    236                     continue;
    237                 }
    238                 else {
    239                     NumberOfStones++;
    240                 }
    241 
    242             }
    243         }
    244         //new location of ship
    245         //new amount of balls
    246         //create balls
    247         //insert new wall
     151
    248152        for(OrxoBloxStones* stone : ObjectList<OrxoBloxStones>()){
    249153            if (stone->isA(Class(OrxoBloxStones))) {
     
    257161                    orxout() << "calling end() function" << endl;
    258162                    this->end();
     163                    return;
    259164                }
    260165            }
    261166            else {
    262                 stone = nullptr;
    263             }
    264         }
    265 
    266        
     167                orxout() << "WTF IS THIS SHIT?!?!?!" << endl;
     168            }
     169        }
    267170    }
    268171
     
    280183
    281184
    282     /**
    283     @brief
    284         Starts the ball with some default speed.
    285     */
    286     //void OrxoBlox::startBall()
    287     //{
    288     //    if (this->ball_ != nullptr && this->center_ != nullptr)
    289     //        this->ball_->setSpeed(this->center_->getBallSpeed());
    290     //}
    291      
    292     /*OrxoBloxStones* OrxoBlox::CheckForCollision(OrxoBloxBall* Ball) {
    293         //orxout() << "Checking for Collision" << endl;
    294         Vector3 BallPosition = Ball->getPosition();
    295         for(OrxoBloxStones* someStone : this->stones_)
    296         {
    297             if(someStone == nullptr)
    298             {
    299                 continue;
    300             }
    301             //orxout() << "Checking a stone" << endl;
    302             const Vector3& StonePosition = someStone->getPosition(); //!< Saves the position of the currentStone
    303             int size = someStone->getSize()/2;
    304             if((BallPosition.x - Ball->getRadius() >= StonePosition.x - size && BallPosition.x + Ball->getRadius() <= StonePosition.x + size) &&
    305                 (BallPosition.z - Ball->getRadius() >= StonePosition.z - size && BallPosition.z + Ball->getRadius() <= StonePosition.z + size)) {
    306                 //orxout() << "FOUND ONE" << endl;
    307                 return someStone;
    308             }
    309         }
    310         orxout() << "Found nothing...." << endl;
    311         return nullptr;
    312     }
    313     */
    314 
    315185    void OrxoBlox::playerPreSpawn(PlayerInfo* player)
    316186    {
     
    322192        SUPER(OrxoBlox, tick, dt);
    323193    }
    324 /*
    325     bool OrxoBlox::Intersect(int XpositionBall, int XPositionBlock, int YPositionBall, int YPositionBlock, int radiusBall, int sizeBlock) {
    326         distanceX = XpositionBall - XPositionBlock;
    327         distanceY = YPositionBall - YPositionBlock;
    328         if (distanceX < 0) {
    329             distanceX = -distanceX;
    330         }
    331         if (distanceY < 0) {
    332             distanceY = -distanceY;
    333         }
    334         if((distanceX <= radiusBall + sizeBlock) || (distanceY <= radiusBall + sizeBlock)) {
    335             return true;
    336         }
    337         else {
    338             top = YPositionBall + radiusBall;
    339             right = XpositionBall + radiusBall;
    340             bottom = YPositionBall - radiusBall;
    341             left = XpositionBall - radiusBall;
    342 
    343             if((top >= YPositionBlock - size) && (top <= YPositionBlock + size) && (left <= XPositionBlock + size) && (left >= XPositionBlock - size))
    344         }
    345     }
    346   */ 
     194 
    347195    void OrxoBlox::count() {
    348196        if(++(this->counter) >= this->max_counter) {
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.h

    r12395 r12396  
    1 /*
    2  *   ORXONOX - the hottest 3D action shooter ever to exist
    3  *                    > www.orxonox.net <
    4  *
    5  *
    6  *   License notice:
    7  *
    8  *   This program is free software; you can redistribute it and/or
    9  *   modify it under the terms of the GNU General Public License
    10  *   as published by the Free Software Foundation; either version 2
    11  *   of the License, or (at your option) any later version.
    12  *
    13  *   This program is distributed in the hope that it will be useful,
    14  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  *   GNU General Public License for more details.
    17  *
    18  *   You should have received a copy of the GNU General Public License
    19  *   along with this program; if not, write to the Free Software
    20  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    21  *
    22  *   Author:
    23  *      Fabian 'x3n' Landau
    24  *   Co-authors:
    25  *      ...
    26  *
    27  */
    28 
    29 /**
    30     @file OrxoBlox.h
    31     @brief Declaration of the OrxoBlox class.
    32     @ingroup OrxoBlox
    33 */
    34 
    351#ifndef _OrxoBlox_H__
    362#define _OrxoBlox_H__
     
    7440
    7541            PlayerInfo* getPlayer();
    76             // void spawnPlayer(PlayerInfo* Player) override;
    7742            virtual void playerPreSpawn(PlayerInfo* player) override;
    7843            virtual void tick(float dt) override;
     
    8954            OrxoBloxCenterpoint* getCenterpoint(void)
    9055                { return this->center_; }
    91             //OrxoBloxStones* CheckForCollision(OrxoBloxBall* Ball);
    9256            virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command
    9357            void count();
     
    9660            void startWall(void);
    9761            void createWall(void);
    98             //void startBall(); //!< Starts the ball with some default speed.
    9962            void cleanup(); //!< Cleans up the Gametype by destroying the ball and the bats.
    10063
    10164            WeakPtr<OrxoBloxCenterpoint> center_; //!< The playing field.
    102             //WeakPtr<OrxoBloxBall> ball_; //!< The OrxoBlox ball.
    10365            unsigned int level_;
    10466
     
    10870           
    10971            WeakPtr<OrxoBloxWall> futureWall_;
    110             std::vector<OrxoBloxWall*> activeWalls_;
    111             std::vector<OrxoBloxStones*> stones_; //!< A list of all stones in play.
    11272            int counter;
    11373            const int max_counter = 4;
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxBall.cc

    r12379 r12396  
    1 /*
    2  *   ORXONOX - the hottest 3D action shooter ever to exist
    3  *                    > www.orxonox.net <
    4  *
    5  *
    6  *   License notice:
    7  *
    8  *   This program is free software; you can redistribute it and/or
    9  *   modify it under the terms of the GNU General Public License
    10  *   as published by the Free Software Foundation; either version 2
    11  *   of the License, or (at your option) any later version.
    12  *
    13  *   This program is distributed in the hope that it will be useful,
    14  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  *   GNU General Public License for more details.
    17  *
    18  *   You should have received a copy of the GNU General Public License
    19  *   along with this program; if not, write to the Free Software
    20  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    21  *
    22  *   Author:
    23  *      Fabian 'x3n' Landau
    24  *   Co-authors:
    25  *      ...
    26  *
    27  */
    28 
    29 /**
    30     @file OrxoBloxBall.cc
    31     @brief Implementation of the OrxoBloxBall class.
    32 */
    33 
    341#include "OrxoBloxBall.h"
    352#include "OrxoBloxStones.h"
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxBall.h

    r12368 r12396  
    1 /*
    2  *   ORXONOX - the hottest 3D action shooter ever to exist
    3  *                    > www.orxonox.net <
    4  *
    5  *
    6  *   License notice:
    7  *
    8  *   This program is free software; you can redistribute it and/or
    9  *   modify it under the terms of the GNU General Public License
    10  *   as published by the Free Software Foundation; either version 2
    11  *   of the License, or (at your option) any later version.
    12  *
    13  *   This program is distributed in the hope that it will be useful,
    14  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  *   GNU General Public License for more details.
    17  *
    18  *   You should have received a copy of the GNU General Public License
    19  *   along with this program; if not, write to the Free Software
    20  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    21  *
    22  *   Author:
    23  *      Fabian 'x3n' Landau
    24  *   Co-authors:
    25  *      ...
    26  *
    27  */
    28 
    29 /**
    30     @file OrxoBloxBall.h
    31     @brief Declaration of the OrxoBloxBall class.
    32     @ingroup OrxoBlox
    33 */
    34 
    351#ifndef _OrxoBloxBall_H__
    362#define _OrxoBloxBall_H__
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxBot.cc

    r12268 r12396  
    1 /*
    2  *   ORXONOX - the hottest 3D action shooter ever to exist
    3  *                    > www.orxonox.net <
    4  *
    5  *
    6  *   License notice:
    7  *
    8  *   This program is free software; you can redistribute it and/or
    9  *   modify it under the terms of the GNU General Public License
    10  *   as published by the Free Software Foundation; either version 2
    11  *   of the License, or (at your option) any later version.
    12  *
    13  *   This program is distributed in the hope that it will be useful,
    14  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  *   GNU General Public License for more details.
    17  *
    18  *   You should have received a copy of the GNU General Public License
    19  *   along with this program; if not, write to the Free Software
    20  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    21  *
    22  *   Author:
    23  *      Fabian 'x3n' Landau
    24  *   Co-authors:
    25  *      ...
    26  *
    27  */
    28 
    29 /**
    30     @file OrxoBloxBot.cc
    31     @brief Implementation of the OrxoBloxBot class.
    32 */
    33 
    341#include "OrxoBloxBot.h"
    352
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxBot.h

    r12266 r12396  
    1 /*
    2  *   ORXONOX - the hottest 3D action shooter ever to exist
    3  *                    > www.orxonox.net <
    4  *
    5  *
    6  *   License notice:
    7  *
    8  *   This program is free software; you can redistribute it and/or
    9  *   modify it under the terms of the GNU General Public License
    10  *   as published by the Free Software Foundation; either version 2
    11  *   of the License, or (at your option) any later version.
    12  *
    13  *   This program is distributed in the hope that it will be useful,
    14  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  *   GNU General Public License for more details.
    17  *
    18  *   You should have received a copy of the GNU General Public License
    19  *   along with this program; if not, write to the Free Software
    20  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    21  *
    22  *   Author:
    23  *      Fabian 'x3n' Landau
    24  *   Co-authors:
    25  *      ...
    26  *
    27  */
    28 
    29 /**
    30     @file OrxoBloxBot.h
    31     @brief Declaration of the OrxoBloxBot class.
    32     @ingroup OrxoBlox
    33 */
    34 
    351#ifndef _OrxoBloxBot_H__
    362#define _OrxoBloxBot_H__
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxCanon.cc

    r12295 r12396  
    1 /*
    2  *   ORXONOX - the hottest 3D action shooter ever to exist
    3  *                    > www.orxonox.net <
    4  *
    5  *
    6  *   License notice:
    7  *
    8  *   This program is free software; you can redistribute it and/or
    9  *   modify it under the terms of the GNU General Public License
    10  *   as published by the Free Software Foundation; either version 2
    11  *   of the License, or (at your option) any later version.
    12  *
    13  *   This program is distributed in the hope that it will be useful,
    14  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  *   GNU General Public License for more details.
    17  *
    18  *   You should have received a copy of the GNU General Public License
    19  *   along with this program; if not, write to the Free Software
    20  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    21  *
    22  *   Author:
    23  *      Viviane Yang
    24  *   Co-authors:
    25  *      --
    26  *
    27  */
    28 
    29 /**
    30     @file OrxoBloxCanon.h
    31     @brief Implementation of the OrxoBloxCanon class.
    32 */
    33 
    341#include "OrxoBloxCanon.h"
    352
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxCanon.h

    r12295 r12396  
    1 /*
    2  *   ORXONOX - the hottest 3D action shooter ever to exist
    3  *                    > www.orxonox.net <
    4  *
    5  *
    6  *   License notice:
    7  *
    8  *   This program is free software; you can redistribute it and/or
    9  *   modify it under the terms of the GNU General Public License
    10  *   as published by the Free Software Foundation; either version 2
    11  *   of the License, or (at your option) any later version.
    12  *
    13  *   This program is distributed in the hope that it will be useful,
    14  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  *   GNU General Public License for more details.
    17  *
    18  *   You should have received a copy of the GNU General Public License
    19  *   along with this program; if not, write to the Free Software
    20  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    21  *
    22  *   Author:
    23  *      Viviane Yang
    24  *   Co-authors:
    25  *      ...
    26  *
    27  */
    28 
    29 /**
    30     @file OrxoBloxCanon.h
    31     @brief Definition of the OrxoBloxCanon class.
    32 */
    33 
    341#ifndef _OrxoBloxCanon_H__
    352#define _OrxoBloxCanon_H__
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxCenterpoint.cc

    r12366 r12396  
    1 /**
    2     Centerpoint: Konstruktion Spielfeld. Wird in orxoblox.oxw definiert.
    3 */
    4 
    5 
    6 /*
    7  *   ORXONOX - the hottest 3D action shooter ever to exist
    8  *                    > www.orxonox.net <
    9  *
    10  *
    11  *   License notice:
    12  *
    13  *   This program is free software; you can redistribute it and/or
    14  *   modify it under the terms of the GNU General Public License
    15  *   as published by the Free Software Foundation; either version 2
    16  *   of the License, or (at your option) any later version.
    17  *
    18  *   This program is distributed in the hope that it will be useful,
    19  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    20  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    21  *   GNU General Public License for more details.
    22  *
    23  *   You should have received a copy of the GNU General Public License
    24  *   along with this program; if not, write to the Free Software
    25  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    26  *
    27  *   Author:
    28  *      Fabian 'x3n' Landau
    29  *   Co-authors:
    30  *      ...
    31  *
    32  */
    33 
    34 /**
    35     @file OrxoBloxCenterpoint.cc
    36     @brief Implementation of the OrxoBloxCenterpoint class.
    37 */
    38 
    391#include "OrxoBloxCenterpoint.h"
    402
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxCenterpoint.h

    r12366 r12396  
    1 /*
    2  *   ORXONOX - the hottest 3D action shooter ever to exist
    3  *                    > www.orxonox.net <
    4  *
    5  *
    6  *   License notice:
    7  *
    8  *   This program is free software; you can redistribute it and/or
    9  *   modify it under the terms of the GNU General Public License
    10  *   as published by the Free Software Foundation; either version 2
    11  *   of the License, or (at your option) any later version.
    12  *
    13  *   This program is distributed in the hope that it will be useful,
    14  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  *   GNU General Public License for more details.
    17  *
    18  *   You should have received a copy of the GNU General Public License
    19  *   along with this program; if not, write to the Free Software
    20  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    21  *
    22  *   Author:
    23  *      Fabian 'x3n' Landau
    24  *   Co-authors:
    25  *      ...
    26  *
    27  */
    28 
    29 /**
    30     @file OrxoBloxCenterpoint.h
    31     @brief Declaration of the OrxoBloxCenterpoint class.
    32     @ingroup OrxoBlox
    33 */
    34 
    351#ifndef _OrxoBloxCenterpoint_H__
    362#define _OrxoBloxCenterpoint_H__
     
    4612namespace orxonox
    4713{
    48    
    49     /**
    50     @brief
    51         The OrxoBloxCenterpoint implements the playing field @ref orxonox::OrxoBlox "OrxoBlox" takes place in and allows for many parameters of the minigame to be set.
    52         The playing field resides in the x,z-plane, with the x-axis being the horizontal axis and the z-axis being the vertical axis.
    53        
    54         Various parameters can be set:
    55         - The <b>dimension</b> is a vector, that defines the width and height of the playing field. The default is <em>(200, 120)</em>.
    56         - The <b>balltemplate</b> is a template that is applied to the @ref orxonox::OrxoBloxBall "OrxoBloxBall", it can be used to attach different things to it, e.g. its @ref orxonox::Model "Model". See below for a usage example.
    57         - The <b>battemplate</b> is a template that is applied to the @ref orxonox::OrxoBloxBall "OrxoBloxBat", it can be used to attach different things to it, e.g. its @ref orxonox::Model "Model". See below for a usage example.
    58         - The <b>ballspeed</b> is the speed with which the @ref orxonox::OrxoBloxBall "OrxoBloxBall" moves. The default is <em>100</em>.
    59         - The <b>ballaccfactor</b> is the acceleration factor for the @ref orxonox::OrxoBloxBall "OrxoBloxBall". The default is <em>1.0</em>.
    60         - The <b>batspeed</b> is the speed with which the @ref orxonox::OrxoBloxBat "OrxoBloxBats" move. The default is <em>60</em>.
    61         - The <b>batlength</b> is the length of the @ref orxonox::OrxoBloxBat "OrxoBloxBats" as the percentage of the height of the playing field. The default is <em>0.25</em>.
    62        
    63         An example in XML of the OrxoBloxCenterpoint would be:
    64        
    65         First the needed templates:
    66         The template for the @ref orxonox::OrxoBloxBall "OrxoBloxBall".
    67         @code
    68         <Template name="OrxoBloxball">
    69           <OrxoBloxBall>
    70             <attached>
    71               <Model mesh="sphere.mesh" scale="2" />
    72               <ParticleSpawner name="hiteffect" position="0,0,0" source="Orxonox/sparks2" lifetime="0.01" autostart="0" mainstate="spawn" />
    73             </attached>
    74             <eventlisteners>
    75               <EventTarget target="hiteffect" />
    76             </eventlisteners>
    77           </OrxoBloxBall>
    78         </Template>
    79         @endcode
    80         As can be seen, a sphere is attached as the @ref orxonox::Model "Model" for the @ref orxonox::OrxoBloxBall "OrxoBloxBall", and also an @ref orxonox::EventListener "EventListener" that triggers a @ref orxonox::ParticleSpawner "ParticleSpawner", whenever the ball hits the boundaries is attached.
    81        
    82         Additionally the template for the @ref orxonox::OrxoBloxBat "OrxoBloxBat".
    83         @code
    84         <Template name="OrxoBloxbatcameras" defaults="0">
    85           <OrxoBloxBat>
    86             <camerapositions>
    87               <CameraPosition position="0,200,0" pitch="-90" absolute="true" />
    88             </camerapositions>
    89           </OrxoBloxBat>
    90         </Template>
    9114
    92         <Template name="OrxoBloxbat">
    93           <OrxoBloxBat camerapositiontemplate=OrxoBloxbatcameras>
    94             <attached>
    95               <Model position="0,0,3" mesh="cube.mesh" scale3D="14,2,2" />
    96             </attached>
    97           </OrxoBloxBat>
    98         </Template>
    99         @endcode
    100         As can be seen, there are actually two templates. The first template is needed to set the camera for the @ref orxonox::OrxoBloxBat "OrxoBloxBat". The second template ist the actual template for the @ref orxonox::OrxoBloxBat "OrxoBloxBat", the template for the camera position is added and a @ref orxonox::Model "Model" for the @ref orxonox::OrxoBloxBat "OrxoBloxBat" is attached.
    101        
    102         Finally the OrxoBloxCenterpoint is created.
    103         @code
    104         <OrxoBloxCenterpoint name="OrxoBloxcenter" dimension="200,120" balltemplate="OrxoBloxball" battemplate="OrxoBloxbat" ballspeed="200" ballaccfactor="1.0" batspeed="130" batlength="0.25">
    105           <attached>
    106             <Model position="0,0,60" mesh="cube.mesh" scale3D="105,1,1" />
    107             <Model position="0,0,-60" mesh="cube.mesh" scale3D="105,1,1" />
    108           </attached>
    109         </OrxoBloxCenterpoint>
    110         @endcode
    111         All parameters are specified. And also two @ref orxonox::Model "Models" (for the upper and lower boundary) are attached.
    112        
    113         For a more elaborate example, have a look at the <code>OrxoBlox.oxw</code> level file.
    114    
    115     @author
    116         Fabian 'x3n' Landau
    117        
    118     @ingroup OrxoBlox
    119     */
    12015    class _OrxoBloxExport OrxoBloxCenterpoint : public StaticEntity
    12116    {
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxPrereqs.h

    r12371 r12396  
    1 /*
    2  *   ORXONOX - the hottest 3D action shooter ever to exist
    3  *                    > www.orxonox.net <
    4  *
    5  *
    6  *   License notice:
    7  *
    8  *   This program is free software; you can redistribute it and/or
    9  *   modify it under the terms of the GNU General Public License
    10  *   as published by the Free Software Foundation; either version 2
    11  *   of the License, or (at your option) any later version.
    12  *
    13  *   This program is distributed in the hope that it will be useful,
    14  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  *   GNU General Public License for more details.
    17  *
    18  *   You should have received a copy of the GNU General Public License
    19  *   along with this program; if not, write to the Free Software
    20  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    21  *
    22  *   Author:
    23  *      Reto Grieder
    24  *   Co-authors:
    25  *      ...
    26  *
    27  */
    28 
    29 /**
    30 @file
    31 @brief
    32     Shared library macros, enums, constants and forward declarations for the OrxoBlox module
    33 */
    34 
    351#ifndef _OrxoBloxPrereqs_H__
    362#define _OrxoBloxPrereqs_H__
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxScore.cc

    r12366 r12396  
    1 /*
    2  *   ORXONOX - the hottest 3D action shooter ever to exist
    3  *                    > www.orxonox.net <
    4  *
    5  *
    6  *   License notice:
    7  *
    8  *   This program is free software; you can redistribute it and/or
    9  *   modify it under the terms of the GNU General Public License
    10  *   as published by the Free Software Foundation; either version 2
    11  *   of the License, or (at your option) any later version.
    12  *
    13  *   This program is distributed in the hope that it will be useful,
    14  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  *   GNU General Public License for more details.
    17  *
    18  *   You should have received a copy of the GNU General Public License
    19  *   along with this program; if not, write to the Free Software
    20  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    21  *
    22  *   Author:
    23  *      Fabian 'x3n' Landau
    24  *   Co-authors:
    25  *      ...
    26  *
    27  */
    28 
    29 /**
    30     @file OrxoBloxScore.cc
    31     @brief Implementation of the OrxoBloxScore class.
    32 */
    33 
    341#include "OrxoBloxScore.h"
    352
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxScore.h

    r12359 r12396  
    1 /*
    2  *   ORXONOX - the hottest 3D action shooter ever to exist
    3  *                    > www.orxonox.net <
    4  *
    5  *
    6  *   License notice:
    7  *
    8  *   This program is free software; you can redistribute it and/or
    9  *   modify it under the terms of the GNU General Public License
    10  *   as published by the Free Software Foundation; either version 2
    11  *   of the License, or (at your option) any later version.
    12  *
    13  *   This program is distributed in the hope that it will be useful,
    14  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  *   GNU General Public License for more details.
    17  *
    18  *   You should have received a copy of the GNU General Public License
    19  *   along with this program; if not, write to the Free Software
    20  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    21  *
    22  *   Author:
    23  *      Fabian 'x3n' Landau
    24  *   Co-authors:
    25  *      ...
    26  *
    27  */
    28 
    29 /**
    30     @file OrxoBloxScore.h
    31     @brief Declaration of the OrxoBloxScore class.
    32     @ingroup OrxoBlox
    33 */
    34 
    351#ifndef _OrxoBloxScore_H__
    362#define _OrxoBloxScore_H__
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxShip.cc

    r12391 r12396  
    1 /*
    2  *   ORXONOX - the hottest 3D action shooter ever to exist
    3  *                    > www.orxonox.net <
    4  *
    5  *
    6  *   License notice:
    7  *
    8  *   This program is free software; you can redistribute it and/or
    9  *   modify it under the terms of the GNU General Public License
    10  *   as published by the Free Software Foundation; either version 2
    11  *   of the License, or (at your option) any later version.
    12  *
    13  *   This program is distributed in the hope that it will be useful,
    14  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  *   GNU General Public License for more details.
    17  *
    18  *   You should have received a copy of the GNU General Public License
    19  *   along with this program; if not, write to the Free Software
    20  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    21  *
    22  *   Author:
    23  *      Viviane Yang
    24  *   Co-authors:
    25  *      ...
    26  *
    27  */
    28 
    29 /*  TODO:
    30 
    31     @file OrxoBloxShip.cc
    32     @brief Implementation of the OrxoBloxShip class.
    33 */
    34 
    351#include "OrxoBloxShip.h"
    362#include "OrxoBlox.h"
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxShip.h

    r12391 r12396  
    1 /*
    2  *   ORXONOX - the hottest 3D action shooter ever to exist
    3  *                    > www.orxonox.net <
    4  *
    5  *
    6  *   License notice:
    7  *
    8  *   This program is free software; you can redistribute it and/or
    9  *   modify it under the terms of the GNU General Public License
    10  *   as published by the Free Software Foundation; either version 2
    11  *   of the License, or (at your option) any later version.
    12  *
    13  *   This program is distributed in the hope that it will be useful,
    14  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  *   GNU General Public License for more details.
    17  *
    18  *   You should have received a copy of the GNU General Public License
    19  *   along with this program; if not, write to the Free Software
    20  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    21  *
    22  *   Author:
    23  *      Florian Zinggeler
    24  *   Co-authors:
    25  *      ...
    26  *
    27  */
    28 
    29 /**
    30     @file Asteroids2DShip.h
    31     @brief Declaration of the Asteroids2DShip class.
    32 */
    33 
    341#ifndef _OrxoBloxShip_H__
    352#define _OrxoBloxShip_H__
  • code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BallProjectile.cc

    r12394 r12396  
    1 /*
    2  *   ORXONOX - the hottest 3D action shooter ever to exist
    3  *                    > www.orxonox.net <
    4  *
    5  *
    6  *   License notice:
    7  *
    8  *   This program is free software; you can redistribute it and/or
    9  *   modify it under the terms of the GNU General Public License
    10  *   as published by the Free Software Foundation; either version 2
    11  *   of the License, or (at your option) any later version.
    12  *
    13  *   This program is distributed in the hope that it will be useful,
    14  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  *   GNU General Public License for more details.
    17  *
    18  *   You should have received a copy of the GNU General Public License
    19  *   along with this program; if not, write to the Free Software
    20  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    21  *
    22  *   Author:
    23  *      Fabian 'x3n' Landau
    24  *   Co-authors:
    25  *      ...
    26  *
    27  */
    28 
    29 /**
    30     @file ParticleProjectile.h
    31     @brief Implementation of the ParticleProjectile class.
    32 */
    33 
    341#include "BallProjectile.h"
    352#include "gametypes/Gametype.h"
     
    11582                distance_Z = -distance_Z;
    11683
    117             //orxout() << distance_X << endl;
    118             //orxout() << distance_Z << endl;
    119 
    12084            if (distance_X < distance_Z) {
    12185                velocity.z = -velocity.z;
    122                 //orxout() << "z" << endl;
    12386            }
    12487            if (distance_Z < distance_X) {
    12588                velocity.x = -velocity.x;
    126                 //orxout() << "x" << endl;
    12789            }
    12890            else {
    12991                velocity.x = -velocity.x;
    13092                velocity.z = -velocity.z;
    131                 //orxout() << "both" << endl;
    13293            }
    13394            this->setVelocity(velocity);
    134         //}
    13595    }
    13696
     
    142102            if (otherObject->isA(Class(OrxoBloxStones))) {
    143103                Bounce(otherObject, contactPoint, cs);
    144                 orxout() << "BOUNCED!" << endl;
    145104               
    146105            }
     
    187146                position.z = this-> fieldHeight_;
    188147               
    189                 //orxoblox_->LevelUp();
    190148                orxoblox_->count();
    191149                suicidal = true;
     
    258216    }
    259217
     218
     219    //This is an override to prevent getting killed by the program
    260220    void BallProjectile::destroyObject(void)
    261221    {
  • code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BallProjectile.h

    r12384 r12396  
    1 /*
    2  *   ORXONOX - the hottest 3D action shooter ever to exist
    3  *                    > www.orxonox.net <
    4  *
    5  *
    6  *   License notice:
    7  *
    8  *   This program is free software; you can redistribute it and/or
    9  *   modify it under the terms of the GNU General Public License
    10  *   as published by the Free Software Foundation; either version 2
    11  *   of the License, or (at your option) any later version.
    12  *
    13  *   This program is distributed in the hope that it will be useful,
    14  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  *   GNU General Public License for more details.
    17  *
    18  *   You should have received a copy of the GNU General Public License
    19  *   along with this program; if not, write to the Free Software
    20  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    21  *
    22  *   Author:
    23  *      Fabian 'x3n' Landau
    24  *   Co-authors:
    25  *      ...
    26  *
    27  */
    28 
    29 /**
    30     @file ParticleProjectile.h
    31     @brief Definition of the ParticleProjectile class.
    32 */
    33 
    341#ifndef _BallProjectile_H__
    352#define _BallProjectile_H__
     
    4512{
    4613
    47     /**
    48     @brief
    49         A projectile that is represented by particles.
    50     @author
    51         Fabian 'x3n' Landau
    52     @ingroup WeaponsProjectiles
    53     */
    5414    class _WeaponsExport BallProjectile : public BillboardProjectile
    5515    {
Note: See TracChangeset for help on using the changeset viewer.