Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3879 in orxonox.OLD


Ignore:
Timestamp:
Apr 18, 2005, 6:14:27 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: fixed a bug in the weapon change function: now there are only two weapons each in a separate weapon config

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/weapon.cc

    r3878 r3879  
    4040 
    4141  for(int i = 0; i < W_MAX_CONFIGS; ++i)
    42     for(int j = 0; j < W_MAX_SLOTS; ++j)
    43       this->configs[i].slots[j] = NULL;
     42    {
     43      this->configs[i].bUsed = false;
     44      for(int j = 0; j < W_MAX_SLOTS; ++j)
     45        this->configs[i].slots[j] = NULL;
     46    }
    4447
    4548  this->currConfID = W_CONFIG0;
     
    101104void WeaponManager::nextWeaponConf()
    102105{
    103   PRINTF(3)("Changing weapon configuration: from %i\n", this->currConfID);
     106  PRINTF(4)("Changing weapon configuration: from %i\n", this->currConfID);
    104107  int i;
    105108  for(i = this->currConfID + 1; i < W_MAX_CONFIGS && !this->configs[i].bUsed; ++i);
    106109  if( i == W_MAX_CONFIGS) this->currConfID = W_CONFIG0;
    107110  else this->currConfID = i; 
    108   PRINTF(3)("\tto %i\n", this->currConfID);
     111  PRINTF(4)("\tto %i\n", this->currConfID);
    109112}
    110113
Note: See TracChangeset for help on using the changeset viewer.