Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 12394


Ignore:
Timestamp:
May 16, 2019, 6:27:53 PM (5 years ago)
Author:
pomselj
Message:

almost done

Location:
code/branches/OrxoBlox_FS19
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • code/branches/OrxoBlox_FS19/data/levels/includes/OrxoBloxWeapon.oxi

    r12392 r12394  
    11    <weaponslots>
    2       <WeaponSlot position="0,0,0" />/>
     2      <WeaponSlot position="0,-5,0" />/>
    33    </weaponslots>
    44    <weaponsets>
  • code/branches/OrxoBlox_FS19/data/levels/orxoblox.oxw

    r12393 r12394  
    9191    <!-- <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/> -->
    9292    <Light type=directional position="-100, 10000, -700" direction="0.2, -1, 0" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
    93     <SpawnPoint team=0 position="0,-4.5,49" lookat="0,0,0" spawnclass= SpaceShip pawndesign=spaceshipOrxoBlox/>
     93    <SpawnPoint team=0 position="0,-4.5,49" lookat="-10000,0,0" spawnclass= SpaceShip pawndesign=spaceshipOrxoBlox/>
    9494
    9595    <!--SpawnPoint team=0 position="0,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort /--->
  • code/branches/OrxoBlox_FS19/data/levels/templates/spaceshipOrxoBlox.oxt

    r12393 r12394  
    103103    </attached>
    104104    <collisionShapes>
    105           <BoxCollisionShape position="0,0,0" halfExtents="2,2,2" />
     105          <BoxCollisionShape position="0,0,0" halfExtents="4,4,4" />
    106106    </collisionShapes>
    107107  </OrxoBloxStones>
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc

    r12392 r12394  
    7171        this->player_ = nullptr;
    7272        level_ = 0;
     73        this->counter = 0;
    7374
    7475        this->setHUDTemplate("OrxoBloxHUD");
     
    144145        {
    145146
    146             level_=1;
     147            level_= 1;
    147148
    148149        }
     
    213214
    214215        orxout() << "level up called" << endl;
    215         this->playerScored(this->player_);// add points
     216        //this->playerScored(this->player_);// add points
    216217
    217218        this->createWall();
    218219        this->activeWalls_.push_back(this->futureWall_);
    219         for (int i = 0; i < this->futureWall_->getNumberOfStones(); i++) {
    220             if (this->futureWall_->getStone(i) == nullptr) {
    221                 orxout() << "Added nullptr to std::list stones_" << endl;
    222             }
    223 
     220/*        for (int i = 0; i < this->futureWall_->getNumberOfStones(); i++) {
    224221            this->stones_.push_back(this->futureWall_->getStone(i));
    225         }
     222        }*/
    226223
    227224        for(OrxoBloxWall* wall : this->activeWalls_) {
     225            if(wall == nullptr) {
     226                continue;
     227            }
    228228            if(wall->isEmpty()) {
    229229                wall->destroy();
     
    340340    }
    341341  */ 
     342    void OrxoBlox::count() {
     343        if(this->counter >= this->max_counter) {
     344            this->LevelUp();
     345            counter = 0;
     346            return;
     347        }
     348        else {
     349            this->counter++;
     350        }
     351    }
     352
     353
    342354}
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.h

    r12391 r12394  
    9191            //OrxoBloxStones* CheckForCollision(OrxoBloxBall* Ball);
    9292            virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command
     93            void count();
    9394        protected:
    9495        private:
     
    108109            WeakPtr<OrxoBloxWall> futureWall_;
    109110            std::vector<OrxoBloxWall*> activeWalls_;
    110             std::list<StrongPtr<OrxoBloxStones>> stones_; //!< A list of all stones in play.
     111            std::vector<OrxoBloxStones*> stones_; //!< A list of all stones in play.
     112            int counter;
     113            const int max_counter = 10;
    111114
    112115    };
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxStones.cc

    r12393 r12394  
    1818
    1919        this->size_ = 9.0f;
    20         this->health_ = 1 + static_cast<unsigned int>(rnd(6.0f)); //<! random number between 0 and 7;
     20        this->health_ = 1;
    2121        this->delay_ = false;
    2222    }
     
    3333        return this->size_;
    3434    }
     35
     36    bool OrxoBloxStones::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)
     37    {
     38        orxout() << "a stone should die" << endl;
     39        this->destroy();
     40        return true;
     41    }
    3542}
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxStones.h

    r12393 r12394  
    7070
    7171            float getSize();
     72            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
    7273               
    7374        private:
  • code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BallProjectile.cc

    r12393 r12394  
    6060        this->orxoblox_ = this->getOrxoBlox();
    6161        this->setCollisionShapeRadius(2.5);
     62        this->setDamage(1000);
    6263
    6364        //setEffect("Orxonox/sparks2");
     
    186187                position.z = this-> fieldHeight_;
    187188               
    188                 orxoblox_->LevelUp();
     189                //orxoblox_->LevelUp();
     190                orxoblox_->count();
    189191                suicidal = true;
    190192               
  • code/branches/OrxoBlox_FS19/src/modules/weapons/weaponmodes/BallGun.cc

    r12378 r12394  
    5959
    6060        this->reloadTime_ = 0.25f;
    61         this->damage_ = 0.0f; //default 15
     61        this->damage_ = 10000; //default 15
    6262        this->speed_ = 100;
    6363        this->delay_ = 100;
Note: See TracChangeset for help on using the changeset viewer.