added positive ageing to destructionPower
This commit is contained in:
parent
86c4e26bc7
commit
bfed4aba05
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "DestructionPower.h"
|
#include "DestructionPower.h"
|
||||||
|
|
||||||
|
//TODO! Add more layers here!
|
||||||
map<int,float> DestructionPower_Properties::SpeedTable =
|
map<int,float> DestructionPower_Properties::SpeedTable =
|
||||||
{
|
{
|
||||||
{1,0.001}
|
{1,0.001}
|
||||||
@ -48,7 +48,13 @@ void DestructionPower::DestructionOfSurrounding(const coor constraintCoordinate)
|
|||||||
newDestructionArray[i] /=divisor;
|
newDestructionArray[i] /=divisor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DestructionPower_Properties::DestructionPower_Properties() {
|
DestructionPower_Properties::DestructionPower_Properties() {
|
||||||
for(int i=0;i<sizeof(DestructionArray);i++)
|
float aging=1.001;
|
||||||
DestructionArray.emplace_back(DestructionPower_Properties::SpeedTable[i]*DESTRUCTION_INIT);
|
for(int i=0;i<DestructionArray.size();i++)
|
||||||
|
|
||||||
|
{
|
||||||
|
DestructionArray.emplace_back((DestructionPower_Properties::SpeedTable[i]*DESTRUCTION_INIT));
|
||||||
|
DestructionArray.back()<0.99 ? DestructionArray.back()*=aging:DestructionArray.back();
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user