Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9505 for code/branches


Ignore:
Timestamp:
Dec 10, 2012, 4:51:44 PM (12 years ago)
Author:
jo
Message:

Enabling more variable projectile behaviour for HSW01

Location:
code/branches/presentationHS12
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentationHS12/data/levels/gallery.oxw

    r9350 r9505  
    6868      <Model position="0,20,-40" yaw="90" pitch="-90" roll="0" scale="2" mesh="LightningGun.mesh" />
    6969      <Model position="0,40,-40" yaw="90" pitch="-90" roll="0" scale="2" mesh="LightningGun-s.mesh" />
    70       <Model position="0,60,-40" yaw="90" pitch="-90" roll="0" scale="1.5" mesh="laserbeam.mesh" />
     70      <Model position="0,60,-40" yaw="90" pitch="-90" roll="0" scale="1.5" mesh="LaserBeam.mesh" />
    7171      <Model position="0,80,-40" yaw="90" pitch="-90" roll="0" scale="2" mesh="rocket.mesh" />
    7272      <Model position="0,-20,-40" yaw="90" pitch="-90" roll="0" scale="5" mesh="hs-w01.mesh" />
  • code/branches/presentationHS12/data/levels/includes/weaponSettingsEscort.oxi

    r9416 r9505  
    1919            <Model mesh="hs-w01_reduced.mesh" roll="90" pitch="-76" yaw="-90" position="-1.5,1,0.3" scale=0.6 /-->
    2020          </attached>
    21           <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
    22           <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
     21          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" projectileMesh="LaserBeam.mesh" />
     22          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" projectileMesh="LaserBeam.mesh" />
    2323          <LightningGun mode=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20 />
    2424        </Weapon>
     
    2929            <Model mesh="hs-w01_reduced.mesh" roll="90" pitch="-104" yaw="-90" position="0,1.3,0.3" scale=0.6 /-->
    3030          </attached>
    31           <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
    32           <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
     31          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" projectileMesh="LaserBeam.mesh" />
     32          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" projectileMesh="LaserBeam.mesh" />
    3333          <LightningGun mode=1 muzzleoffset="0,0,0" damage=23 />
    3434        </Weapon>
  • code/branches/presentationHS12/data/levels/templates/lodInformation.oxt

    r9503 r9505  
    1616      <MeshLodInformation mesh=HydroHarvester.mesh enabled=false />
    1717      <MeshLodInformation mesh=turretHead.mesh enabled=false />
     18      <MeshLodInformation mesh=LaserBeam.mesh enabled=false/>
    1819
    1920      <!-- disable LOD for some debris meshes which caused a crash (fixed in Ogre 1.7.3) -->
  • code/branches/presentationHS12/src/modules/weapons/weaponmodes/HsW01.cc

    r8855 r9505  
    6161        this->delay_ = 0.0f;
    6262        this->setMunitionName("LaserMunition");
     63        this->mesh_ = "laserbeam.mesh";
     64        this->sound_ = "sounds/Weapon_HsW01.ogg";
     65
    6366
    6467        this->delayTimer_.setTimer(1.0f, false, createExecutor(createFunctor(&HsW01::shot, this)));
    6568        this->delayTimer_.stopTimer();
    6669
    67         this->setDefaultSound("sounds/Weapon_HsW01.ogg");
     70        this->setDefaultSound(this->sound_);
    6871    }
    6972
     
    7881        XMLPortParam(HsW01, "delay", setDelay, getDelay, xmlelement, mode);
    7982        XMLPortParam(HsW01, "material", setMaterial, getMaterial, xmlelement, mode);
     83        XMLPortParam(HsW01, "projectileMesh", setMesh, getMesh, xmlelement, mode);
     84        XMLPortParam(HsW01, "sound", setSound, getSound, xmlelement, mode);
    8085    }
    8186
     
    108113        Projectile* projectile = new Projectile(this);
    109114        Model* model = new Model(projectile);
    110         model->setMeshSource("laserbeam.mesh");
     115        model->setMeshSource(mesh_);
    111116        model->setCastShadows(false);
    112117        projectile->attach(model);
  • code/branches/presentationHS12/src/modules/weapons/weaponmodes/HsW01.h

    r8855 r9505  
    6161        private:
    6262            /**
     63            @brief Set the mesh.
     64            @param mesh The mesh name.
     65            */
     66            void setMesh(const std::string& mesh)
     67                { this->mesh_ = mesh; }
     68
     69            /**
     70            @brief Get the mesh.
     71            @return Returns the mesh name.
     72            */
     73            const std::string& getMesh() const
     74                { return this->mesh_; }
     75
     76            /**
     77            @brief Set the sound.
     78            @param mesh The Sound name.
     79            */
     80            void setSound(const std::string& sound)
     81                { this->sound_ = sound; }
     82
     83            /**
     84            @brief Get the sound.
     85            @return Returns the sound name.
     86            */
     87            const std::string& getSound() const
     88                { return this->sound_; }
     89
     90            /**
    6391            @brief Set the material.
    6492            @param material The material name.
     
    85113
    86114            std::string material_; //!< The material.
     115            std::string mesh_; //!< The mesh.
     116            std::string sound_; //!< The sound.
     117
     118
     119
    87120            float speed_; //!< The speed of the fired projectile.
    88121            float delay_; //!< The firing delay.
Note: See TracChangeset for help on using the changeset viewer.