Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10660 in orxonox.OLD


Ignore:
Timestamp:
May 24, 2007, 12:05:40 AM (17 years ago)
Author:
nicolasc
Message:

night bunp

Location:
branches/vs-enhencements/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/vs-enhencements/src/lib/math/vector.h

    r10655 r10660  
    5151
    5252  /** @param index The index of the "array" @returns the x/y/z coordinate */
    53   inline float operator[] (float index) const {if( index == 0) return this->x; if( index == 1) return this->y; if( index == 2) return this->z; }
     53  inline float operator[] (float index) const {if( index == 0) return this->x; if( index == 1) return this->y; if( index == 2) return this->z; else return this->x; }
    5454  /** @param v The vector to add @returns the addition between two vectors (this + v) */
    5555  inline Vector operator+ (const Vector& v) const { return Vector(x + v.x, y + v.y, z + v.z); };
  • branches/vs-enhencements/src/world_entities/space_ships/space_ship.cc

    r10659 r10660  
    188188  Weapon* wpLeft3 = new Disruptor ();
    189189  wpLeft3->setName( "Disruptor");
     190
     191/*
     192  Weapon* wpRight3 = Weapon::createWeapon( "Disruptor" );
     193  wpRight3->setName( "Disruptor");
     194  Weapon* wpLeft3 = Weapon::createWeapon( "Disruptor" );
     195  wpLeft3->setName( "Disruptor");*/
    190196
    191197  Weapon* cannon = new SwarmLauncher();
     
    310316
    311317  this->weaponMan.setSlotCount(8);
    312 
     318/*
    313319  this->weaponMan.setSlotPosition(0, Vector(3.006, 1.028, .155));
    314320  this->weaponMan.setSlotCapability(0, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
     
    333339
    334340  this->weaponMan.setSlotPosition(7, Vector(1.431, -.612, -3.254));
    335   this->weaponMan.setSlotDirection(7, Quaternion(+M_PI_4*.5-M_PI, Vector(1,0,0)));
    336 
     341  this->weaponMan.setSlotDirection(7, Quaternion(+M_PI_4*.5-M_PI, Vector(1,0,0)));*/
     342
     343  this->createPriWMSlot(0, Vector(3.006, 1.028, .155), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
     344  this->createPriWMSlot(1, Vector(3.006, 1.028, -.155), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
     345  this->createPriWMSlot(2, Vector(4.03, .063, .876), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
     346  this->createPriWMSlot(3, Vector(4.03, -.063, -.876), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
     347  this->createPriWMSlot(4, Vector(1.431, -.612, 2.691), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
     348  this->createPriWMSlot(5, Vector(1.431, -.612, -2.691), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
     349  this->createPriWMSlot(6, Vector(1.431, -.612, 3.254), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
     350  this->createPriWMSlot(7, Vector(1.431, -.612, -3.254), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
     351
     352  this->secWeaponMan.setSlotCount(6);
     353/*
    337354  this->secWeaponMan.setSlotPosition(0, Vector(1.5, 3, 0));
    338355  this->secWeaponMan.setSlotCapability(0, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
     
    351368
    352369  this->secWeaponMan.setSlotPosition(5, Vector(1.5, 0, -.5));
    353   this->secWeaponMan.setSlotDirection(5, Quaternion(+M_PI_4*.5-M_PI, Vector(1,0,0)));
     370  this->secWeaponMan.setSlotDirection(5, Quaternion(+M_PI_4*.5-M_PI, Vector(1,0,0)));*/
     371
     372  this->createSecWMSlot(0, Vector(1.5, 3, 0), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
     373  this->createSecWMSlot(1, Vector(2.6, 0, 3.0), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
     374  this->createSecWMSlot(2, Vector(1.5, 0, -.5), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
     375  this->createSecWMSlot(3, Vector(1.5, 0, .5), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
     376  this->createSecWMSlot(4, Vector(1.5, 0, .5), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
     377  this->createSecWMSlot(5, Vector(1.5, 0, -.5), WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
    354378
    355379
  • branches/vs-enhencements/src/world_entities/space_ships/space_ship.h

    r10659 r10660  
    6363    inline WeaponManager& getWeaponManagerSecondary() { return this->secWeaponMan; };
    6464
     65    //!< functions for XML loading
    6566    inline void setReactor(float output) {this->reactorOutput = output; };
    6667    inline void setShield(float cur, float max, float th, float regen)
     
    8182    inline void updateHealth() { this->setHealth(this->armorCur); this->setHealthMax(this->armorMax); };
    8283
     84    inline void setPriWM(int slot) { this->weaponMan.setSlotCount(slot); };
     85    inline void setSecWM(int slot) { this->secWeaponMan.setSlotCount(slot); };
     86    inline void createPriWMSlot( int slot, Vector location, long capability) {
     87      this->weaponMan.setSlotPosition(slot, location);
     88      this->weaponMan.setSlotCapability(slot, capability); };
     89    inline void createSecWMSlot( int slot, Vector location, long capability) {
     90      this->secWeaponMan.setSlotPosition(slot, location);
     91      this->secWeaponMan.setSlotCapability(slot, capability); };
    8392    //Functions for GUI
    8493    inline float getShieldCur() { return this->shieldCur; };        //!< returns current shield value
Note: See TracChangeset for help on using the changeset viewer.