Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 12392


Ignore:
Timestamp:
May 16, 2019, 4:57:51 PM (6 years ago)
Author:
pomselj
Message:
 
Location:
code/branches/OrxoBlox_FS19
Files:
4 edited

Legend:

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

    r12378 r12392  
    2121    </weaponpacks>
    2222    <munition>
    23       <BallMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=10 replenishamount=1 replenishinterval=0.5/>
     23      <BallMunition initialmagazines=1 maxmagazines=1 munitionpermagazine=1 replenishamount=1 replenishinterval=4/>
    2424    </munition>
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc

    r12391 r12392  
    111111            }
    112112        */
    113        
    114         for (OrxoBloxWall* wall : this->activeWalls_)
     113        for (OrxoBloxWall* wall : this->activeWalls_) {
    115114            if (wall != nullptr)
    116115                wall->destroy();
     116        }
    117117        this->activeWalls_.clear();
    118118       
    119119
    120         for (OrxoBloxStones* stone : this->stones_)
     120        for (OrxoBloxStones* stone : this->stones_) {
    121121            if(stone != nullptr)
    122122            stone->destroy();
     123        }
    123124        this->stones_.clear();
     125        if(this->playership != nullptr) {
     126            this->playership->destroy();
     127        }
     128        if(this->center_ != nullptr) {
     129            this->center_->destroy();
     130        }
    124131       
    125132
     
    136143        if (this->center_ != nullptr) // There needs to be a OrxoBloxCenterpoint, i.e. the area the game takes place.
    137144        {
    138             //if (this->ball_ == nullptr) // If there is no ball, create a new ball.
    139             //{
    140             //    this->ball_ = new OrxoBloxBall(this->center_->getContext());
    141                 // Apply the template for the ball specified by the centerpoint.
    142             //    this->ball_->addTemplate(this->center_->getBalltemplate());
    143             //}
    144 
    145             // Attach the ball to the centerpoint and set the parameters as specified in the centerpoint, the ball is attached to.
    146             //this->center_->attach(this->ball_);
    147             //Startposition Ball
    148             //this->ball_->setPosition(0, 0, 40);
    149             //this->ball_->setFieldDimension(this->center_->getFieldDimension());
    150             //this->ball_->setSpeed(0);
    151             //this->ball_->setAccelerationFactor(this->center_->getBallAccelerationFactor());
    152            
     145
    153146            level_=1;
    154 
    155             // Create the first Wall.
    156             this->LevelUp();
    157 
    158 
    159 
    160             //Create Ship
    161             //this->ship_ = new OrxoBloxShip(this->center_->getContext());
    162             //this->ship_->setPosition(0, 0, 0);
    163147
    164148        }
     
    230214        orxout() << "level up called" << endl;
    231215        this->playerScored(this->player_);// add points
    232        
    233 
    234216
    235217        this->createWall();
     
    264246        for(OrxoBloxStones* stone : this->stones_){
    265247            if (stone != nullptr) {
    266             int x_=(stone->getPosition()).x;
    267             int y_=(stone->getPosition()).y;
    268             z_=(stone->getPosition()).z;
    269             //if(z_==90)this->end();
    270 
    271             stone->setPosition(x_,y_,z_+9.0f);
    272             if( z_ >= 45){
    273                 orxout() << "calling end() function" << endl;
    274                 this->end();
    275             }
    276             }
    277            
     248                int x_=(stone->getPosition()).x;
     249                int y_=(stone->getPosition()).y;
     250                z_=(stone->getPosition()).z;
     251                //if(z_==90)this->end();
     252
     253                stone->setPosition(x_,y_,z_+9.0f);
     254                if( z_ >= 45){
     255                    orxout() << "calling end() function" << endl;
     256                    this->end();
     257                }
     258            }
    278259        }
    279260
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxWall.cc

    r12360 r12392  
    3434            if(j<2){
    3535                this->size_ = 9.0f;
    36                 OrxoBloxStones* stone = new OrxoBloxStones(this->getContext());
     36                OrxoBloxStones* stone = new OrxoBloxStones(this->center_->getContext());
    3737                if (stone == nullptr) {
    3838                    std::abort();
  • code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BasicProjectile.cc

    r12378 r12392  
    9292            if (getDestroyAfterCollision())
    9393            {
    94                 orxout() << "Destroy that stuff" << endl;
    9594                this->bDestroy_ = true; // If something is hit, the object is destroyed and can't hit something else.
    9695                                        // The projectile is destroyed by its tick()-function (in the following tick).
     
    174173    {
    175174        if(GameMode::isMaster() && this->bDestroy_) {
    176             orxout() << "Set true, smhow" << endl;
    177175            this->destroy();
    178176        }
     
    186184    {
    187185        if(GameMode::isMaster()) {
    188             orxout() << "Deleted myself" << endl;
    189186            this->destroy();
    190187        }
Note: See TracChangeset for help on using the changeset viewer.