Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 12370 for code


Ignore:
Timestamp:
May 16, 2019, 1:13:21 PM (5 years ago)
Author:
ahuwyler
Message:

We have new template

Location:
code/branches/OrxoBlox_FS19
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • code/branches/OrxoBlox_FS19/data/levels/orxoblox.oxw

    r12368 r12370  
    77
    88<?lua
    9   include("HUDTemplates3.oxo")
     9 
    1010  include("stats.oxo")
    1111  include("OrxoBloxHUD.oxo")
  • code/branches/OrxoBlox_FS19/data/levels/templates/spaceshipOrxoBlox.oxt

    r12367 r12370  
    66   spawnparticleduration  = 3
    77   explosionchunks        = 4
     8
     9   health            = 10
     10   maxhealth         = 10
     11   initialhealth     = 10
     12
     13   shieldhealth        = 20
     14   initialshieldhealth = 20
     15   maxshieldhealth     = 20
     16   shieldabsorption    = 0.1
     17   shieldrechargerate  = 1
     18   shieldrechargewaittime = 1
    819
    920   primaryThrust     = 150
     
    2637   linearDamping     = 0.9
    2738   angularDamping    = 0.9999999
     39
     40   collisiondamage = 100
     41   enablecollisiondamage = true
    2842   
    2943  >
     
    7286   boostfactor    = 2.2
    7387
     88
    7489   defEngineSndNormal = "sounds/Engine_low.ogg"
    7590   defEngineSndBoost = "sounds/Engine_high.ogg"
    76 
    77    accelerationfront     = 700
    78    accelerationbrake     = 700
    79    accelerationback      = 700
    80    accelerationleftright =  500
    81    accelerationupdown    =  500
    8291  >
    8392
  • code/branches/OrxoBlox_FS19/data/overlays/OrxoBloxHUD.oxo

    r12359 r12370  
    2121    />
    2222
     23
    2324  </OverlayGroup>
    2425</Template>
     26<Template name="spaceshiphud">
     27  <OverlayGroup name = "spaceshiphud" scale = "1, 1">
     28    <HUDNavigation
     29     name          = "Navigation"
     30     correctaspect = true
     31     font          = "Monofur"
     32     textsize      = 0
     33     navMarkerSize = 0.06
     34     aimMarkerSize = 0
     35     healthMarkerSize = 0
     36     healthLevelMarkerSize = 0
     37    />
     38  </OverlayGroup>
     39</Template>
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc

    r12369 r12370  
    173173        // Set variable to temporarily force the player to spawn.
    174174        //bool temp = this->bForceSpawn_;
    175         this->bForceSpawn_ = true;
     175        this->bForceSpawn_ = false;
    176176
    177177        // Call start for the parent class.
     
    307307            if((BallPosition.x - Ball->getRadius() >= StonePosition.x - size && BallPosition.x + Ball->getRadius() <= StonePosition.x + size) &&
    308308                (BallPosition.z - Ball->getRadius() >= StonePosition.z - size && BallPosition.z + Ball->getRadius() <= StonePosition.z + size)) {
    309                 orxout() << "FOUND ONE" << endl;
     309                //orxout() << "FOUND ONE" << endl;
    310310                return someStone;
    311311            }
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.h

    r12367 r12370  
    9090                { return this->center_; }
    9191            OrxoBloxStones* CheckForCollision(OrxoBloxBall* Ball);
    92 
     92            virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command
    9393        protected:
    9494        private:
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxPrereqs.h

    r12366 r12370  
    7474    class OrxoBloxStones;
    7575    class OrxoBloxScore;
     76    class OrxoBloxShip;
    7677}
    7778
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxShip.cc

    r12367 r12370  
    7171        SUPER(OrxoBloxShip, tick, dt);
    7272        Vector3 pos = this->getPosition();
     73        this->setPosition(pos);
     74    }   
    7375
     76    void OrxoBloxShip::boost(bool bBoost)
     77    {
    7478    }
    7579
    76     OrxoBlox* OrxoBloxShip::getGame()
    77     {
    78         if (game == nullptr)
    79         {
    80             for (OrxoBlox* race : ObjectList<OrxoBlox>())
    81             {
    82                 game = race;
    83             }
    84         }
    85         return game;
    86     }
    87     void OrxoBloxShip::death()
    88     {
    89         SpaceShip::death();
    90     }
    9180}
    9281
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxShip.h

    r12367 r12370  
    5151
    5252            //no rotation in x and z direction!
    53             virtual void rotatePitch(const Vector2& value) override{}; // Rotate in pitch direction.
     53            //virtual void rotatePitch(const Vector2& value) override{}; // Rotate in pitch direction.
     54            //Yaw
    5455            virtual void rotateRoll(const Vector2& value) override{}; // Rotate in roll direction.
     56            virtual void boost(bool boost) override; //Override, so that the ship does not shake
    5557           
    5658            /*Functions that can be helpful while debugging.
     
    6870
    6971        protected:
    70             virtual void death() override;
    7172        private:
    7273            OrxoBlox* getGame();
Note: See TracChangeset for help on using the changeset viewer.