- bugfix for attackboost, don't try to make particle on affected units if particle not defined in xml
This commit is contained in:
parent
9bc26f418d
commit
44c73392ee
|
@ -1749,6 +1749,7 @@ bool Unit::applyAttackBoost(const AttackBoost *boost, const Unit *source) {
|
|||
//printf("#2 wasAlive = %d hp = %d boosthp = %d\n",wasAlive,hp,boost->boostUpgrade.getMaxHp());
|
||||
|
||||
if(showUnitParticles == true) {
|
||||
if(boost->unitParticleSystemTypeForAffectedUnit != NULL) {
|
||||
effect->upst = new UnitParticleSystemType();
|
||||
*effect->upst = *boost->unitParticleSystemTypeForAffectedUnit;
|
||||
//effect.upst = boost->unitParticleSystemTypeForAffectedUnit;
|
||||
|
@ -1759,6 +1760,7 @@ bool Unit::applyAttackBoost(const AttackBoost *boost, const Unit *source) {
|
|||
effect->ups->setFactionColor(getFaction()->getTexture()->getPixmapConst()->getPixel3f(0,0));
|
||||
Renderer::getInstance().manageParticleSystem(effect->ups, rsGame);
|
||||
}
|
||||
}
|
||||
currentAttackBoostEffects.push_back(effect);
|
||||
|
||||
if(wasAlive == true) {
|
||||
|
|
Loading…
Reference in New Issue