Fix for meshBound Particles

There was a bug if you used multiple units of the same type with mesh bound
particles. The given model was the same for all units with the same 
unitType/skill.
This commit is contained in:
titison
2014-12-26 20:51:37 +01:00
parent 0fdfc56b96
commit 7cd1cb242f
4 changed files with 72 additions and 45 deletions

View File

@@ -377,6 +377,7 @@ public:
float gravity;
float rotation;
const Model *unitModel;
Vec3f meshPos;
string meshName;
bool isVisibleAtNight;
bool isVisibleAtDay;
@@ -425,7 +426,8 @@ public:
void setSizeNoEnergy(float sizeNoEnergy) {this->sizeNoEnergy= sizeNoEnergy;}
void setGravity(float gravity) {this->gravity= gravity;}
void setRotation(float rotation);
const void setUnitModel(const Model* unitModel) {this->unitModel= unitModel;}
void setMeshPos(Vec3f meshPos) {this->meshPos=meshPos;}
string getMeshName() {return meshName;}
void setMeshName(string meshName) {this->meshName= meshName;}
void setRelative(bool relative) {this->relative= relative;}
void setRelativeDirection(bool relativeDirection) {this->relativeDirection= relativeDirection;}