Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10684 in orxonox.OLD for branches/vs-enhencements


Ignore:
Timestamp:
Jun 11, 2007, 11:30:56 AM (18 years ago)
Author:
nicolasc
Message:

some hack, but still does not work

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

Legend:

Unmodified
Added
Removed
  • branches/vs-enhencements/src/lib/gui/gl/glgui_box.cc

    r10368 r10684  
    193193        //float realSizeY = fabsf((*widget)->getSizeX2D() * sinf(radDir)) + fabsf((*widget)->getSizeY2D() * cosf(radDir));
    194194        float realSizeX, realSizeY;
    195         int angleAbs = (int)(*widget)->getAbsDir2D();
    196         int angleRel = (int)(*widget)->getRelDir2D();
     195//         int angleAbs = (int)(*widget)->getAbsDir2D();
     196//         int angleRel = (int)(*widget)->getRelDir2D();
    197197        //std::cout << "absangle: " << angleAbs << ", relangle: " << angleRel << '\n';
    198198        if ((*widget)->getAbsDir2D() == 0 || (*widget)->getAbsDir2D() == 180)
  • branches/vs-enhencements/src/world_entities/npcs/npc.cc

    r10678 r10684  
    167167//   this->getWeaponManager().changeWeaponConfig(1);
    168168
    169   this->setHealthMax(100);
    170   this->setHealth(80);
     169//   this->setHealthMax(100);
     170//   this->setHealth(80);
     171  this->loadHealth(80,100);
    171172
    172173  this->getWeaponManager().setSlotCount(7);
  • branches/vs-enhencements/src/world_entities/space_ships/space_ship.cc

    r10678 r10684  
    175175
    176176
    177 //   this->weaponMan.addWeaponToSlot(0, 0, "RFCannon");
    178 //   this->weaponMan.addWeaponToSlot(0, 1, "RFCannon");
    179 //   this->weaponMan.addWeaponToSlot(0, 2, "RFCannon");
    180 //   this->weaponMan.addWeaponToSlot(0, 3, "RFCannon");
    181 //   this->weaponMan.addWeaponToSlot(1, 0, "RFCannon");
    182 //   this->weaponMan.addWeaponToSlot(1, 1, "RFCannon");
    183 //   this->weaponMan.addWeaponToSlot(1, 2, "RFCannon");
    184 //   this->weaponMan.addWeaponToSlot(1, 3, "RFCannon");
     177  this->weaponMan.addWeaponToSlot(0, 0, "RFCannon");
     178  this->weaponMan.addWeaponToSlot(0, 1, "RFCannon");
     179  this->weaponMan.addWeaponToSlot(0, 2, "RFCannon");
     180  this->weaponMan.addWeaponToSlot(0, 3, "RFCannon");
     181  this->weaponMan.addWeaponToSlot(1, 0, "RFCannon");
     182  this->weaponMan.addWeaponToSlot(1, 1, "RFCannon");
     183  this->weaponMan.addWeaponToSlot(1, 2, "RFCannon");
     184  this->weaponMan.addWeaponToSlot(1, 3, "RFCannon");
    185185
    186186  this->weaponMan.addWeaponToSlot(0, 4, "NadionLaser");
     
    462462      {
    463463        int slot = ws->getWeaponSlot();
    464 //         int side = ws->getWeaponSide(); //FIXME / REMOVE: is not used// HACK needed for some weapons (left/right)
     464        int side = ws->getWeaponSide(); //FIXME / REMOVE: is not used// HACK needed for some weapons (left/right)
    465465        this->getWeaponManager().setSlotPosition(slot, (*it).second->getCenter());
    466466        this->getWeaponManager().setSlotDirection(slot, ws->getRelDir());
  • branches/vs-enhencements/src/world_entities/weapons/weapon.cc

    r10648 r10684  
    145145
    146146  this->hideInactive = true;                       //< The Weapon will be hidden if it is inactive (by default)
     147  this->currentState = WS_INACTIVE;
    147148
    148149  this->minCharge = 1.0;                           //< The minimum charge the Weapon can hold is 1 unit.
  • branches/vs-enhencements/src/world_entities/weapons/weapon_slot.h

    r10678 r10684  
    4343  inline void addWeapon(const std::string& weaponName, int config) {this->configs[config] = Weapon::createWeapon(weaponName); }
    4444  inline void setWeapon(Weapon* weapon, int config) {this->configs[config] = weapon; };
    45   inline Weapon* getWeapon(int config) { if (config > WM_MAX_CONFIGS) return NULL; return this->configs[config]; };
     45  inline Weapon* getWeapon(int config) { if (config > WM_MAX_CONFIGS || config < 0) return NULL; return this->configs[config]; };
    4646
    4747  inline void setWeaponConfig(int slot, int side) { this->weaponSlot = slot; this->weaponSide = side; }
Note: See TracChangeset for help on using the changeset viewer.