* Gets a particle reference from the projectile surfaces. * @param i Index. * @return Particle id. */
| 362 | * @return Particle id. |
| 363 | */ |
| 364 | int Projectile::getParticle(int i) const |
| 365 | { |
| 366 | if (_action.weapon->getAmmoItem() && _action.weapon->getAmmoItem()->getRules()->getBulletSprite() != -1) |
| 367 | return _action.weapon->getAmmoItem()->getRules()->getBulletSprite() + i; |
| 368 | else if (_action.weapon->getRules()->getBulletSprite() == -1) |
| 369 | return -1; |
| 370 | else |
| 371 | return _action.weapon->getRules()->getBulletSprite() + i; |
| 372 | } |
| 373 | |
| 374 | /** |
| 375 | * Gets the project tile item. |
no test coverage detected