changed name of layer 1 to layer 0

and slightly modified speedtable: hard coded inverse to make calculation easier
This commit is contained in:
Raphael Maenle
2018-01-08 18:44:32 +01:00
parent c0f0417d3b
commit ab2741a743
3 changed files with 13 additions and 11 deletions

View File

@ -5,9 +5,11 @@
#include "DestructionPower.h"
//TODO! Add more layers here!
//sets relations of speed for the different layers
map<int,float> DestructionPower_Properties::SpeedTable =
{
{1,0.001}
{0,0.99}
};
@ -53,7 +55,7 @@ void DestructionPower::DestructionOfSurrounding(const coor constraintCoordinate)
m_constraintMatrix[constraintCoordinate.col][constraintCoordinate.row].DestructionArray[i] /=divisor;
else
//create default destructionPower //TODO find some better solution for default
m_constraintMatrix[constraintCoordinate.col][constraintCoordinate.row].DestructionArray[i] =1-m_constraintMatrix[constraintCoordinate.col][constraintCoordinate.row].SpeedTable[i+1];
m_constraintMatrix[constraintCoordinate.col][constraintCoordinate.row].DestructionArray[i] =1-m_constraintMatrix[constraintCoordinate.col][constraintCoordinate.row].SpeedTable[i];
}
}