RM: added into dispatcher strucure
This commit is contained in:
@ -9,10 +9,11 @@
|
||||
//sets relations of speed for the different layers
|
||||
map<int,float> DestructionPower_Properties::SpeedTable =
|
||||
{
|
||||
{0,0.99}
|
||||
{0,0.99},
|
||||
{1,0.7},
|
||||
{2,0.7}
|
||||
};
|
||||
|
||||
|
||||
bool DestructionPower::PreProcessing(coor mySize,const vector<Part*>* partArray)
|
||||
{
|
||||
cout << "DestructionPower Preprocessing... ";
|
||||
@ -55,7 +56,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];
|
||||
m_constraintMatrix[constraintCoordinate.col][constraintCoordinate.row].DestructionArray[i] = m_constraintMatrix[constraintCoordinate.col][constraintCoordinate.row].SpeedTable[i];
|
||||
}
|
||||
}
|
||||
|
||||
@ -102,6 +103,6 @@ DestructionPower_Properties::DestructionPower_Properties() {
|
||||
|
||||
{
|
||||
DestructionArray.emplace_back((DestructionPower_Properties::SpeedTable[i]*DESTRUCTION_INIT));
|
||||
DestructionArray.back()<0.99 ? DestructionArray.back()*=aging:DestructionArray.back();
|
||||
DestructionArray.back()<0.8 ? DestructionArray.back()=aging*DestructionArray.back()+(float)0.01:DestructionArray.back();
|
||||
}
|
||||
}
|
||||
|
@ -3,8 +3,8 @@
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#define DESTRUCTION_COUNT 1
|
||||
//TODO!! increase Destructioncount
|
||||
#define DESTRUCTION_COUNT 2
|
||||
|
||||
#include "DestructionPower_Properties.h"
|
||||
#include "../AbstraktionLayer_Base.h"
|
||||
|
Reference in New Issue
Block a user