Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10121 in orxonox.OLD


Ignore:
Timestamp:
Dec 20, 2006, 1:09:05 PM (17 years ago)
Author:
marcscha
Message:

Deactivate Fix

Location:
branches/playability/src/world_entities
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/world_entities/space_ships/space_ship.cc

    r10120 r10121  
    144144  this->registerObject(this, SpaceShip::_objectList);
    145145  PRINTF(4)("SPACESHIP INIT\n");
    146 
     146  this->weaponMan.setParentEntity( this);
    147147  //weapons:
    148148 
     
    175175  this->weaponMan.addWeapon( wpLeft1, 0, 0);
    176176  this->weaponMan.addWeapon( wpRight1, 0, 1);
    177   this->weaponMan.addWeapon( wpLeft2, 1, 0);
    178   this->weaponMan.addWeapon( wpRight2, 1, 1);
    179   this->weaponMan.addWeapon( wpLeft3, 2, 0);
    180   this->weaponMan.addWeapon( wpRight3, 2, 1);
     177
     178  this->weaponMan.addWeapon( wpLeft2, 1, 2);
     179  this->weaponMan.addWeapon( wpRight2, 1, 3);
     180
     181  this->weaponMan.addWeapon( wpLeft3, 2, 4);
     182  this->weaponMan.addWeapon( wpRight3, 2, 5);
    181183
    182184  this->secWeaponMan.addWeapon( cannon, 0, 0);
    183185
    184 /*
    185   wpRight1->requestAction(WA_ACTIVATE);
    186   wpLeft1->requestAction(WA_ACTIVATE);
    187 
    188   wpRight2->requestAction(WA_ACTIVATE);
    189   wpLeft2->requestAction(WA_ACTIVATE);
    190   wpRight3->requestAction(WA_ACTIVATE);
    191   wpLeft3->requestAction(WA_ACTIVATE);
    192 
    193   cannon->requestAction(WA_ACTIVATE);
    194 */
    195186 
    196187  this->weaponMan.changeWeaponConfig(1);
  • branches/playability/src/world_entities/weapons/medium_blaster.cc

    r10117 r10121  
    5656
    5757  this->setStateDuration(WS_RELOADING, 0);
    58   this->setStateDuration(WS_ACTIVATING, .5);
    59   this->setStateDuration(WS_DEACTIVATING, 1);
     58  this->setStateDuration(WS_ACTIVATING, 0); //.5);
     59  this->setStateDuration(WS_DEACTIVATING, 0); // 1);
    6060
    6161  this->setEnergyMax(500);
  • branches/playability/src/world_entities/weapons/weapon.cc

    r10037 r10121  
    353353  {
    354354    /** Disabled for releaseFire() from WM*/
    355     //if (this->requestedAction != WA_NONE)
    356     //  return;
     355    if (this->requestedAction != WA_NONE)
     356      return;
    357357    PRINTF(5)("next action will be %s in %f seconds\n", actionToChar(action), this->stateDuration);
    358358    this->requestedAction = action;
     
    435435    break;
    436436    default:
    437     PRINTF(2)("Action %s Not Implemented yet \n", Weapon::actionToChar(action));
     437    PRINTF(5)("Action %s Not Implemented yet \n", Weapon::actionToChar(action));
    438438    return false;
    439439  }
  • branches/playability/src/world_entities/weapons/weapon_manager.cc

    r10036 r10121  
    420420  this->currentConfigID = weaponConfig;
    421421  PRINTF(4)("Changing weapon configuration: to %i\n", this->currentConfigID);
     422
    422423  for (int i = 0; i < WM_MAX_SLOTS; i++)
    423424    this->currentSlotConfig[i].nextWeapon = this->configs[currentConfigID][i];
     
    472473  for(int i = 0; i < this->slotCount; i++)
    473474  {
    474 /*
    475     NICE LITTLE DEBUG FUNCTION
    476        if (this->currentSlotConfig[i].currentWeapon != NULL || this->currentSlotConfig[i].nextWeapon != NULL)
     475
     476    //NICE LITTLE DEBUG FUNCTION
     477    /*   if (this->currentSlotConfig[i].currentWeapon != NULL || this->currentSlotConfig[i].nextWeapon != NULL)
    477478      printf("%p %p\n", this->currentSlotConfig[i].currentWeapon, this->currentSlotConfig[i].nextWeapon);*/
    478479
     
    496497        }
    497498      }
    498 
    499499      // switching to next Weapon
    500500      tickWeapon = this->currentSlotConfig[i].currentWeapon = this->currentSlotConfig[i].nextWeapon;
     501     
    501502      if (tickWeapon != NULL)
    502503      {
Note: See TracChangeset for help on using the changeset viewer.