Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10963


Ignore:
Timestamp:
Dec 9, 2015, 4:56:39 PM (8 years ago)
Author:
maxima
Message:

Merged presentation and particleEffects branches. Added a new level, spaceshiptemplate and weaponsettings for the mine.

Location:
code/branches/presentationHS15
Files:
3 added
15 edited
13 copied

Legend:

Unmodified
Added
Removed
  • code/branches/presentationHS15

  • code/branches/presentationHS15/data/levels/emptyLevel.oxw

    r10962 r10963  
    1313
    1414<?lua
    15   include("templates/spaceshipAssff.oxt")
    1615  include("templates/spaceshipEscort.oxt")
    17   include("templates/spaceshipHover.oxt")
    1816?>
    1917
     
    3230    <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />
    3331
    34     <SpaceShip
    35         team                = "1"
    36         position            = "1000,0,0"
    37         >
    38         <templates>
    39           <Template link=spaceshipassff />
    40         </templates>         
    41     </SpaceShip>
    42     <SpaceShip
    43         team                = "1"
    44         position            = "1000,200,0"
    45         >
    46         <templates>
    47           <Template link=spaceshiphover />
    48         </templates>
    49                    
    50     </SpaceShip>
    51     <SpaceShip
    52         team                = "1"
    53         position            = "1000,400,0"
    54         >
    55         <templates>
    56           <Template link=spaceshipescort />
    57         </templates>
    58 
    5932       
    60                    
    61     </SpaceShip>
    62    
    6333  </Scene>
    6434</Level>
  • code/branches/presentationHS15/data/levels/includes/weaponSettingsAssff2.oxi

    r10961 r10963  
    1     <weaponslots>
     1t    <weaponslots>
    22      <WeaponSlot position="-15.0,-1.5,0" />
    33      <WeaponSlot position=" 15.0,-1.5,0" />
  • code/branches/presentationHS15/data/levels/pong.oxw

    r10624 r10963  
    4343      <Backlight scale=0.2 colour="1.0, 1.0, 0.5" width=7 length=500 lifetime=0.3 elements=20 trailmaterial="Trail/backlighttrail" material="Examples/Flare" />
    4444      <Light type=point diffuse="1.0, 1.0, 0.5" specular="1.0, 1.0, 0.5" attenuation="1200, 1.0, 0.0035, 0.00005" />
    45       <ParticleSpawner name=hiteffect position="0,0,0" source="Orxonox/sparks2" lifetime=0.01 autostart=0 mainstate=spawn />
     45      <ParticleSpawner name=hiteffect position="0,0,0" source="Orxonox/engineglow" lifetime=0.01 autostart=0 mainstate=spawn />
    4646    </attached>
    4747    <eventlisteners>
  • code/branches/presentationHS15/data/levels/templates/spaceshipEscort.oxt

    r10962 r10963  
    104104    <EffectContainer condition="idle">
    105105      <WorldSound mainstate="activity" source="sounds/Engine_idle.ogg" looping=1 active=false/>
     106       />
     107
     108           <Backlight mainstate=activity active=false scale=0.33 name=bltest position=" 12, -2, 14" colour="0.2, 0.5, 0.65, 1.0" width=150 length=15 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=2 turnofftime=1 material="Flares/ThrusterFlare1" />
     109
     110      <Backlight mainstate=activity active=false scale=0.33 name=bltest position="-12, -2, 14" colour="0.2, 0.5, 0.65, 1.0" width=15 length=15 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=2 turnofftime=1 material="Flares/ThrusterFlare1" />
     111
    106112    </EffectContainer>
    107113    <EffectContainer condition="not idle">
     
    112118
    113119    </EffectContainer>
     120
    114121    <EffectContainer condition="normal or boost">
    115       <Backlight mainstate=activity active=false scale=0.33 name=bltest position=" 12, 0, 10" colour="0.2, 1.0, 0.65, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
    116       <Backlight mainstate=activity active=false scale=0.33 name=bltest position="-12, 0, 10" colour="0.2, 1.0, 0.65, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
     122       
     123       
     124      <Backlight mainstate=activity active=false scale=0.33 name=bltest position=" 12, -2, 14" colour="0.2, 1.0, 0.65, 1.0" width=5 length=1500 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
     125
     126      <Backlight mainstate=activity active=false scale=0.33 name=bltest position="-12, -2, 14" colour="0.2, 1.0, 0.65, 1.0" width=15 length=1500 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
    117127    </EffectContainer>
     128
    118129    <EffectContainer condition="boost">
    119130      <Backlight mainstate=activity active=false scale=0.33 name=bltest position=" 12, 0, 10" colour="0.6, 0.8, 0.75, 0.7" width=25 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
  • code/branches/presentationHS15/data/particle/engineglow.particle

    r5781 r10963  
    1 
    21particle_system Orxonox/engineglow
    32{
    4         quota   200
    5         material        PE/bigFlame
    6         particle_width  12
    7         particle_height 12
    8         cull_each       false
    9         renderer        billboard
    10         billboard_type  point
     3        material PE/Special.001
     4        particle_width 100.0
     5        particle_height 100.0
     6        quota 2000
     7        cull_each false
     8        sorted false
     9        local_space false
     10        iteration_interval 0.0
     11        nonvisible_update_timeout 0.0
     12        billboard_type point
     13        billboard_origin center
     14        billboard_rotation_type texcoord
     15        point_rendering false
     16        accurate_facing false
    1117
    12         emitter HollowEllipsoid
     18        emitter Ring
    1319        {
    14                 angle   0
    15                 colour  0.46875 0.8125 0.93359375 1
    16                 colour_range_start      .6640625 .91796875 .92578125 1
    17                 colour_range_end        .08203125 .7578125 .98046875 1
    18                 direction       0 1 0
    19                 emission_rate   45
    20                 position        0 0 0
    21                 velocity        5
    22                 velocity_min    4
    23                 velocity_max    6
    24                 time_to_live    0.5
    25                 time_to_live_min        0.2
    26                 time_to_live_max        0.9
    27                 duration        0
    28                 duration_min    0
    29                 duration_max    0
    30                 repeat_delay    0
    31                 repeat_delay_min        0
    32                 repeat_delay_max        0
    33                 width   4
    34                 height  2.5
    35                 depth   1.3
    36                 inner_width     0.5
    37                 inner_height    0.3
    38                 inner_depth     0.2
     20                position 0.0 0.0 0.0
     21                direction 0.0 0.0 1.0
     22                angle 0
     23                width 150
     24                height 150
     25                depth 1
     26                inner_width 0.99
     27                inner_height 0.99
     28                emission_rate 30
     29                velocity_min 20
     30                velocity_max 20
     31                time_to_live_min 5
     32                time_to_live_max 5
     33                duration_min 0
     34                duration_max 0
     35                repeat_delay_min 0
     36                repeat_delay_max 0
     37                colour_range_start 0.666667 1 0 1
     38                colour_range_end 0 1 0 1
     39        }
     40
     41        emitter Ring
     42        {
     43                position 0.0 0.0 0.0
     44                direction 0.0 0.0 1.0
     45                angle 0
     46                width 130
     47                height 130
     48                depth 0
     49                inner_width 0.99
     50                inner_height 0.99
     51                emission_rate 10
     52                velocity_min 200
     53                velocity_max 200
     54                time_to_live_min 0.75
     55                time_to_live_max 0.75
     56                duration_min 0
     57                duration_max 0
     58                repeat_delay_min 0
     59                repeat_delay_max 0
     60                colour_range_start 1 1 0 1
     61                colour_range_end 1 1 0.498039 1
     62        }
     63
     64        emitter Ring
     65        {
     66                position 0.0 0.0 0.0
     67                direction 0.0 0.0 1.0
     68                angle 0
     69                width 80
     70                height 80
     71                depth 0
     72                inner_width 0.99
     73                inner_height 0.99
     74                emission_rate 57.89
     75                velocity_min 250
     76                velocity_max 250
     77                time_to_live_min 1
     78                time_to_live_max 1
     79                duration_min 0
     80                duration_max 0
     81                repeat_delay_min 0
     82                repeat_delay_max 0
     83                colour_range_start 1 0.333333 0 1
     84                colour_range_end 1 0.333333 0 1
     85        }
     86
     87        emitter Ring
     88        {
     89                position 0.0 0.0 0.0
     90                direction 0.0 0.0 1.0
     91                angle 0
     92                width 50
     93                height 50
     94                depth 0
     95                inner_width 0.01
     96                inner_height 0.5
     97                emission_rate 37.89
     98                velocity_min 300
     99                velocity_max 300
     100                time_to_live_min 1.5
     101                time_to_live_max 1.5
     102                duration_min 0
     103                duration_max 0
     104                repeat_delay_min 0
     105                repeat_delay_max 0
     106                colour_range_start 1 0 0 1
     107                colour_range_end 1 0 0 1
     108        }
     109
     110        affector Scaler
     111        {
     112                rate -20
    39113        }
    40114}
  • code/branches/presentationHS15/data/particle/rocketfire.particle

    r6417 r10963  
    11particle_system Orxonox/rocketfire
    22{
    3         quota   300
    4         material        PE/explosion
    5         particle_width  15
    6         particle_height 5
    7         cull_each       false
    8         renderer        billboard
    9         sorted  false
    10         local_space     false
    11         iteration_interval      0
    12         nonvisible_update_timeout       0
    13         billboard_type  point
    14         billboard_origin        center
    15         billboard_rotation_type texcoord
    16         common_up_vector        0 1 0
    17         point_rendering false
    18         accurate_facing false
     3        material PE/glowEffect
     4        particle_width 2
     5        particle_height 2
     6        quota 10000
     7        cull_each true
     8        sorted true
     9        local_space true
     10        iteration_interval 0.0
     11        nonvisible_update_timeout 0.0
     12        billboard_type point
     13        billboard_origin center
     14        billboard_rotation_type texcoord
     15        point_rendering false
     16        accurate_facing false
    1917
    2018        emitter Ellipsoid
    2119        {
    22                 angle   2
    23                 colour  1 0.682759 1 1
    24                 colour_range_start      1 0.682759 1 1
    25                 colour_range_end        1 0.682759 1 1
    26                 direction       0 0 1
    27                 emission_rate   1200
    28                 position        0 0 3
    29                 velocity        10
    30                 velocity_min    10
    31                 velocity_max    48
    32                 time_to_live    0.1
    33                 time_to_live_min        0.1
    34                 time_to_live_max        0.2
    35                 duration        0
    36                 duration_min    0
    37                 duration_max    0
    38                 repeat_delay    0
    39                 repeat_delay_min        0
    40                 repeat_delay_max        0
    41                 width   1.5
    42                 height  1.5
    43                 depth   10
     20                position 0.05 0.0 2.0
     21                direction 0.0 0.0 1.0
     22                angle 0
     23                width 0
     24                height 0
     25                depth 0
     26                emission_rate 1200
     27                velocity_min 10
     28                velocity_max 20
     29                time_to_live_min 0.1
     30                time_to_live_max 0.1
     31                duration_min 0
     32                duration_max 0
     33                repeat_delay_min 0
     34                repeat_delay_max 0
     35                colour_range_start 1 0.333333 0 1
     36                colour_range_end 1 0 0 1
     37        }
     38        emitter Ellipsoid
     39        {
     40                position 0.05 0.0 2.0
     41                direction 0.0 0.0 1.0
     42                angle 0
     43                width 0
     44                height 0
     45                depth 0
     46                emission_rate 100
     47                velocity_min 5
     48                velocity_max 10
     49                time_to_live_min 0.1
     50                time_to_live_max 0.1
     51                duration_min 0
     52                duration_max 0
     53                repeat_delay_min 0
     54                repeat_delay_max 0
     55                colour_range_start 0.2 0.5 0.65
     56                colour_range_end 0.25 0.55 0.7
    4457        }
    4558
    4659        affector Scaler
    4760        {
    48                 rate    -20
     61                rate -8
    4962        }
    5063}
  • code/branches/presentationHS15/src/modules/weapons/WeaponsPrereqs.h

    r10961 r10963  
    102102    class LaserFire;
    103103    class LightningGun;
     104    class MineGun;
    104105    class RocketFire;
    105106    class RocketFireOld;
  • code/branches/presentationHS15/src/modules/weapons/munitions/CMakeLists.txt

    r10961 r10963  
    77  IceMunition.cc
    88  SplitMunition.cc
     9  MineMunition.cc
    910)
  • code/branches/presentationHS15/src/modules/weapons/munitions/MineMunition.cc

    r10962 r10963  
    4545        this->maxMunitionPerMagazine_ = 1;
    4646        this->maxMagazines_ = 100;
    47         this->magazines_ = 25;
     47        this->unassignedMagazines_ = 25;
    4848
    49         this->bUseSeparateMagazines_ = false;
    50         this->bStackMunition_ = true;
     49        this->deployment_ = MunitionDeployment::Stack;
    5150
    5251        this->bAllowMunitionRefilling_ = true;
    5352        this->bAllowMultiMunitionRemovementUnderflow_ = false;
     53
     54        this->reloadTime_ = 0.5f;
     55    }
     56
     57    void MineMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     58    {
     59        SUPER(MineMunition, XMLPort, xmlelement, mode);
    5460    }
    5561}
  • code/branches/presentationHS15/src/modules/weapons/munitions/MineMunition.h

    r10962 r10963  
    5353            MineMunition(Context* context);
    5454            virtual ~MineMunition() {}
     55            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    5556    };
    5657}
  • code/branches/presentationHS15/src/modules/weapons/projectiles/CMakeLists.txt

    r10629 r10963  
    1212  GravityBomb.cc
    1313  GravityBombField.cc
     14  MineProjectile.cc
    1415)
  • code/branches/presentationHS15/src/modules/weapons/projectiles/IceGunProjectile.cc

    r10629 r10963  
    3434#include "IceGunProjectile.h"
    3535
     36#include <OgreSceneManager.h>
     37#include <OgreSceneNode.h>
     38
    3639#include "core/CoreIncludes.h"
    3740#include "graphics/Model.h"
     41#include "graphics/ParticleSpawner.h"
     42#include "Scene.h"
     43#include "core/command/Executor.h"
     44#include "tools/ParticleInterface.h"
    3845
    3946namespace orxonox
    4047{
    4148    RegisterClass(IceGunProjectile);
     49
     50    const float IceGunProjectile::particleDestructionDelay_ = 15.0f;
    4251
    4352    IceGunProjectile::IceGunProjectile(Context* context) : Projectile(context)
     
    5564        this->attach(model);
    5665        model->setPosition(Vector3(0,0,0));
     66
     67        // Add effect.
     68        emitter_ = new ParticleEmitter(this->getContext());
     69        this->attach(emitter_);
     70        emitter_->setOrientation(this->getOrientation());
     71        emitter_->setSource("Orxonox/ice");   
     72        emitter_->setDeleteWithParent(false);     
     73    }
     74
     75    IceGunProjectile::~IceGunProjectile()
     76    {
     77        if (this->isInitialized())
     78        {
     79            const Vector3& pos = emitter_->getWorldPosition();
     80            const Quaternion& rot = emitter_->getWorldOrientation();
     81            this->detach(emitter_);
     82            emitter_->setPosition(pos);
     83            emitter_->setOrientation(rot);
     84            emitter_->getParticleInterface()->setEnabled(false);
     85            this->getScene()->getRootSceneNode()->addChild(const_cast<Ogre::SceneNode*>(emitter_->getNode()));
     86
     87            const ExecutorPtr& executor = createExecutor(createFunctor(&ParticleEmitter::destroy, emitter_));
     88            new Timer(particleDestructionDelay_, false, executor, true);
     89        }
    5790    }
    5891
  • code/branches/presentationHS15/src/modules/weapons/projectiles/IceGunProjectile.h

    r10629 r10963  
    5656        public:
    5757            IceGunProjectile(Context* context);
    58             virtual ~IceGunProjectile() {}
     58            virtual ~IceGunProjectile();
    5959
    6060            virtual void setFreezeTime(float freezeTime);
     
    6363        protected:
    6464            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
    65         private:         
     65            static const float particleDestructionDelay_;
     66        private:
     67            ParticleEmitter* emitter_;
    6668            float freezeTime_; //The duration of the freezing effect on a target
    6769            float freezeFactor_; //The strength of the freezing effect
  • code/branches/presentationHS15/src/modules/weapons/projectiles/Projectile.h

    r10629 r10963  
    6969        protected:
    7070            virtual void setCollisionShapeRadius(float radius);
     71            float lifetime_; //!< The time the projectile exists.
    7172
    7273        private:
    73             float lifetime_; //!< The time the projectile exists.
    7474            Timer destroyTimer_; //!< Timer to destroy the projectile after its lifetime has run out.
    75             WeakPtr<SphereCollisionShape> collisionShape_; // The collision shape of the projectile.           
     75            WeakPtr<SphereCollisionShape> collisionShape_; // The collision shape of the projectile.
    7676    };
    7777}
  • code/branches/presentationHS15/src/modules/weapons/weaponmodes/CMakeLists.txt

    r10629 r10963  
    1111  SimpleRocketFire.cc
    1212  GravityBombFire.cc
     13  MineGun.cc
    1314)
  • code/branches/presentationHS15/src/orxonox/weaponsystem/WeaponMode.cc

    r10961 r10963  
    7575        this->muzzleOrientation_ = Quaternion::IDENTITY;
    7676
    77         hudImageString_ = "WSHUD_WM_Unknown";
     77        hudImageString_ = "Orxonox/WSHUD_WM_Unknown";
    7878
    7979        if( GameMode::isMaster() )
Note: See TracChangeset for help on using the changeset viewer.