- 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,15 +1749,17 @@ bool Unit::applyAttackBoost(const AttackBoost *boost, const Unit *source) {
|
||||||
//printf("#2 wasAlive = %d hp = %d boosthp = %d\n",wasAlive,hp,boost->boostUpgrade.getMaxHp());
|
//printf("#2 wasAlive = %d hp = %d boosthp = %d\n",wasAlive,hp,boost->boostUpgrade.getMaxHp());
|
||||||
|
|
||||||
if(showUnitParticles == true) {
|
if(showUnitParticles == true) {
|
||||||
effect->upst = new UnitParticleSystemType();
|
if(boost->unitParticleSystemTypeForAffectedUnit != NULL) {
|
||||||
*effect->upst = *boost->unitParticleSystemTypeForAffectedUnit;
|
effect->upst = new UnitParticleSystemType();
|
||||||
//effect.upst = boost->unitParticleSystemTypeForAffectedUnit;
|
*effect->upst = *boost->unitParticleSystemTypeForAffectedUnit;
|
||||||
|
//effect.upst = boost->unitParticleSystemTypeForAffectedUnit;
|
||||||
|
|
||||||
effect->ups = new UnitParticleSystem(200);
|
effect->ups = new UnitParticleSystem(200);
|
||||||
effect->upst->setValues(effect->ups);
|
effect->upst->setValues(effect->ups);
|
||||||
effect->ups->setPos(getCurrVector());
|
effect->ups->setPos(getCurrVector());
|
||||||
effect->ups->setFactionColor(getFaction()->getTexture()->getPixmapConst()->getPixel3f(0,0));
|
effect->ups->setFactionColor(getFaction()->getTexture()->getPixmapConst()->getPixel3f(0,0));
|
||||||
Renderer::getInstance().manageParticleSystem(effect->ups, rsGame);
|
Renderer::getInstance().manageParticleSystem(effect->ups, rsGame);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
currentAttackBoostEffects.push_back(effect);
|
currentAttackBoostEffects.push_back(effect);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue